/* AmenKey public site. Tokens mirror app/src/ui/theme/tokens.ts. */

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Regular.woff2") format("woff2"), url("fonts/EBGaramond-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Medium.woff2") format("woff2"), url("fonts/EBGaramond-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Italic.woff2") format("woff2"), url("fonts/EBGaramond-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #FAF6EE;
  --surface: #FFFFFF;
  --text: #1B1A1F;
  --muted: #6B6775;
  --primary: #4A2A6B;
  --on-primary: #FFFFFF;
  --button-key: #795884;
  --button-pressed: #39204D;
  --button-secondary: #EFE9E2;
  --sage: #E4EBDF;
  --on-sage: #344D40;
  --danger: #B3261E;
  --border: #E3DBCB;
  --field-border: #8A8494;
  --shield: #2A1740;
  --on-shield: #FAF6EE;
  --on-shield-muted: #C9BCDB;

  --serif: "EB Garamond", ui-serif, "New York", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --gutter: 24px;
  --measure: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141218;
    --surface: #1F1C25;
    --text: #F2EEF7;
    --muted: #A8A3B3;
    --primary: #B79AD9;
    --on-primary: #1B1024;
    --button-key: #DCCAE8;
    --button-pressed: #CBB1E2;
    --button-secondary: #2B2730;
    --sage: #27372F;
    --on-sage: #C8DBCB;
    --danger: #F2B8B5;
    --border: #37323F;
    --field-border: #8B8596;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; outline-color: var(--text); }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type */

.serif { font-family: var(--serif); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; }

.display em { font-style: italic; font-weight: 400; color: var(--primary); }

.display {
  font-size: clamp(32px, 6.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 24px);
  line-height: 1.38;
  color: var(--muted);
  text-wrap: pretty;
}

.overline {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.caption { font-size: 14px; line-height: 20px; color: var(--muted); }

/* Header */

.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}
.brand svg { width: 15px; height: 30px; color: var(--primary); flex: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; }
.nav .nav-wide { display: none; }
@media (min-width: 760px) { .nav .nav-wide { display: inline-flex; } }

/* Landing page */

.landing {
  --measure: 1184px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-space: clamp(56px, 8vw, 104px);
}
.landing-header { padding: 12px 0; }
.landing-header .brand { white-space: nowrap; }
.landing-header .nav a { padding-inline: 7px; color: var(--text); font-size: 14px; }
.landing-header .nav a:last-child { justify-content: end; min-width: 44px; padding-inline-end: 0; }
@media (max-width: 360px) {
  .landing-header .wrap { gap: 8px; }
  .landing-header .brand { gap: 7px; font-size: 22px; }
}

.hero { padding-top: clamp(28px, 5vw, 64px); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.launch-note { margin-bottom: 16px; color: var(--primary); font-size: 14px; font-weight: 600; }
.hero-title {
  font-size: clamp(62px, 12vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.043em;
  text-wrap: initial;
}
.hero-title span { display: block; }
.hero-summary {
  max-width: 30ch;
  margin-top: 24px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.48;
  text-wrap: pretty;
}
.hero-actions { margin-top: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.hero-actions .button {
  min-height: 52px;
  padding: 10px 16px 10px 18px;
  border-radius: 9px;
  font-size: 15px;
}
.hero-actions .button svg { width: 18px; height: 18px; flex: none; }
.text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.hero-facts { margin-top: 13px; font-size: 14px; color: var(--muted); }
.hero-shot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(412px, 107vw, 600px);
  margin-inline: calc(-1 * var(--gutter));
  background: #3A122A;
}
.hero-print, .hero-print img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-print img { object-fit: cover; }
.hero-shot .hero-phone {
  position: absolute;
  width: clamp(150px, 46vw, 238px);
  left: 9%;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px;
  border: 1px solid #6b4e62;
  border-radius: clamp(23px, 4vw, 34px);
  background: #1e171e;
  box-shadow: 0 16px 40px #16081180;
}
.hero-phone img { border-radius: clamp(17px, calc(4vw - 6px), 28px); }

@media (min-width: 540px) and (max-width: 849px) {
  .hero-shot { margin-inline: 0; border-radius: 6px; }
  .hero-shot .hero-phone { left: 16%; }
}
@media (min-width: 850px) {
  .landing-header { padding: 16px 0; }
  .landing-header .brand { font-size: 28px; }
  .landing-header .nav { gap: 26px; }
  .hero { padding-block: clamp(20px, 3.6vw, 48px) 0; }
  .hero-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: clamp(30px, 4.5vw, 70px);
  }
  .hero-title { font-size: clamp(72px, 7.8vw, 110px); }
  .hero-summary { margin-top: 27px; }
  .hero-actions { margin-top: 28px; }
  .hero-shot { height: clamp(470px, 47vw, 624px); margin-inline: 0; border-radius: 6px; }
  .hero-shot .hero-phone { width: clamp(170px, 19.1vw, 252px); left: 12%; }
}

/* Phone frame around a real capture (390 by 844) */

.phone {
  width: min(280px, 72vw);
  flex: none;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: var(--surface);
}
.phone img { width: 100%; border-radius: 33px; aspect-ratio: 390 / 844; }
.phone-small { width: min(248px, 68vw); border-radius: 36px; padding: 6px; }
.phone-small img { border-radius: 30px; }

/* Waitlist form */

.waitlist {
  margin-top: 32px;
  padding: 24px;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.waitlist > * + * { margin-top: 16px; }
.waitlist h2 { font-size: 26px; line-height: 1.15; }

.field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.field input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
}
.field input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.field input[aria-invalid="true"] { border-color: var(--danger); }

.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.consent input {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--primary);
}
.consent label { font-size: 15px; line-height: 22px; }

.error { color: var(--danger); font-size: 15px; line-height: 20px; margin-top: 8px; }
.consent .error { grid-column: 2; margin-top: 0; }

.status {
  padding: 14px 16px;
  background: var(--sage);
  color: var(--on-sage);
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  line-height: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 8px 8px 8px 24px;
  border: 0;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 90ms ease-out, background-color 90ms ease-out;
}
.button:hover { background: var(--button-pressed); }
.button:active { transform: scale(0.97); }
.button:disabled { opacity: 0.4; cursor: default; }
.button:focus-visible { border-radius: 9999px; }
.button .key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--button-key);
  color: var(--on-primary);
  flex: none;
}
.button .key svg { width: 18px; height: 18px; }
.button-inline { width: auto; }
.fineprint { font-size: 14px; line-height: 20px; color: var(--muted); }

/* Landing sections */

.landing .section { padding-block: var(--section-space); }
.landing .display { font-size: clamp(42px, 5.5vw, 66px); line-height: 0.98; text-wrap: initial; }

/* The gesture: three captures */

.steps-hint { margin-top: 12px; color: var(--muted); font-size: 14px; }
.steps {
  margin-top: 25px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(71vw, 266px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  margin-inline: calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 14px;
  scrollbar-width: thin;
}
.steps:focus-visible { outline-offset: -2px; }
.step {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 20px;
  scroll-snap-align: start;
}
.step-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 4px 10px;
}
.step-number { padding-top: 5px; color: var(--primary); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 29px; line-height: 1.02; text-wrap: initial; }
.step p { grid-column: 2; color: var(--muted); font-size: 15px; max-width: 28ch; }
.step .phone { width: min(100%, 224px); margin-inline: auto; align-self: end; }

@media (min-width: 800px) {
  .steps-hint { display: none; }
  .steps {
    margin: 42px 0 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 42px;
    overflow: visible;
    padding: 0;
  }
  .step-copy { width: min(100%, 254px); margin-inline: auto; }
}

/* Daily prayer and the ladder */

.daily {
  background: #2a202c;
  color: #faf6ee;
}
.feature { display: grid; gap: 32px; align-items: center; }
.feature-copy .display { max-width: 13ch; }
.feature-copy p {
  max-width: 38ch;
  margin-top: 20px;
  color: #e5d8e6;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}
.feature-shot { display: flex; justify-content: center; }
.feature-shot .phone { width: min(70vw, 230px); background: #16131a; border-color: #655666; }
@media (min-width: 680px) {
  .feature { grid-template-columns: 1fr minmax(0, 0.86fr); gap: 50px; }
  .feature-shot .phone { width: 248px; }
}

/* Plans and privacy */

.details-grid { display: grid; gap: 40px; align-items: start; }
.details-grid .display { font-size: clamp(38px, 4.5vw, 53px); }
.details-grid p { margin-top: 18px; max-width: 37ch; color: var(--muted); }
.details-grid .text-action { margin-top: 10px; }
.plans { display: grid; gap: 16px; margin-top: 20px; max-width: 460px; }
.plans > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 12px; }
.plans dt { font-weight: 600; }
.plans dd { color: var(--muted); }
@media (min-width: 760px) {
  .details-grid { grid-template-columns: 1fr 1fr; gap: 70px; }
}

/* Questions */

#questions { background: var(--surface); }
#questions .details-grid { row-gap: 16px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child summary { padding-top: 0; }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 16px 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 1.5px solid var(--primary);
  border-bottom: 1.5px solid var(--primary);
  transform: rotate(45deg) translate(-2px, -2px);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { margin-top: 0; padding: 0 0 20px; max-width: 40em; color: var(--muted); }
.more { margin-top: 28px; font-weight: 600; }

/* FAQ page: every answer visible */

.qa { margin-top: 40px; max-width: 760px; }
.qa > div { padding: 28px 0; border-top: 1px solid var(--border); }
.qa h2 { font-size: 26px; line-height: 1.2; }
.qa p { margin-top: 10px; max-width: 40em; }

/* Waitlist */

.signup { padding-block: clamp(48px, 7vw, 88px); background: var(--shield); }
.signup-grid { display: grid; gap: 28px; align-items: center; }
.signup-copy { color: var(--on-shield); }
.signup-copy .display { max-width: 13ch; font-size: clamp(40px, 5.5vw, 70px); line-height: 1; }
.signup-copy p { margin-top: 16px; color: var(--on-shield-muted); }
.signup-action .waitlist { max-width: none; margin: 0; }
@media (min-width: 760px) {
  .signup-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(40px, 6vw, 96px); }
}

/* Footer */

.site-footer { padding: 48px 0 56px; font-size: 15px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.footer-meta > * + * { margin-top: 6px; }
.footer-meta address { font-style: normal; }

/* Text pages (legal, confirmation) */

.page { padding: 32px 0 88px; }
.page-head { max-width: 760px; }
.page-head > * + * { margin-top: 16px; }

.prose { margin-top: 40px; max-width: 680px; }
.prose h2 { font-size: 28px; line-height: 1.2; margin-top: 48px; }
.prose h3 { font-size: 22px; line-height: 1.25; margin-top: 28px; }
.prose p, .prose ul, .prose table { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-top: 1px solid var(--border); }
.prose th { font-weight: 600; }
.prose .scroll { overflow-x: auto; }

.notice { max-width: 560px; margin: 48px auto 0; text-align: center; }
.notice .arch { width: 56px; height: 112px; margin: 0 auto 32px; color: var(--primary); }
.notice > * + * { margin-top: 16px; }
.notice .button { margin-top: 32px; }

/* Motion: one quiet entrance, off under Reduce Motion */

@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter 280ms ease-out both; }
  @keyframes enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .button:active { transform: none; }
}

/* Video of the gesture, once filmed (served from this site) */
.gesture { display: block; width: min(320px, 100%); margin: 48px auto 0; border-radius: 28px; border: 1px solid var(--border); background: var(--surface); }
