/* Scripture Clock — landing page
   Palette comes from the app's Colors.xcassets (Background, CellBackground, Gradient). */

:root {
  --bg: #f3ead8;
  --bg-tint: #ecdfc6;
  --stage-a: #ebd7b7;
  --stage-b: #d6c19f;
  --ink: #1c1a17;
  --muted: #5c5548;
  --accent: #7c4f1a;
  --rule: rgba(28, 26, 23, 0.14);
  --btn-bg: #1c1a17;
  --btn-ink: #f8f2e6;
  --shadow: 60, 42, 14;

  --serif: Baskerville, "Baskerville Old Face", "Libre Baskerville", "Hoefler Text", Garamond, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2e3432;
    --bg-tint: #353c3a;
    --stage-a: #3f4645;
    --stage-b: #565d5b;
    --ink: #f4efe6;
    --muted: #b7beba;
    --accent: #e6cfa6;
    --rule: rgba(255, 255, 255, 0.14);
    --btn-bg: #f4efe6;
    --btn-ink: #1c1a17;
    --shadow: 0, 0, 0;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.5rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.wrap--narrow { max-width: 780px; }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--btn-bg); color: var(--btn-ink);
  padding: 10px 16px; border-radius: 10px; font: 600 0.95rem var(--sans); z-index: 10;
}
.skip:focus { top: 12px; color: var(--btn-ink); }

.eyebrow {
  font: 600 0.8125rem/1.2 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */

.site-header { padding-block: 18px; }
.site-header__inner { display: flex; align-items: center; gap: 24px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 1.3125rem; text-decoration: none; white-space: nowrap;
}
.brand:hover { color: inherit; }
.brand img { width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 0 0 1px var(--rule); }
.nav { margin-left: auto; display: flex; gap: 28px; font: 500 0.9375rem var(--sans); }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--btn-bg); color: var(--btn-ink);
  font-family: var(--sans); font-weight: 600; text-decoration: none;
  border-radius: 14px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { color: var(--btn-ink); opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn--small { padding: 9px 16px; font-size: 0.9375rem; border-radius: 999px; white-space: nowrap; }
.btn--store { padding: 12px 24px 12px 20px; font-size: 1.3125rem; line-height: 1.1; text-align: left; }
.btn--store small { display: block; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.02em; opacity: 0.85; margin-bottom: 1px; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 104px); }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.lede { font-size: clamp(1.25rem, 2.1vw, 1.4375rem); color: var(--muted); margin-top: 22px; max-width: 34em; }
.hero__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 32px; }
.hero__note { font: 500 0.9375rem var(--sans); color: var(--muted); }
.trust {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font: 500 0.9375rem var(--sans); color: var(--muted);
}
.trust li + li { padding-left: 22px; border-left: 1px solid var(--rule); }
.trust span { color: var(--accent); }

.hero__devices { display: flex; justify-content: center; align-items: flex-end; }
.hero__devices .phone--front { --w: clamp(210px, 52vw, 300px); z-index: 1; }
.hero__devices .phone--back {
  --w: clamp(180px, 45vw, 258px);
  margin-left: calc(var(--w) * -0.26);
  margin-bottom: calc(var(--w) * 0.1);
}

/* ---------- iPhone frame ----------
   Drawn to iPhone Pro proportions on a 432 x 904 grid:
   402 x 874 pt screen, 8 pt black bezel, 7 pt titanium band.
   Set --w (outer width) and everything else scales from it. */

.phone {
  --w: 280px;
  --u: calc(var(--w) / 432);
  position: relative;
  isolation: isolate;
  flex: none;
  width: var(--w);
  padding: calc(7 * var(--u));
  border-radius: calc(77 * var(--u));
  background:
    linear-gradient(145deg, #c9c4bb 0%, #f1eee8 16%, #8e897f 40%, #dedad2 60%, #7d786f 82%, #cbc7be 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 calc(3 * var(--u)) rgba(0, 0, 0, 0.45),
    0 calc(50 * var(--u)) calc(70 * var(--u)) calc(-28 * var(--u)) rgba(var(--shadow), 0.5),
    0 calc(18 * var(--u)) calc(30 * var(--u)) calc(-14 * var(--u)) rgba(var(--shadow), 0.35);
}

/* Side buttons: action + volume on the left, power + camera control on the right */
.phone::before, .phone::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: calc(3.2 * var(--u));
  background-repeat: no-repeat;
  border-radius: calc(1.6 * var(--u));
}
.phone::before {
  left: calc(-2.6 * var(--u));
  background-image:
    linear-gradient(90deg, #8a857c, #d5d1c9),
    linear-gradient(90deg, #8a857c, #d5d1c9),
    linear-gradient(90deg, #8a857c, #d5d1c9);
  background-size: 100% calc(32 * var(--u)), 100% calc(60 * var(--u)), 100% calc(60 * var(--u));
  background-position: 0 calc(152 * var(--u)), 0 calc(214 * var(--u)), 0 calc(290 * var(--u));
}
.phone::after {
  right: calc(-2.6 * var(--u));
  background-image:
    linear-gradient(270deg, #8a857c, #d5d1c9),
    linear-gradient(270deg, #9a958c, #c9c5bd);
  background-size: 100% calc(96 * var(--u)), 62% calc(52 * var(--u));
  background-position: 0 calc(256 * var(--u)), 0 calc(566 * var(--u));
}

.phone__bezel {
  position: relative;
  z-index: 1;
  padding: calc(8 * var(--u));
  border-radius: calc(70 * var(--u));
  background: #050505;
  box-shadow: inset 0 0 0 calc(1.2 * var(--u)) #262626;
}

.phone__screen {
  position: relative;
  aspect-ratio: 402 / 874;
  overflow: hidden;
  border-radius: calc(62 * var(--u));
  background: #000;
}
.phone__screen picture { display: block; height: 100%; }
.phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Dynamic Island */
.phone__island {
  position: absolute;
  top: calc(13.9 * var(--u));
  left: 50%;
  width: calc(94.6 * var(--u));
  height: calc(36.6 * var(--u));
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 78% 50%, #1b2238 0, #0b0d14 calc(4.5 * var(--u)), transparent calc(5.5 * var(--u))),
    #000;
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tint { background: var(--bg-tint); }

/* How it works */
.steps {
  list-style: none; padding: 0; margin: clamp(36px, 5vw, 56px) 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px);
}
.steps li { border-top: 1px solid var(--rule); padding-top: 22px; }
.steps__num { display: block; font-size: 3.25rem; font-weight: 700; line-height: 1; color: var(--accent); margin-bottom: 14px; }
.steps p { color: var(--muted); margin-top: 8px; }

.examples {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.examples figure {
  margin: 0; padding: 22px 24px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--stage-a), var(--stage-b));
  box-shadow: 0 6px 16px -8px rgba(var(--shadow), 0.45);
}
.examples figcaption { font-weight: 700; font-size: 1.1875rem; display: flex; justify-content: space-between; flex-direction: row-reverse; gap: 12px; }
.examples time { font: 600 0.875rem/1.9 var(--sans); opacity: 0.7; font-variant-numeric: tabular-nums; }
.examples blockquote { margin: 8px 0 0; font-size: 1.1875rem; line-height: 1.4; }

/* Feature rows */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  margin-top: clamp(48px, 7vw, 96px);
  scroll-margin-top: 24px;
}
.feature--flip .feature__copy { order: 2; }
.feature__copy h3 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); }
.feature__copy p { color: var(--muted); margin-top: 16px; font-size: 1.25rem; }

.ticks { list-style: none; padding: 0; margin: 22px 0 0; font: 500 1rem/1.45 var(--sans); }
.ticks li { position: relative; padding: 9px 0 9px 30px; border-top: 1px solid var(--rule); }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.stage {
  display: flex; justify-content: center; align-items: center; gap: clamp(12px, 2.4vw, 24px);
  padding: clamp(32px, 5vw, 56px) clamp(16px, 3vw, 32px);
  border-radius: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, var(--stage-a), var(--stage-b));
}
.stage .phone { --w: clamp(220px, 58vw, 290px); }
.stage--duo .phone { --w: clamp(124px, 36vw, 212px); }

/* Full feature grid */
.grid {
  list-style: none; padding: 0; margin: clamp(32px, 5vw, 56px) 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px);
}
.grid li { border-top: 1px solid var(--rule); padding: 22px 0 26px; }
.grid h3 { font-size: 1.3125rem; }
.grid p { color: var(--muted); margin-top: 6px; font-size: 1.0625rem; line-height: 1.5; }

/* FAQs */
#faqs h2 { margin-bottom: clamp(24px, 4vw, 40px); }
details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 20px 0; font-weight: 700; font-size: 1.3125rem; line-height: 1.3;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.6rem/1 var(--sans); color: var(--accent); flex: none; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding: 0 40px 24px 0; }
.contact { margin-top: 28px; font: 500 1rem/1.5 var(--sans); color: var(--muted); }

/* Privacy */
.privacy { font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.35; margin-top: 20px; }
.policy { margin-top: 36px; }
.policy h3 { font: 600 1.0625rem/1.4 var(--sans); margin-top: 28px; }
.policy p { color: var(--muted); margin-top: 6px; }
.policy__date { margin-top: 28px; font: 500 0.875rem/1.5 var(--sans); color: var(--muted); }

/* Closing CTA */
.cta { text-align: center; }
.cta__icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px var(--rule), 0 16px 30px -14px rgba(var(--shadow), 0.5); margin-bottom: 28px; }
.cta p { color: var(--muted); font-size: 1.3125rem; margin: 18px auto 32px; max-width: 28em; }

/* Scroll Hope promo: keeps its own dusk palette in light and dark mode */
.promo {
  --ink: #f8f1fb;
  --muted: rgba(248, 241, 251, 0.8);
  --accent: #ecc9f5;
  --rule: rgba(255, 255, 255, 0.18);
  --btn-bg: #ffffff;
  --btn-ink: #2a1a2e;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start;
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(28px, 5vw, 60px);
  border-radius: clamp(24px, 3vw, 36px);
  color: var(--ink);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(214, 140, 214, 0.38) 0%, transparent 60%),
    radial-gradient(70% 90% at 100% 100%, rgba(120, 96, 200, 0.3) 0%, transparent 65%),
    linear-gradient(160deg, #5b3769 0%, #3a2340 55%, #2a1a2e 100%);
  box-shadow: 0 30px 60px -30px rgba(var(--shadow), 0.55);
}
.promo__icon {
  width: clamp(72px, 12vw, 128px); height: auto; border-radius: 22.5%;
  box-shadow: 0 0 0 1px var(--rule), 0 18px 34px -14px rgba(0, 0, 0, 0.6);
}
.promo__lede { color: var(--muted); font-size: 1.3125rem; margin-top: 16px; max-width: 34em; }
.promo__list {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px;
  font: 500 1rem/1.4 var(--sans);
}
.promo__list li { position: relative; padding-left: 22px; }
.promo__list li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.promo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 34px; }
.promo__link { font: 600 1rem var(--sans); color: var(--ink); text-underline-offset: 4px; }
.promo__link:hover { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 28px 36px; font: 500 0.875rem/1.5 var(--sans); color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.legal { margin-top: 14px; font-size: 0.8125rem; opacity: 0.8; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { text-align: center; }
  .lede { margin-inline: auto; }
  .hero__cta, .trust { justify-content: center; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 1.125rem; }
  .nav { display: none; }
  .site-header__inner { justify-content: space-between; }
  .steps, .examples { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 28px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .feature__copy { order: 0; }
  details p { padding-right: 0; }
  .promo { grid-template-columns: minmax(0, 1fr); }
  .promo__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .trust li + li { padding-left: 0; border-left: 0; }
  .site-footer__inner { flex-direction: column; }
}
