/* Edifice — edificeapp.org
   The palette, type and radii are lifted from the app's own Theme.kt so the site and the
   product are one thing. Two schemes that never mix; the page ramp is the only gradient. */

:root {
  --page-top: #E3ECE4;
  --page-mid: #DCE7E9;
  --page-bot: #E2DFEA;
  --surface: #F7F9F6;
  --sunken: #EAEFE9;
  --ink: #141C17;
  --ink-2: #33423A;
  --ink-muted: #55645B;
  --accent: #1C5B42;
  --accent-soft: #CBDFD1;
  --on-accent: #F7F9F6;
  --hairline: #BFCCC1;
  --shadow: rgba(60, 80, 70, 0.16);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-card-lg: 24px;
  --r-card: 22px;
  --r-tile: 20px;
  --r-row: 16px;
  --r-button: 14px;

  --gutter: clamp(20px, 5vw, 80px);
  --measure: 1280px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-top: #131218;
    --page-mid: #16151C;
    --page-bot: #1B1A22;
    --surface: #1F1E27;
    --sunken: #121116;
    --ink: #F5F1E8;
    --ink-2: #DCD7CB;
    --ink-muted: #A79F8E;
    --accent: #7FBF9B;
    --accent-soft: #263730;
    --on-accent: #131218;
    --hairline: #37343F;
    --shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-mid) 42%, var(--page-bot) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

p { text-wrap: pretty; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.02em; }

.wrap { max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }

/* ---- Chrome ---------------------------------------------------------------------------- */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 24px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand svg { width: 30px; height: 30px; fill: var(--accent); }
.brand span {
  font-weight: 600; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); flex-wrap: wrap; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 15px; padding-block: 12px; }
.nav-links a[aria-current="page"] { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-button);
  font-weight: 600; font-size: 16px; font-family: var(--sans);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); opacity: 0.92; }
.btn-quiet { border: 1px solid var(--hairline); color: var(--ink); }
.btn-quiet:hover { color: var(--ink); border-color: var(--accent); }
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 16.5px; }
.btn svg { width: 19px; height: 19px; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-card-lg); padding: clamp(24px, 3vw, 34px);
}

.site-footer { border-top: 1px solid var(--hairline); margin-top: 40px; }
.site-footer .wrap {
  display: flex; justify-content: space-between; gap: 32px;
  flex-wrap: wrap; padding-block: 44px 64px;
}
.footer-links { display: flex; gap: clamp(16px, 2.4vw, 34px); flex-wrap: wrap; }
.footer-links a { font-weight: 500; font-size: 15px; padding-block: 10px; }
.footer-note { font-size: 14px; color: var(--ink-muted); max-width: 46ch; }

/* ---- Home ------------------------------------------------------------------------------ */

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px;
        align-items: center; padding-block: clamp(40px, 6vw, 72px) 40px; }
.hero h1 { font-size: clamp(48px, 7.2vw, 104px); line-height: 0.98; letter-spacing: -0.03em; }
.hero-lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 42ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-fine { font-size: 14px; color: var(--ink-muted); }

.deck { position: relative; min-height: 620px; }
.deck-card {
  position: absolute; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-card); padding: 26px; box-shadow: 0 22px 50px var(--shadow);
}
.deck-1 { top: 84px; left: 0; width: min(380px, 88%); opacity: 0.55; }
.deck-2 { top: 34px; left: 8%; width: min(400px, 92%); opacity: 0.8; }
.deck-3 { top: 130px; left: 4%; width: min(432px, 100%); box-shadow: 0 34px 70px var(--shadow); }
.deck-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em;
              text-transform: uppercase; color: var(--accent); }
.deck-text { font-family: var(--serif); line-height: 1.14; padding-top: 12px; }

.confession { font-family: var(--serif); line-height: 1.13; }
.scripture { font-family: var(--serif); font-style: italic; line-height: 1.5; color: var(--ink-2); }
.citation { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
            text-transform: uppercase; color: var(--accent); }
.tag {
  display: inline-flex; align-items: center; min-height: 27px; padding: 0 13px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}

.band { border-block: 1px solid var(--hairline); padding-block: 40px; overflow: hidden; }
.band-row { display: flex; gap: 20px; width: max-content; }
.band-row + .band-row { margin-top: 20px; }
.band-item {
  flex-shrink: 0; font-family: var(--serif); font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3; padding: 14px 26px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline);
}
.band-item.quiet { background: transparent; font-style: italic; color: var(--ink-2); }

.section { padding-block: clamp(56px, 7vw, 110px); }
.section h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.06; }
.section-lede { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.62; color: var(--ink-2); max-width: 52ch; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 80px); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline);
  color: var(--ink-2); font-size: 16px;
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.scene-tile {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-tile);
  padding: 30px; display: flex; flex-direction: column; gap: 8px;
  min-height: 172px; justify-content: flex-end;
}
.scene-ref { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em;
             text-transform: uppercase; color: var(--ink-muted); }
.scene-title { font-family: var(--serif); font-size: 26px; line-height: 1.18; }

.close-panel {
  background: var(--sunken); border: 1px solid var(--hairline); border-radius: var(--r-card-lg);
  padding: clamp(40px, 6vw, 88px); display: flex; flex-direction: column;
  align-items: center; gap: 24px; text-align: center;
}
.close-panel h2 { font-size: clamp(30px, 4.4vw, 58px); line-height: 1.06; max-width: 18ch; }

.phone {
  width: min(344px, 100%); border-radius: 40px; border: 1px solid var(--hairline);
  background: var(--page-top); padding: 12px; box-shadow: 0 30px 64px var(--shadow);
}
.phone-inner {
  border-radius: 30px; padding: 44px 24px 28px; min-height: 520px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-bot) 100%);
  text-align: center;
}
.veil { width: 100%; border-radius: var(--r-tile); background: color-mix(in srgb, var(--ink) 6%, transparent);
        padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.play-ring { width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--accent);
             display: flex; align-items: center; justify-content: center; }
.play-ring svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); }

.week { display: flex; gap: 8px; }
.week i { flex: 1; height: 52px; border-radius: var(--r-button); background: var(--sunken);
          border: 1px solid var(--hairline); }
.week i.kept { background: var(--accent); border-color: var(--accent); }
.week i.today { background: var(--accent-soft); border-color: var(--accent); }

/* ---- Documents (privacy, terms, delete, support) ---------------------------------------- */

.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
       align-items: start; padding-bottom: 96px; }
.doc-toc { position: sticky; top: 32px; background: var(--surface); border: 1px solid var(--hairline);
           border-radius: var(--r-tile); padding: 26px; }
.doc-toc h2 { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
              text-transform: uppercase; color: var(--ink-muted); margin-bottom: 14px; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.doc-toc a { display: block; padding-block: 8px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.doc-toc a:hover { color: var(--accent); }

.doc-title { padding-block: clamp(40px, 6vw, 76px) 40px; }
.doc-title h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.06; }
.doc-meta { font-size: 14px; color: var(--ink-muted); }

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.16; margin-top: 48px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; margin-top: 32px; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.prose th { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.prose td { color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.highlight-box, .prose blockquote {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-row);
  padding: 22px 24px; margin: 24px 0;
}
.prose blockquote { margin-inline: 0; }

/* ---- Motion ----------------------------------------------------------------------------- */

@keyframes sway-a { 0%, 100% { transform: rotate(-2.2deg) translate3d(-8px, -10px, 0); }
                    50%      { transform: rotate(1.6deg)  translate3d(8px, 10px, 0); } }
@keyframes sway-b { 0%, 100% { transform: rotate(2.6deg)  translate3d(10px, 8px, 0); }
                    50%      { transform: rotate(-1.2deg) translate3d(-6px, -12px, 0); } }
@keyframes sway-c { 0%, 100% { transform: rotate(-0.8deg) translate3d(0, 8px, 0); }
                    50%      { transform: rotate(1.1deg)  translate3d(4px, -8px, 0); } }
@keyframes drift  { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

.sway-a { animation: sway-a 13s cubic-bezier(.42, 0, .58, 1) infinite; }
.sway-b { animation: sway-b 17s cubic-bezier(.42, 0, .58, 1) infinite; }
.sway-c { animation: sway-c 21s cubic-bezier(.42, 0, .58, 1) infinite; }
.ticker { animation: drift 64s linear infinite; }
.ticker-slow { animation: drift 92s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .sway-a, .sway-b, .sway-c, .ticker, .ticker-slow { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---- Narrow ----------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero, .split, .grid-3, .grid-2, .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; }
  .deck { min-height: 460px; }
  .deck-1, .deck-2 { display: none; }
  .deck-3 { position: static; width: 100%; }
  .nav-links a:not(.btn) { display: none; }
  .site-footer .wrap { flex-direction: column; gap: 20px; }
}
