/* ===========================================================================
   John Moelker — a pastor who builds AI
   Brand: deep ink navy + warm parchment + restrained gold. Literary, crafted.
   =========================================================================== */

/* ---- Tokens ---- */
:root {
  /* Ink / navy */
  --navy-900: #0d1b2a;
  --navy-800: #122739;
  --navy-700: #1b3a57;

  /* Warm paper */
  --parchment: #f4eee1;
  --cream: #faf6ee;
  --cream-2: #f1e9d8;

  /* Gold (two tones for light vs dark backgrounds) */
  --gold: #c1923a;          /* mid */
  --gold-ink: #8f6a23;      /* darker, for text on light */
  --gold-glow: #d8b15a;     /* lighter, for accents on dark */

  --terracotta: #b0543d;    /* used very sparingly */

  /* Text (warm, never pure black) */
  --ink: #20272f;
  --ink-soft: #4a545f;
  --ink-mute: #6e7884;
  --on-dark: #efe7d6;
  --on-dark-soft: #c4c9d0;

  --line: rgba(32, 39, 47, 0.12);
  --line-dark: rgba(239, 231, 214, 0.16);

  /* Fluid scale */
  --step--1: clamp(0.86rem, 0.82rem + 0.2vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.6vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.3vw, 2.3rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.6vw, 3.4rem);
  --step-hero: clamp(2.7rem, 1.9rem + 4.2vw, 5.1rem);

  --container: 1180px;
  --radius: 12px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);

  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.05), 0 2px 6px rgba(13, 27, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(13, 27, 42, 0.08), 0 12px 28px rgba(13, 27, 42, 0.08);
  --shadow-gold: 0 8px 24px rgba(193, 146, 58, 0.28);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Ambient paper grain */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--navy-900); color: var(--on-dark);
  padding: 10px 16px; border-radius: var(--radius-sm); font-size: var(--step--1);
  transition: top 150ms var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); position: relative; z-index: 1; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.section { padding-block: clamp(72px, 9vw, 144px); position: relative; }

/* ---- Type helpers ---- */
.eyebrow {
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 18px;
}
.eyebrow--gold { color: var(--gold-ink); }

.section__title {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.02em;
  color: var(--ink); text-wrap: balance; margin-bottom: 22px;
}
.section__lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; max-width: 60ch; text-wrap: pretty; }
.center .section__lead { margin-inline: auto; }

.prose { max-width: 62ch; }
.prose p { color: var(--ink-soft); font-size: var(--step-1); margin-top: 1.1em; }
.prose p:first-child { margin-top: 0; }

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--navy-900);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--step-0); font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  white-space: nowrap; transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 150ms var(--ease), color 150ms var(--ease);
}
.btn--primary { background: var(--gold); color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--gold-glow); box-shadow: var(--shadow-gold); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent; color: var(--on-dark); border-color: var(--line-dark);
  min-height: 46px;
}
.btn--ghost:hover { border-color: var(--gold-glow); color: var(--gold-glow); transform: translateY(-2px); }

.btn:focus-visible { outline: 3px solid var(--gold-glow); outline-offset: 3px; }

/* ===========================================================================
   NAV
   =========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background-color 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(250, 246, 238, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; }
.nav__mark {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  background: var(--navy-900); color: var(--gold-glow);
  font-family: "Fraunces", serif; font-size: 1rem; border-radius: 10px; letter-spacing: 0.02em;
}
.nav__name { font-family: "Fraunces", serif; font-size: 1.18rem; color: var(--ink); }
.nav__links { display: flex; gap: 30px; margin-left: auto; }
.nav__links a {
  text-decoration: none; color: var(--ink-soft); font-size: var(--step--1); font-weight: 500;
  position: relative; padding: 6px 0; transition: color 150ms var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform 200ms var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { min-height: 44px; padding: 0 20px; font-size: var(--step--1); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 200ms var(--ease), opacity 200ms var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer { display: flex; flex-direction: column; gap: 4px; padding: 8px clamp(20px, 5vw, 40px) 20px; background: rgba(250, 246, 238, 0.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav__drawer[hidden] { display: none; }
.nav__drawer a { text-decoration: none; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.nav__drawer a:last-child { border-bottom: 0; }

/* ===========================================================================
   HERO
   =========================================================================== */
.hero { padding-block: clamp(56px, 8vw, 112px); position: relative; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero__title {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: var(--step-hero); line-height: 1.02; letter-spacing: -0.025em;
  color: var(--ink); margin: 8px 0 24px; text-wrap: balance;
}
.hero__lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 54ch; text-wrap: pretty; }

/* Portrait */
.portrait { margin: 0; }
.portrait__frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius);
  background: var(--navy-900); overflow: hidden;
  box-shadow: var(--shadow-md); outline: 1px solid var(--line);
}
.portrait__frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line-dark); border-radius: 8px; pointer-events: none; }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__fallback { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; }
.portrait__mono { font-family: "Fraunces", serif; font-size: clamp(4rem, 9vw, 7rem); color: var(--gold-glow); line-height: 1; }
.portrait__note { font-size: var(--step--1); letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark-soft); }
.portrait__caption { margin-top: 16px; font-size: var(--step--1); color: var(--ink-mute); font-style: italic; }

/* ---- Signup form ---- */
.signup { margin-top: 36px; max-width: 540px; }
.signup__label { font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.signup__row { display: flex; gap: 10px; }
.signup__input {
  flex: 1; min-width: 0; min-height: 50px; padding: 0 16px;
  font-family: inherit; font-size: var(--step-0); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.signup__input::placeholder { color: var(--ink-mute); }
.signup__input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(193, 146, 58, 0.18); }
.signup__micro { margin-top: 12px; font-size: var(--step--1); color: var(--ink-mute); }
.signup__success { margin-top: 12px; font-weight: 600; color: var(--gold-ink); }
.signup.is-success .signup__row, .signup.is-success .signup__micro, .signup.is-success .signup__label { display: none; }
.signup--center { margin-inline: auto; }
.signup--inline { margin-top: 28px; }

/* ===========================================================================
   SECTIONS
   =========================================================================== */
/* Guide */
.section--guide { background: var(--parchment); }
.guide__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.guide__mock { display: grid; place-items: center; }
.guide__cover {
  width: min(330px, 80%); aspect-ratio: 3 / 4; border-radius: 10px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: var(--on-dark); padding: 34px 30px; display: flex; flex-direction: column;
  box-shadow: var(--shadow-md); outline: 1px solid rgba(216, 177, 90, 0.25);
  transform: rotate(-2deg); transition: transform 300ms var(--ease-out);
}
.guide__mock:hover .guide__cover { transform: rotate(0deg) translateY(-4px); }
.guide__cover-eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-glow); }
.guide__cover-title { font-family: "Fraunces", serif; font-size: 1.6rem; line-height: 1.16; margin-top: 16px; }
.guide__cover-by { margin-top: auto; font-size: var(--step--1); color: var(--on-dark-soft); }
.guide__cover-rule { display: block; width: 40px; height: 2px; background: var(--gold); margin: 14px 0; }
.guide__cover-foot { font-family: "Fraunces", serif; font-style: italic; color: var(--gold-glow); }

.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; color: var(--ink-soft); font-size: var(--step-0); line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(193, 146, 58, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238f6a23' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* Story */
.section--story { background: var(--cream); }

/* Manifesto */
.section--manifesto { background: var(--navy-900); color: var(--on-dark); text-align: center; overflow: hidden; }
.section--manifesto::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgba(216, 177, 90, 0.10), transparent 70%);
  pointer-events: none;
}
.section--manifesto .eyebrow { color: var(--gold-glow); }
.manifesto {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: clamp(1.8rem, 1.2rem + 3vw, 3.3rem); line-height: 1.18; letter-spacing: -0.02em;
  color: var(--on-dark); max-width: 18ch; margin: 8px auto 28px; text-wrap: balance;
  position: relative;
}
.manifesto::before { content: "\201C"; color: var(--gold-glow); }
.manifesto::after { content: "\201D"; color: var(--gold-glow); }
.manifesto__body { color: var(--on-dark-soft); font-size: var(--step-1); max-width: 56ch; margin-inline: auto; line-height: 1.6; position: relative; }

/* School */
.section--school { background: var(--parchment); }

/* Follow */
.section--follow { background: var(--navy-900); color: var(--on-dark); text-align: center; }
.section--follow .eyebrow { color: var(--gold-glow); }
.section--follow .section__title { color: var(--on-dark); }
.section--follow .section__lead { color: var(--on-dark-soft); }
.follow__row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
.footer { background: var(--navy-800); color: var(--on-dark-soft); padding-block: 56px; border-top: 1px solid var(--line-dark); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__name { font-family: "Fraunces", serif; font-size: 1.15rem; color: var(--on-dark); }
.footer__tag { font-size: var(--step--1); color: var(--on-dark-soft); }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { text-decoration: none; color: var(--on-dark-soft); font-size: var(--step--1); transition: color 150ms var(--ease); }
.footer__links a:hover { color: var(--gold-glow); }
.footer__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: var(--step--1); color: var(--on-dark-soft); }

/* ---- About page ---- */
.about-hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 72px); }
.about-portrait { max-width: 280px; margin: 0 auto 28px; }
.story-more { margin-top: 28px; }
.text-link { color: var(--gold-ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(193, 146, 58, 0.35); padding-bottom: 1px; transition: border-color 150ms var(--ease); }
.text-link:hover { border-color: var(--gold); }

/* ===========================================================================
   REVEAL ANIMATION
   =========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav, .nav__links a::after, .guide__cover { transition: none !important; }
}

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; order: -1; }
  .guide__grid { grid-template-columns: 1fr; }
  .guide__mock { order: -1; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .signup__row { flex-direction: column; }
  .signup__input, .signup .btn { width: 100%; }
  .btn { width: 100%; }
  .follow__row .btn { width: auto; }
}
