/* ZionHouse - one stylesheet for every page.
   Calm navy from the logo, warm ivory paper, a dawn glow for hope. */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --navy: #0b2d5c;
  --navy-deep: #071d3d;
  --navy-soft: #2f5189;
  --ink: #1b2333;
  --muted: #586174;
  --paper: #fbf8f3;
  --card: #ffffff;
  --line: #e8e1d6;
  --dawn: #f6dcc0;
  --dawn-soft: #fbeee0;
  --gold: #b9893f;
  --gold-text: #8a6220;
  --sky: #e6eef8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 18px;
  --max: 1120px;
  --read: 680px;
  --shadow: 0 1px 2px rgba(11, 45, 92, .06), 0 8px 24px rgba(11, 45, 92, .07);

  /* Topic colours: soft ground, strong text */
  --t-purpose: #f7ecd9;  --t-purpose-ink: #7a5414;
  --t-vision: #e3edf8;   --t-vision-ink: #1f4f86;
  --t-time: #e0f1ee;     --t-time-ink: #1d6458;
  --t-discipline: #efe6f5; --t-discipline-ink: #5d3a7e;
  --t-growth: #e6f2e2;   --t-growth-ink: #3d6b2f;
  --t-legacy: #f8e6dd;   --t-legacy-ink: #8a4527;
  --t-faith: #ebe8f8;    --t-faith-ink: #46409a;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-soft); }
:focus-visible { outline: 3px solid #e0a95a; outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.eyebrow { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 .8em; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }
.center { text-align: center; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.read { max-width: var(--read); margin-left: auto; margin-right: auto; }
section { padding-block: clamp(48px, 8vw, 96px); }

.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 50; }
.skip:focus { left: 16px; top: 12px; color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 1rem/1.2 var(--sans); padding: .9em 1.4em; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(11, 45, 92, .25); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 243, .92); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 52px; height: auto; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; padding: .5em .8em; border-radius: 999px; }
.nav a:hover { background: rgba(11, 45, 92, .06); color: var(--navy); }
.nav a[aria-current="page"] { color: var(--navy); background: rgba(11, 45, 92, .08); }
.nav .btn { margin-left: 8px; padding: .65em 1.15em; font-size: .95rem; }
.nav a.btn { color: #fff; background: var(--navy); }
.nav a.btn:hover { background: var(--navy-deep); color: #fff; }
.menu-btn { display: none; background: none; border: 1.5px solid rgba(11, 45, 92, .2); border-radius: 999px; padding: .5em .95em; font: 600 .95rem var(--sans); color: var(--navy); cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px max(20px, env(safe-area-inset-left, 0px)) 20px; box-shadow: 0 12px 24px rgba(11, 45, 92, .08); }
  .nav.open { display: flex; }
  .nav a { padding: .8em 1em; font-size: 1.05rem; }
  .nav .btn { margin: 8px 0 0; padding: .9em; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 88px) 0; background: linear-gradient(180deg, var(--paper) 0%, var(--dawn-soft) 55%, var(--dawn) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero-copy { padding-bottom: clamp(48px, 8vw, 110px); position: relative; z-index: 2; }
.hero h1 { margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--gold-text); font-weight: 500; }
.hero .lead { max-width: 34em; margin-bottom: 1.6em; }
.hero-photo { position: relative; z-index: 2; align-self: end; }
.hero-photo img { width: 100%; max-width: 440px; margin-left: auto; border-radius: 220px 220px 0 0; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.mountains { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; z-index: 1; pointer-events: none; }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-photo img { max-width: 300px; margin: 0 auto; }
}

/* Doors */
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .doors { grid-template-columns: 1fr; } }
.door { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; min-width: 0; }
.door:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11, 45, 92, .06), 0 18px 36px rgba(11, 45, 92, .12); color: var(--ink); }
.door .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.door .icon svg { width: 28px; height: 28px; }
.door h3 { margin: 6px 0 0; font-size: 1.4rem; }
.door p { margin: 0; color: var(--muted); font-size: .98rem; }
.door .go { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--navy); font-size: .95rem; }
.door .go::after { content: " \2192"; transition: margin .2s; }
.door:hover .go::after { margin-left: 4px; }

/* Word for today */
.word { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.word::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(246, 220, 192, .22), transparent 65%); }
.word .eyebrow { color: var(--dawn); }
.word blockquote { margin: 0 auto; max-width: 820px; position: relative; }
.word blockquote p { font-family: var(--serif); font-size: clamp(1.55rem, 3.6vw, 2.4rem); line-height: 1.3; font-weight: 400; margin-bottom: .7em; transition: opacity .35s; }
.word cite { font-style: normal; color: var(--dawn); font-weight: 600; font-size: .95rem; }
.word .btn-row { justify-content: center; margin-top: 28px; }
.word .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.word .btn-ghost:hover { border-color: #fff; color: #fff; }

/* Cards (articles) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; min-width: 0; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.card h3 { font-size: 1.35rem; margin: 10px 0 8px; }
.card p { color: var(--muted); font-size: .97rem; margin: 0 0 14px; }
.card .meta { margin-top: auto; font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .35em .8em; border-radius: 999px; }
.tag-purpose { background: var(--t-purpose); color: var(--t-purpose-ink); }
.tag-vision { background: var(--t-vision); color: var(--t-vision-ink); }
.tag-time { background: var(--t-time); color: var(--t-time-ink); }
.tag-discipline { background: var(--t-discipline); color: var(--t-discipline-ink); }
.tag-growth { background: var(--t-growth); color: var(--t-growth-ink); }
.tag-legacy { background: var(--t-legacy); color: var(--t-legacy-ink); }
.tag-faith { background: var(--t-faith); color: var(--t-faith-ink); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }

/* Note from me */
.note { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.note img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 220px; border: 6px solid #fff; box-shadow: var(--shadow); }
.note .sign { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--navy); }
@media (max-width: 700px) { .note { grid-template-columns: 1fr; text-align: center; } .note img { width: 160px; margin: 0 auto; } }

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(40px, 7vw, 80px) clamp(28px, 5vw, 48px); background: linear-gradient(180deg, var(--paper), var(--dawn-soft)); }
.page-hero.dawn { background: linear-gradient(180deg, #fdf3e7 0%, #f8dcc0 60%, #f1c9a4 100%); }
.page-hero.navy { background: var(--navy); color: #fff; }
.page-hero.navy h1 { color: #fff; }
.page-hero.navy .lead { color: rgba(255, 255, 255, .82); }
.page-hero .lead { max-width: 36em; }

/* Library filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filters button { font: 600 .9rem var(--sans); padding: .55em 1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Article */
.article-hero { padding-block: clamp(40px, 7vw, 80px) 24px; }
.article-hero .meta { color: var(--muted); font-size: .95rem; }
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.7rem; margin-top: 1.6em; }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; color: var(--navy); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .lines { font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: var(--navy); }
.prose .scripture { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 1.02rem; }
.prose .scripture cite { display: block; font-style: normal; font-weight: 600; color: var(--gold-text); margin-top: 6px; font-size: .9rem; }
.reflect { background: var(--dawn-soft); border-radius: var(--radius); padding: 24px 26px; margin: 2em 0; }
.reflect h3 { font-size: 1.15rem; margin-bottom: .4em; }
.reflect p:last-child { margin: 0; }
.next-step { border-top: 1px solid var(--line); margin-top: 3em; padding-top: 2em; }

/* Freedom */
.path { counter-reset: step; display: grid; gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 48px 1fr 24px; gap: 16px; align-items: center; padding: 20px 22px; }
.step summary::-webkit-details-marker { display: none; }
.step summary .num { counter-increment: step; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--dawn); color: var(--navy); font: 700 1.15rem var(--serif); }
.step summary .num::before { content: counter(step); }
.step summary h3 { margin: 0; font-size: 1.3rem; }
.step summary .sub { display: block; font-family: var(--sans); font-size: .93rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.step summary .chev { transition: transform .25s; color: var(--navy); }
.step[open] summary .chev { transform: rotate(180deg); }
.step .body { padding: 0 22px 22px 86px; }
.step .body p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .step .body { padding: 0 20px 20px; } .step summary { grid-template-columns: 40px 1fr 20px; gap: 12px; } .step summary .num { width: 40px; height: 40px; } }

.care { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; gap: 16px; align-items: flex-start; }
.care strong { color: var(--navy); }
.crisis { font-size: .95rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); min-width: 0; }
.panel.navy { background: var(--navy); color: #fff; border: 0; }
.panel.navy h2, .panel.navy h3 { color: #fff; }
.panel.navy p { color: rgba(255, 255, 255, .85); }

/* Legacy check */
.check { max-width: 720px; margin: 0 auto; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 24px; }
.progress span { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 99px; transition: width .35s; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; }
.q p { font-weight: 600; margin: 0 0 12px; color: var(--ink); }
.q .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.q .opts button { font: 600 .95rem var(--sans); padding: .6em 1.2em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.q .opts button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.q .explain { margin: 14px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .97rem; }
.q .explain-cta { display: block; margin-top: 10px; font-weight: 600; font-size: .93rem; color: var(--navy); }
.check-intro { margin: 6px 0 4px; color: var(--muted); }
.result { text-align: center; padding: 28px; border-radius: var(--radius); background: var(--dawn-soft); margin-top: 8px; }
.result .gap-list { list-style: none; padding: 0; margin: 4px auto 16px; max-width: 440px; display: grid; gap: 8px; text-align: left; }
.result .gap-list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-weight: 600; color: var(--ink); }
.result .gap-list li .muted { font-weight: 400; }
.disclaimer { font-size: .85rem; color: var(--muted); line-height: 1.55; }

/* Quotes wall */
.wall { columns: 3 260px; column-gap: 18px; }
.wall figure { break-inside: avoid; margin: 0 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.wall blockquote { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; color: var(--navy); }

/* Draft notes (preview only) */
.draft-note { background: #fff7e0; border: 1px dashed #d9b24a; color: #6b5310; border-radius: 12px; padding: 12px 16px; font-size: .92rem; margin: 0 0 20px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .78); padding-block: 56px 40px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.verse { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: #fff; line-height: 1.5; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; }

/* Gentle reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .btn:hover, .door:hover, .card:hover { transform: none; } }

/* Quotes wall: show more */
.wall-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 10px; text-align: center; }
.wall-count { margin: 0; font-size: .95rem; }
.wall-foot [hidden] { display: none; }

/* Anything marked hidden stays hidden, even cards that use flex. */
[hidden] { display: none !important; }
