/* TrueCatholic AI — Claude design (warm parchment + clay + gold)
   Mirrors the iOS app's TCATheme. Light + dark adaptive. */

:root {
  --canvas:       #F4F1E9;
  --surface:      #FBF9F2;
  --surface-alt:  #ECE7D8;
  --surface-raised:#FFFFFF;
  --ink:          #2A2620;
  --ink-2:        #6B6353;
  --ink-3:        #9A9280;
  --accent:       #C2602F;
  --accent-soft:  #F0DCCC;
  --gold:         #A8842F;
  --gold-soft:    #EFE3C4;
  --hairline:     #E5DFCD;
  --success:      #4F7A4E;
  --danger:       #B23B33;

  --serif: ui-serif, "Iowan Old Style", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius:  20px;
  --radius-s: 13px;
  --shadow:  0 10px 30px rgba(0,0,0,0.08);
  --shadow-lift: 0 18px 44px rgba(0,0,0,0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas:       #1B1916;
    --surface:      #262320;
    --surface-alt:  #322E28;
    --surface-raised:#35302A;
    --ink:          #EDE8DC;
    --ink-2:        #ACA493;
    --ink-3:        #756D5E;
    --accent:       #DB8159;
    --accent-soft:  #4A352A;
    --gold:         #CCAA5E;
    --gold-soft:    #423921;
    --hairline:     #3A352E;
    --success:      #84B07C;
    --danger:       #DE7068;
    --shadow:  0 10px 30px rgba(0,0,0,0.35);
    --shadow-lift: 0 18px 44px rgba(0,0,0,0.45);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* warm parchment bloom */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% -5%, rgba(168, 132, 47, .14), transparent 60%),
    radial-gradient(50% 45% at -10% 90%, rgba(194, 96, 47, .10), transparent 60%);
  z-index: 0;
}
@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(60% 50% at 85% -5%, rgba(219, 129, 89, .10), transparent 60%),
      radial-gradient(50% 45% at -10% 90%, rgba(204, 170, 94, .08), transparent 60%);
  }
}

/* ─── Layout helpers ─────────────────────────────────────────── */

.wrap   { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.narrow { max-width: 780px; }

section { padding: 90px 0; position: relative; z-index: 1; }
@media (max-width: 680px) { section { padding: 60px 0; } }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0 0 .5em; line-height: 1.18; }
h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: clamp(19px, 2.2vw, 22px); font-weight: 600; }

p { color: var(--ink-2); margin: 0 0 1em; }
.lede { font-size: clamp(16px, 1.9vw, 19px); line-height: 1.6; }

/* ─── Header / nav ────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--canvas) 75%, transparent);
  border-bottom: 1px solid var(--hairline);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 18px;
  letter-spacing: -.005em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
nav.primary { display: flex; align-items: center; gap: 26px; }
nav.primary a { color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
nav.primary a:hover { color: var(--accent); opacity: 1; }
nav.primary .download {
  background: linear-gradient(135deg, #CB6A38, #B5491F);
  color: white; padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(194,96,47,.30);
}
nav.primary .download:hover { opacity: .95; }
@media (max-width: 760px) {
  nav.primary { gap: 14px; }
  nav.primary a:not(.download) { display: none; }
}

/* ─── Hero ────────────────────────────────────────────────────── */

.hero { padding: 60px 0 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
}
.hero p.lede { color: var(--ink-2); max-width: 540px; }
@media (max-width: 880px) { .hero p.lede { margin-left: auto; margin-right: auto; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 880px) { .btn-row { justify-content: center; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .005em;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #CB6A38, #B5491F);
  color: white; box-shadow: 0 10px 24px rgba(194,96,47,.32);
}
.btn-primary:hover { opacity: .95; }
.btn-secondary {
  background: var(--surface-alt); color: var(--ink); border-color: var(--hairline);
}
.btn-secondary:hover { background: var(--surface); }

.note { margin-top: 18px; color: var(--ink-3); font-size: 13px; }

/* hero icon (the cross-on-parchment app icon) */
.hero-icon {
  display: flex; justify-content: center;
}
.hero-icon-frame {
  width: 280px; height: 280px;
  border-radius: 60px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lift);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-icon-frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1px solid var(--hairline);
}
.hero-icon-frame img { width: 100%; height: 100%; border-radius: inherit; }
@media (max-width: 880px) { .hero-icon-frame { width: 220px; height: 220px; border-radius: 48px; } }

/* ─── Intro ───────────────────────────────────────────────────── */

.intro {
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 4%, transparent) 0%, transparent 100%);
}
.intro .narrow { margin: 0 auto; }
.intro h2 { max-width: 18ch; margin-left: auto; margin-right: auto; }
.intro p  { max-width: 60ch; margin-left: auto; margin-right: auto; font-size: 17px; }

/* ─── Feature grid ────────────────────────────────────────────── */

.features h2 { max-width: 22ch; }
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 36px;
}
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 180px;
}
.feature:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.feature .icon-badge {
  width: 46px; height: 46px; border-radius: 14px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.feature.accent .icon-badge {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.feature h3 { margin: 4px 0 0; }
.feature p  { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ─── Science section ─────────────────────────────────────────── */

.science { background: color-mix(in srgb, var(--surface-alt) 60%, var(--canvas)); }
.science .narrow { margin: 0 auto; }
.science .narrow h2 { max-width: 22ch; }
.science .lede { color: var(--ink-2); max-width: 62ch; }

.studies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
@media (max-width: 820px) { .studies { grid-template-columns: 1fr; } }

.study {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-s);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.study .marker { font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 13px; letter-spacing: .04em; }
.study h3 { font-size: 19px; margin: 0; }
.study p { color: var(--ink-2); font-size: 14.5px; margin: 0; line-height: 1.55; }
.study .cite { color: var(--ink-3); font-size: 12.5px; font-style: italic; margin-top: 6px; line-height: 1.45; }

.science .disclaimer-note {
  margin-top: 28px;
  background: color-mix(in srgb, var(--gold) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--hairline));
  border-radius: var(--radius-s);
  padding: 16px 18px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

/* ─── Languages section ───────────────────────────────────────── */

.languages { text-align: center; }
.languages .narrow { margin: 0 auto; }
.lang-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  max-width: 38ch;
  margin: 26px auto 8px;
  line-height: 1.4;
}
.lang-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 28px;
}
.lang-pill {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.lang-pill:hover { background: color-mix(in srgb, var(--gold) 12%, var(--surface)); border-color: color-mix(in srgb, var(--gold) 40%, var(--hairline)); color: var(--ink); }
.lang-pill.current { background: var(--gold); color: white; border-color: transparent; }

/* ─── Privacy ─────────────────────────────────────────────────── */

.privacy .priv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
@media (max-width: 820px) { .privacy .priv-grid { grid-template-columns: 1fr; } }
.priv {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
}
.priv .icon-badge {
  width: 42px; height: 42px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.priv h3 { font-size: 17px; margin: 0 0 6px; }
.priv p  { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ─── CTA ─────────────────────────────────────────────────────── */

.cta {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(180deg, var(--canvas), color-mix(in srgb, var(--gold) 6%, var(--canvas)));
  border-top: 1px solid var(--hairline);
}
.cta h2 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.cta p  { max-width: 50ch; margin-left: auto; margin-right: auto; }
.cta .btn { margin-top: 22px; }

/* ─── Disclaimer band ─────────────────────────────────────────── */

.disclaimer {
  background: var(--surface-alt);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.disclaimer .narrow { margin: 0 auto; text-align: center; }
.disclaimer h2 { font-size: clamp(22px, 3vw, 28px); max-width: 26ch; margin-left: auto; margin-right: auto; }
.disclaimer p { max-width: 60ch; margin-left: auto; margin-right: auto; color: var(--ink-2); }

/* ─── Footer ──────────────────────────────────────────────────── */

footer {
  padding: 36px 0 56px;
  color: var(--ink-3);
  font-size: 13.5px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
footer .tagline { font-family: var(--serif); font-style: italic; color: var(--gold); }
footer .lang-switcher {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
}
footer .lang-switcher select {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  padding: 4px 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 18px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 6px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* ─── Tiny utility: SF Symbol-ish icon font fallback via emoji SVGs ─ */
.icon-badge svg { width: 22px; height: 22px; fill: currentColor; }
