/* Suncall's site.
 *
 * Light, as the alarm-app sites people arrive from are, but the palette is the
 * app's own: the amber the sun character glows (Theme.signal) and the blue-black
 * night it glows in (Theme.night), on warm paper rather than flat white.
 *
 * Every colour here has a counterpart in SleepAI/Shared/Theme.swift. When the
 * app's amber moves, move it here too.
 */

:root {
  --paper:      #fbf9f5;
  --paper-2:    #f3efe8;
  --ink:        #16141c;   /* near-black, carrying a trace of the night's violet */
  --ink-soft:   #625f6d;
  --amber:      #ffb063;   /* Theme.signal — fills and the sun, never text on paper */
  --amber-deep: #a4540c;   /* the same hue, dark enough to read on paper */
  --on-amber:   #291405;   /* Theme.onAccent — white on amber is too faint */
  --night:      #090a13;   /* Theme.night — device bezels, the dark card, the footer */
  --hairline:   rgba(22, 20, 28, 0.10);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.wrap-narrow { max-width: 44rem; margin: 0 auto; padding: 0 2rem; }

h1, h2, h3, .wordmark, .step-num {
  font-family: var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ---------- nav ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 249, 245, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner { display: flex; align-items: center; gap: 2rem; height: 68px; }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.wordmark { font-size: 1.25rem; font-weight: 700; }

.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }

/* ---------- buttons ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--amber);
  color: var(--on-amber);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;          /* the app's capsule buttons */
  box-shadow: 0 6px 20px rgba(255, 150, 60, 0.30);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 9px 26px rgba(255, 150, 60, 0.38); }
.cta.small { font-size: 0.9375rem; padding: 0.6rem 1.2rem; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 5rem 0 6rem;
  position: relative;
}

/* the dawn the app's sky warms to, bleeding out behind the phones */
.hero::before {
  content: "";
  position: absolute;
  right: -6%;
  top: 4%;
  width: 62%;
  height: 92%;
  background: radial-gradient(ellipse at 55% 45%,
    rgba(255, 176, 99, 0.34) 0%,
    rgba(255, 176, 99, 0.10) 45%,
    rgba(255, 176, 99, 0) 70%);
  pointer-events: none;
}

.hero-copy { position: relative; }

h1 { font-size: clamp(2.75rem, 5vw, 4rem); line-height: 1.02; font-weight: 800; margin: 0 0 1.25rem; }

.sub { font-size: 1.1875rem; color: var(--ink-soft); max-width: 30rem; margin: 0 0 2rem; }
.price-note { display: block; margin-top: 0.9rem; font-size: 0.875rem; color: var(--ink-soft); }

/* ---------- phones ---------- */

.phones { position: relative; display: flex; justify-content: center; gap: 1.5rem; }

.phone {
  background: var(--night);
  padding: 9px;
  border-radius: 42px;
  box-shadow: 0 24px 60px rgba(22, 20, 28, 0.28), 0 2px 6px rgba(22, 20, 28, 0.16);
  flex: none;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 34px; }

.hero .phone { width: 236px; }
.hero .phone:first-child { transform: rotate(-3deg) translateY(10px); }
.hero .phone:last-child  { transform: rotate(3deg) translateY(-10px); }

/* ---------- sections ---------- */

section { padding: 5.5rem 0; }
.band { background: var(--paper-2); }

.eyebrow {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-deep);
  background: rgba(255, 176, 99, 0.18);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.section-head { text-align: center; max-width: 36rem; margin: 0 auto 3.5rem; }
.section-head h2 { font-size: clamp(1.875rem, 3.4vw, 2.625rem); font-weight: 800; margin: 0 0 0.75rem; line-height: 1.1; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 1.0625rem; }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.step-shot {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 2rem 2rem 0;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.step-shot .phone { width: 190px; margin-bottom: -18px; }

.step-num {
  position: absolute;
  top: 1rem;
  left: 1.15rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-variant-numeric: tabular-nums;
}

.step h3 { font-size: 1.1875rem; font-weight: 700; margin: 1.5rem 0 0.4rem; }
.step p { color: var(--ink-soft); margin: 0; font-size: 0.9375rem; }

/* ---------- features ---------- */

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.feature h3 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 0.4rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.9375rem; }

.feature-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255, 176, 99, 0.20);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.feature-mark svg {
  width: 18px; height: 18px;
  stroke: var(--amber-deep); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- the App Store badge ----------
   Apple's own artwork, from their marketing toolbox. Their guidelines require
   the supplied badge rather than a button of our own, so it is never restyled —
   only sized. */

/* Apple's badge, for when there is a listing to point it at. Until then the
   markup carries .soon instead: Apple's artwork may not advertise an app that
   is not on the store, and a badge linking to "#" is a dead control on the very
   page App Review opens. Swap .soon back for these the day the listing exists. */
.badge { display: inline-block; line-height: 0; transition: transform 0.15s ease; }
.badge img { height: 54px; width: auto; display: block; }
.badge:hover { transform: translateY(-1px); }
.badge.small img { height: 38px; }

/* The stand-in: a capsule the size of the badge it replaces, saying the true
   thing instead. Not a link, because there is nowhere to go. */
.soon {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--amber-deep);
  border-radius: 999px;
  color: var(--amber-deep);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.soon.small { padding: 0.35rem 0.8rem; font-size: 0.8125rem; }

/* ---------- faq ----------
   One question per row, closed until asked for, as Erly's is. <details> does
   the work: it opens without JavaScript and is keyboard-operable already. */

.faq { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }

.faq details {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.35rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }

/* the chevron, drawn from two borders so it needs no asset */
.faq summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }

.faq summary:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: -2px; }

.faq .answer { padding: 0 1.35rem 1.35rem; margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }
.faq .answer + .answer { padding-top: 0.75rem; }

/* ---------- the dark card ---------- */

.support-card {
  background: var(--night);
  color: var(--paper);
  border-radius: 32px;
  padding: 3.5rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.support-card h2 { font-size: 2rem; font-weight: 800; margin: 0 0 0.75rem; color: var(--paper); }
.support-card p { color: #a8a4b4; margin: 0 0 1.75rem; }
.support-side { text-align: center; }
.support-side img { width: 84px; height: 84px; border-radius: 20px; }
.support-side p { font-size: 0.875rem; margin: 1.25rem 0 0; }

/* ---------- inner pages (support, privacy) ---------- */

.page-head { padding: 4.5rem 0 2.5rem; }
.page-head h1 { font-size: clamp(2.25rem, 4vw, 3rem); margin-bottom: 0.75rem; }
.page-head p { color: var(--ink-soft); font-size: 1.125rem; margin: 0; }

.prose { padding-bottom: 5rem; }
.prose h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2rem; }
.prose h3 { font-size: 1.0625rem; font-weight: 700; margin: 1.75rem 0 0.35rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--amber-deep); }

.contact-box {
  background: var(--paper-2);
  border-radius: 24px;
  padding: 2rem;
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.contact-box p { margin: 0; color: var(--ink-soft); }

.updated { font-size: 0.9375rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--hairline); padding: 2.5rem 0; }
.foot-inner { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; font-size: 0.9375rem; color: var(--ink-soft); }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--ink); }
.foot-right { margin-left: auto; display: flex; gap: 1.75rem; }
.foot-brand { font-family: var(--display); font-weight: 700; color: var(--ink); }

/* Anything still to be filled in once the domain is bought. deploy.sh refuses
   to publish while one of these is left on the page. */
.todo { color: var(--amber-deep); border-bottom: 1px dotted var(--amber-deep); }

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- phone and narrow desktop ---------- */

@media (max-width: 900px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 1.25rem; }
  /* "Wake up talking." at the desktop minimum is wider than a phone, so the
     headline scales with the viewport down here rather than holding 2.75rem. */
  h1 { font-size: clamp(2rem, 8.4vw, 3rem); }
  .hero { grid-template-columns: 1fr; text-align: center; padding: 3rem 0 4rem; gap: 2.5rem; }
  .hero::before { right: 0; left: 0; width: 100%; top: 45%; height: 55%; }
  .sub { margin-left: auto; margin-right: auto; }
  /* Two phones plus the gap have to fit inside the smallest phone we care about
     (390 pt, less the wrap's padding), so they scale with the viewport. */
  .phones { gap: 0.75rem; }
  .hero .phone { width: min(160px, 42vw); }
  section { padding: 3.5rem 0; }
  .section-head { margin-bottom: 2.5rem; }
  .steps { grid-template-columns: 1fr; max-width: 24rem; margin: 0 auto; gap: 2.5rem; }
  .features { grid-template-columns: 1fr; gap: 2rem; }
  .faq { grid-template-columns: 1fr; gap: 1.75rem; }
  .support-card { grid-template-columns: 1fr; text-align: center; padding: 2.25rem 1.5rem; }
  .support-card .cta { margin: 0 auto; }
  .nav-links { display: none; }
  .foot-inner { gap: 1rem; }
  .foot-right { margin-left: 0; width: 100%; gap: 1.25rem; }
  .page-head { padding: 3rem 0 2rem; }
}
