/* Four homepage sections (three ways in, question of the day, coming soon, pricing).
   Loaded after home.css and bento.css. Uses their tokens; adds none of its own colours. */

.areas h2, .qotd h2, .coming h2, .pricing h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.1; letter-spacing: -.015em;
  margin-bottom: 18px;
  text-wrap: balance;
}

.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #E6BA62; color: var(--night); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--stone); font-family: var(--body); }
.btn-line:hover { background: var(--ink); color: var(--card); }

/* ---------- three ways in ---------- */
.areas { padding: clamp(64px, 9vw, 112px) 0 clamp(24px, 4vw, 48px); }
.doors {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 28px);
}
/* Each area is a doorway: a full arch on top, square at the threshold. */
.door {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 3 / 4.3; min-height: 460px;
  border-radius: 999px 999px var(--r-md) var(--r-md);
  background: var(--night);
  color: var(--night-text);
  display: flex; align-items: flex-end;
}
.door-img {
  position: absolute; inset: 0; z-index: -2;
  background: center / cover no-repeat;
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1);
}
.door::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(15,23,19,.97) 0%, rgba(15,23,19,.9) 34%, rgba(15,23,19,.35) 62%, rgba(15,23,19,.12) 100%);
}
.door:hover .door-img, .door:focus-within .door-img { transform: scale(1.05); }
.door-passage .door-img { background-image: url("assets/images/texture-hebrew-scroll.jpg"); }
.door-word .door-img { background-image: url("assets/images/wordstudy-magnifier.jpg"); background-position: 38% center; }
.door-topic .door-img { background-image: url("assets/images/topics-olive-grove.jpg"); }
.door-body { padding: clamp(22px, 2.6vw, 32px); width: 100%; }
.door-count {
  font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 10px;
}
.door h3 { font: 300 clamp(1.8rem, 2.8vw, 2.3rem)/1.08 var(--display); letter-spacing: -.015em; margin: 0 0 10px; }
.door-body > p:not(.door-count) { font-size: 15.5px; line-height: 1.55; color: var(--night-text); opacity: .9; margin: 0 0 20px; max-width: 30ch; }

/* ---------- question of the day ---------- */
.qotd {
  padding: clamp(72px, 10vw, 128px) 0; color: var(--night-text);
  background:
    linear-gradient(to right, rgba(15,23,19,.93) 0%, rgba(15,23,19,.82) 48%, rgba(15,23,19,.74) 100%),
    url("assets/images/jerusalem-dusk.jpg") center 58% / cover no-repeat,
    var(--night);
}
.qotd .label { color: var(--gold); }
.qotd-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 6vw, 88px); align-items: end; }
.qotd-date { font: 400 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--night-text); opacity: .8; margin: 0 0 22px; }
.qotd h2 { margin-bottom: 24px; }
.qotd-claim { border-left: 3px solid var(--gold); padding: 2px 0 2px 18px; color: var(--night-text); opacity: .9; max-width: 32rem; margin: 0 0 32px; font-size: 1.05rem; }
.qotd-claim b { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.qotd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0; }
.qotd-actions a:not(.btn) { color: var(--night-text); font-size: 15px; padding: 12px 0; }
.qotd-actions a:not(.btn):hover { color: var(--gold); }

.queue > p { margin: 0 0 14px; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--night-text); opacity: .8; }
.queue ul { list-style: none; margin: 0; padding: 0; }
.queue li { padding: 15px 0; border-top: 1px solid rgba(233,230,218,.24); font: 400 1.15rem/1.3 var(--display); color: var(--night-text); opacity: .92; }
.queue li:last-child { border-bottom: 1px solid rgba(233,230,218,.24); }

/* ---------- coming soon ---------- */
.coming {
  padding: clamp(72px, 10vw, 128px) 0; color: var(--night-text);
  background:
    linear-gradient(to right, rgba(15,23,19,.9) 0%, rgba(15,23,19,.74) 55%, rgba(15,23,19,.6) 100%),
    url("assets/images/hero-jerusalem.jpg") center 68% / cover no-repeat,
    var(--night);
}
.coming .label { color: var(--gold); }
.coming-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.coming h2 { font-weight: 300; }
.coming-part { font: italic 300 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--display); color: var(--gold); margin: -6px 0 22px; }
.coming-grid .lede { color: var(--night-text); opacity: .88; }
.inline-form { margin-top: 28px; max-width: 30rem; }
.inline-form label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 8px; }
.inline-row { display: flex; gap: 10px; }
.inline-row input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px;
  font: 400 16px/1 var(--body); color: var(--ink);
  background: var(--card); border: 2px solid transparent; border-radius: 10px;
}
.inline-row input:focus { outline: none; border-color: var(--gold); }
.inline-row .btn { height: 52px; white-space: nowrap; }
.form-note { margin: 12px 0 0; font-size: 14px; color: var(--night-text); opacity: .8; min-height: 1.4em; }
.form-note.ok, .form-note.bad { opacity: 1; }
.form-note.ok { color: var(--gold); }
.form-note.bad { color: #E9A58B; }

/* Galatians, chapter by chapter. Bar length is the number of verses in the chapter. */
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters-title { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--night-text); opacity: .75; margin: 0 0 14px; display: flex; justify-content: space-between; }
.chapters li { display: grid; grid-template-columns: 9.5rem 1fr 4.6rem; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid rgba(233,230,218,.22); }
.chapters li:last-child { border-bottom: 1px solid rgba(233,230,218,.22); }
.chapters .ch { font: 400 1.15rem/1.2 var(--display); }
.chapters .bar { height: 6px; border-radius: 3px; width: calc(var(--v) / 31 * 100%); background: repeating-linear-gradient(90deg, var(--gold) 0 2px, transparent 2px 6px); opacity: .75; }
.chapters .vv { font: 400 12px/1 var(--mono); color: var(--night-text); opacity: .75; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- pricing ---------- */
.pricing { padding: clamp(64px, 9vw, 112px) 0; }
.tiers { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.tier { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(22px, 2.6vw, 32px); }
.tier-now { background: var(--olive); border-color: var(--olive); color: var(--card); }
.tier-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; margin-bottom: 18px; }
.tier-name { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin: 0; }
.tier-now .tier-name { color: var(--card); }
.soon { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px dashed #B9B49F; color: var(--stone); white-space: nowrap; }
.tier-now .soon { border: 0; background: rgba(251,250,245,.16); color: var(--card); }
.price { font: 600 clamp(2.6rem, 4.4vw, 3.4rem)/1 var(--body); letter-spacing: -.035em; margin: 0; font-variant-numeric: tabular-nums; }
.price small { font: 400 15px/1 var(--body); letter-spacing: 0; color: var(--stone); margin-left: 8px; }
.tier-line { font: italic 300 1.2rem/1.35 var(--display); margin: 14px 0 22px; }
.tier ul { list-style: none; margin: 0 0 28px; padding: 20px 0 0; border-top: 1px solid var(--line); }
.tier-now ul { border-color: rgba(251,250,245,.22); }
.tier ul li { position: relative; padding: 0 0 11px 22px; font-size: 15px; line-height: 1.5; color: var(--stone); }
.tier-now ul li { color: var(--card); }
.tier ul li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 5px; border-left: 2px solid var(--olive); border-bottom: 2px solid var(--olive); transform: rotate(-45deg); }
.tier-now ul li::before { border-color: var(--gold); }
.tier ul li.plus { padding-left: 0; font-weight: 500; color: var(--ink); }
.tier ul li.plus::before { display: none; }
.tier .btn { margin-top: auto; text-align: center; padding: 16px 22px; width: 100%; }
.tier-foot { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--stone); min-height: 3em; }
.tier-now .tier-foot { color: var(--card); opacity: .85; }

/* ---------- popups (waiting list, feedback) ---------- */
.modal {
  width: min(calc(100vw - 24px), 500px); max-height: calc(100dvh - 24px); overflow: auto;
  padding: clamp(24px, 4vw, 40px); border: 0; border-radius: var(--r-md);
  background: var(--card); color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
}
.modal-wide { width: min(calc(100vw - 24px), 620px); }
.modal::backdrop { background: rgba(15,23,19,.66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal h2 { font: 400 clamp(1.6rem, 3vw, 2rem)/1.15 var(--display); letter-spacing: -.01em; margin: 0 0 10px; padding-right: 40px; }
.modal-lede { color: var(--stone); font-size: 15.5px; margin: 0 0 24px; }
.modal-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--stone); font: 400 28px/1 var(--body); cursor: pointer; }
.modal-x:hover { background: var(--paper); color: var(--ink); }
.modal .btn { width: 100%; padding: 16px 22px; }
.modal .form-note { color: var(--stone); opacity: 1; }
.modal .form-note.ok { color: var(--olive); font-weight: 500; }
.modal .form-note.bad { color: var(--clay); }
.modal .fb { background: none; border: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: pop .28s cubic-bezier(.2,.7,.2,1); }
  @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .doors, .tiers, .qotd-grid, .coming-grid { grid-template-columns: 1fr; }
  .door { aspect-ratio: auto; min-height: 440px; border-radius: 180px 180px var(--r-md) var(--r-md); }
  .tier-foot { min-height: 0; }
}
@media (max-width: 520px) {
  .inline-row { flex-direction: column; }
  .inline-row input { flex: none; width: 100%; }
  .chapters li { grid-template-columns: 7.5rem 1fr 4.2rem; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .door-img { transition: none; }
  .door:hover .door-img, .door:focus-within .door-img { transform: none; }
}

/* ---------- how it works ----------
   A study desk behind the heading and the five steps; it fades to plain night further down. */
.how {
  padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 8vw, 104px);
  color: var(--night-text);
  background:
    linear-gradient(to bottom, rgba(15,23,19,.74) 0, rgba(15,23,19,.8) 380px, var(--night) 820px),
    url("assets/images/study-desk-notes.jpg") top center / max(100%, 1500px) auto no-repeat,
    var(--night);
}
.how > .wrap > .label { color: var(--gold); }
.how h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 300; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 16px; }
.how .lede { color: var(--night-text); opacity: .92; max-width: 34rem; }

/* The five steps are numbered with the first five Hebrew letters, joined by one line: the way. */
.steps {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px); opacity: .7;
}
.steps li { position: relative; padding-top: 78px; }
.step-n {
  position: absolute; top: 0; left: 0;
  width: 60px; height: 60px; border-radius: 999px 999px 8px 8px;
  display: grid; place-items: center;
  background: var(--night); border: 1px solid var(--gold); color: var(--gold);
  font: 500 30px/1 "Frank Ruhl Libre", var(--display);
}
.steps h3 { font: 400 1.3rem/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 8px; color: var(--night-text); text-wrap: balance; }
.steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--night-text); opacity: .86; max-width: 24ch; }

.how-sub {
  display: flex; align-items: center; gap: 16px;
  font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  margin: clamp(52px, 7vw, 84px) 0 22px;
}
.how-sub::after { content: ""; flex: 1; height: 1px; background: var(--night-line); }

/* What you will learn: six tiles, each hung from a gold thread. */
.learn { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.learn li {
  position: relative; padding: 28px clamp(20px, 2.4vw, 28px) 26px;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-md);
}
.learn li::before { content: ""; position: absolute; left: clamp(20px, 2.4vw, 28px); top: -1px; width: 44px; height: 2px; background: var(--gold); }
.learn h4 { font: 400 1.35rem/1.2 var(--display); letter-spacing: -.01em; color: var(--night-text); margin: 0 0 10px; text-wrap: balance; }
.learn p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--night-mute); }

.how-foot {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 22px 0 0; border-top: 1px solid var(--night-line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px clamp(24px, 5vw, 64px);
  font-size: 15.5px; color: var(--night-mute);
}
.how-foot b { font-weight: 500; color: var(--night-text); }

/* ---------- library: today's five ----------
   Two cards on the first row (7 + 5 columns), three on the second. Rows share a height, so no card towers. */
.lib-date { margin: 0; text-align: right; font: 500 12px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.lib-date time { display: block; font: 400 1.35rem/1.25 var(--display); letter-spacing: -.01em; text-transform: none; color: var(--ink); margin-top: 4px; }
.lib-date span { display: block; margin-top: 4px; font: 400 14px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--stone); }
.lib-day { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.lib-day > .card { grid-column: span 4; }
.lib-day > .card:nth-child(1) { grid-column: span 7; }
.lib-day > .card:nth-child(2) { grid-column: span 5; }
.lib-day > .card > a { min-height: 230px; }
.lib-day > .card:nth-child(-n+2) > a { padding: clamp(24px, 2.8vw, 34px); gap: 12px; }
.lib-day > .card:nth-child(-n+2) h3 { font-size: clamp(1.7rem, 2.6vw, 2.15rem); font-weight: 300; line-height: 1.1; }
.lib-day > .card:nth-child(-n+2) .verse-line { font-size: 1.12rem; -webkit-line-clamp: 3; }
.lib-day > .card:nth-child(1) > a { background: var(--night); border-color: var(--night); color: var(--night-text); }
.lib-day > .card:nth-child(1) .book, .lib-day > .card:nth-child(1) .go { color: var(--gold); }
.lib-day > .card:nth-child(1) .verse-line { color: var(--night-text); }
.lib-day > .card:nth-child(1) p { color: var(--night-mute); font-size: 15.5px; }

@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr; gap: 0; max-width: 34rem; }
  .steps::before { left: 30px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 12px); }
  .steps li { padding: 6px 0 30px 84px; min-height: 84px; }
  .steps p { max-width: none; }
  .learn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .lib-day > .card { grid-column: span 6; }
  .lib-day > .card:nth-child(1) { grid-column: span 12; }
  .lib-day > .card:nth-child(2) { grid-column: span 6; }
  .lib-date { text-align: left; }
}
@media (max-width: 620px) {
  .learn, .how-foot { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .lib-day { grid-template-columns: 1fr; }
}
.how .bento-feat .cell { color: var(--ink); }
