/* =========================================================================
   Selene marketing site — selene.onl
   Layout, spacing and proportions matched 1:1 to the reference single-column
   app-landing layout (1000px column, 80px side padding, 120px section rhythm,
   38px/900 section titles, 18px body, #E5E5EA / 32px cards). All artwork is
   proportioned placeholder `.stub` boxes, to be swapped for real screenshots.
   ========================================================================= */

:root {
  --bg: #f2f2f7;
  --ink: #232424;
  --ink-soft: #232424;
  --muted: #8e8e93;
  --card: #e5e5ea;
  --card-soft: #ededf0;
  --line: #d9d9de;
  --green: #00c853;
  --green-deep: #00a745;
  --blue: #007aff;
  --pink: #ff5b8a;
  --stub-border: #c7c7cc;

  --side-padding: 80px;
  --col: 940px;
  --radius: 44px;
  --phone-ar: calc(1350 / 2760); /* iPhone frame aspect (matches img/iphone.png) */

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
@media (max-width: 768px) { :root { --side-padding: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: 500 16px/1.5 var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--col); margin-inline: auto; padding: 0 var(--side-padding) 0; }

/* shared ---------------------------------------------------------------- */
.section-title { font-size: 38px; font-weight: 900; line-height: 115%; letter-spacing: -0.01em; }
.card { background: var(--card); }
.muted { color: var(--muted); }

/* Squircle (iOS-style superellipse) corners are applied to every card at runtime
   by the inline script in index.html, which clip-paths each card to an SVG
   superellipse sized to its current box and border-radius. The border-radius set
   per card is both the radius source for that script and the rounded fallback. */

/* placeholder image stubs ---------------------------------------------- */
.stub {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 11px, rgba(0, 0, 0, 0.018) 11px 22px),
    var(--card-soft);
  border: 2px dashed var(--stub-border);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  aspect-ratio: 16 / 10;
}
.stub::after { content: attr(data-label); }
.stub--phone { aspect-ratio: var(--phone-ar); border-radius: 40px; }
.stub--widget { aspect-ratio: calc(874 / 532); }
.stub--icon { width: 28px; height: 28px; aspect-ratio: 1; border-radius: 8px; font-size: 0; }
.stub--icon::after { content: ""; }
.stub--card-dark { aspect-ratio: calc(874 / 532); }
.stub--on-dark,
.stub--card-dark {
  background:
    repeating-linear-gradient(45deg, transparent 0 11px, rgba(255, 255, 255, 0.04) 11px 22px),
    rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.55);
}

/* App Store badge ------------------------------------------------------- */
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff;
  padding: 10px 18px; border-radius: 12px; width: max-content;
}
.appstore__logo { width: 24px; height: 28px; }
.appstore__text { display: flex; flex-direction: column; line-height: 1.05; }
.appstore__text small { font-size: 10px; font-weight: 500; }
.appstore__text b { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

/* header (height 60, margin-top 30) ------------------------------------- */
.header { height: 60px; display: flex; align-items: center; justify-content: space-between; margin-top: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 900; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  /* Selene mark — soft-gold radar glyph: a reduced-gold centre dot with two
     pale-gold (#f8e9c8) concentric rings. SVG inlined as a data URI so there's
     no extra asset to host. */
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23ecd49a' stroke-width='2'%3E%3Ccircle cx='16' cy='16' r='13'/%3E%3Ccircle cx='16' cy='16' r='8'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='3.5' fill='%23e6c277'/%3E%3C/svg%3E");
  /* Expanding pale-gold "ping" halo — same ~3s cadence as the app's live pulse. */
  box-shadow: 0 0 0 0 rgba(236, 212, 154, 0.6);
  animation: markPulse 3s ease-out infinite;
}
@keyframes markPulse {
  0%   { box-shadow: 0 0 0 0 rgba(236, 212, 154, 0.6); }
  55%  { box-shadow: 0 0 0 13px rgba(236, 212, 154, 0); }
  100% { box-shadow: 0 0 0 13px rgba(236, 212, 154, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .brand__mark { animation: none; }
}
.header__nav { display: flex; gap: 28px; }
.header__nav a { font-size: 18px; font-weight: 500; }
.header__nav a:hover { color: var(--muted); }

/* hero ------------------------------------------------------------------ */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  column-gap: 40px;
  margin-top: 50px;
}
.hero__copy { min-width: 0; }

/* rating badge — hidden for now (kept in markup for later) */
.rating { display: none; }
.rating-shown { width: max-content; text-align: center; color: #16171a; }
.rating__stars { display: flex; gap: 5px; justify-content: center; margin-bottom: 6px; }
.rating__stars svg { width: 18px; height: 18px; color: #16171a; }
.rating__score { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 42px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.laurel { width: 30px; height: 58px; color: #16171a; }
.laurel--r { transform: scaleX(-1); }
.rating__label { font-size: 15px; font-weight: 500; color: var(--ink); margin-top: 4px; }

.hero__title { font-size: 66px; font-weight: 900; line-height: 1.03; letter-spacing: -0.04em; margin-top: 0; }
.hero__lede { font-size: 22px; font-weight: 400; line-height: 1.45; color: #3a3b40; max-width: 30ch; margin-top: 24px; }

.dl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #0c0d10; color: #fff;
  font-size: 20px; font-weight: 700;
  padding: 16px 32px; border-radius: 999px;
  margin-top: 34px;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.dl-btn:hover { transform: translateY(-1px); }
.dl-btn:active { opacity: 0.85; }
.dl-btn svg { width: 20px; height: 24px; }

/* right-align the phone to the content edge so the hero reads horizontally
   centered: text sits on the left column edge, phone on the right column edge,
   making the block symmetric about the page centre. (On ≤900 the hero stacks
   and `justify-items: center` content-sizes this, so the phone stays centred.) */
.hero__art { display: flex; justify-content: flex-end; }
/* iPhone mockup: screenshot layered behind the transparent-screen frame PNG.
   Screen window measured from img/iphone-frame.png (1350×2760, notch-less). */
/* Container is sized to the frame PNG's natural aspect ratio (1350×2760) so the
   frame renders undistorted and the screen percentages map to the same box.
   The frame's true glass cut-out (AR 0.465) already matches the iPhone 17 Pro Max
   screenshots (AR 0.460) within 1%, so the screenshot fills it with no UI
   distortion and only a hairline cover-crop. */
.phone { position: relative; width: 310px; aspect-ratio: 1350 / 2760; max-width: 100%; filter: drop-shadow(0 34px 64px var(--bg)); }
.phone__frame { position: relative; z-index: 2; display: block; width: 100%; height: auto; pointer-events: none; }
.phone__screen {
  /* Positioned to the notch-less frame's glass rectangle, measured from
     iphone-frame.png: left 5.33%, top 2.50%, width 89.26%, height 94.96%. Its glass
     aspect ratio (0.460) matches the iPhone 17 Pro Max screenshots (0.460) exactly,
     so the screenshot fills the glass with no crop and no distortion — and with no
     notch, the screenshot's own status bar / Dynamic Island simply read as the
     screen. Left/width sit exactly on the glass (no horizontal overshoot) so the
     image's rounded corners line up with the frame's inner edge as on a real device;
     only top/bottom overshoot a touch to tuck under the bezel. */
  position: absolute; z-index: 1;
  left: 5.33%; top: 2.1%; width: 89.26%; height: 95.76%;
  object-fit: cover;
  border-radius: 12% / 5.5%;
}

/* steps (340 + 60 gap, margin-top 120; phone spans both rows) ----------- */
.steps {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas: "video title" "video steps";
  column-gap: 40px;
  margin-top: 170px;
  align-items: start;
}
.steps__phone { grid-area: video; align-self: center; }
.steps__title { grid-area: title; line-height: 120%; padding-top: 18px; white-space: nowrap; }
.step-cards { grid-area: steps; display: flex; flex-direction: column; gap: 20px; }
.step-card { display: flex; flex-direction: column; gap: 14px; background: var(--card); border-radius: 26px; padding: 20px 34px 34px 20px; }
.step-icon { width: 28px; height: 28px; color: #16171a; }
.step-card p { font-size: 18px; line-height: 125%; }

/* amounts / channels (margin-top 120) ----------------------------------- */
.amounts { margin-top: 170px; }
.ghost-title { font-size: 68px; font-weight: 900; line-height: 100%; color: var(--muted); margin-bottom: 6px; }
.amounts__head .section-title { line-height: 115%; max-width: 630px; }
.amounts__body {
  display: grid;
  grid-template-columns: auto 310px;
  column-gap: 30px;
  align-items: start;
}
.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, 206px);
  grid-template-rows: repeat(4, 70px);
  column-gap: 18px;
  row-gap: 18px;
  margin-top: 35px;
}
.unit { display: flex; align-items: center; gap: 12px; width: 206px; height: 70px; background: var(--card); padding: 0 20px; border-radius: 22px; font-size: 18px; font-weight: 600; }
.unit-icon { width: 22px; height: 22px; flex: none; color: #16171a; }

/* only the top half of the phone peeks in from the bottom of this section */
.amounts__phone { height: 320px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; margin-top: 35px; }
/* the peek crops to the top of the phone, so anchor the screenshot to its top edge. */
.phone--peek .phone__screen { object-position: top; }

/* customizations (card 32, phone-left, peek-cropped above the chart card) ----- */
.widgets {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  column-gap: 56px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 36px 0 36px;
  margin-top: 170px;
  overflow: clip;
  box-shadow: inset 0 -4px 4px 0 rgba(46, 46, 56, 0.03);
}
/* Phone peeks up from inside the card: visible region runs from the top of the
   frame down through the Appearance section (Theme → Font → Accent → Heartbeat
   glow, ~54% of the screenshot), stopping just above the Chart card. Bottom is
   clipped by the card's rounded bottom edge for the "peeking up" look. */
.widgets__phone { height: 375px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; }
.widgets__phone .phone { width: 340px; flex: none; max-width: 100%; }
.widgets__copy { align-self: center; padding-bottom: 36px; }
.widgets__copy .section-title { margin-bottom: 12px; }
.widgets__copy p { font-size: 20px; font-weight: 500; line-height: 140%; max-width: 320px; }

/* values (3 cols; 8px gap → 254.66×218 cards at the 780px content width) ---- */
.values { margin-top: 170px; }
.values__title { margin-bottom: 24px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 8px; }
.value-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  min-height: 218px;
  background: var(--card); border-radius: 30px; text-align: center;
  padding: 28px 24px;
}
.value-icon { width: 34px; height: 34px; color: #16171a; }
.value-card p { font-size: 16px; font-weight: 500; line-height: 1.4; max-width: 24ch; }

/* dark theme — two phones arranged diagonally on a starfield ------------- */
.dark {
  position: relative;
  height: 440px;
  border-radius: var(--radius);
  margin-top: 170px;
  overflow: clip;
  background:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 28% 64%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 47% 13%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 82% 28%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 91% 70%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 66% 88%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(2px 2px at 38% 84%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(55% 46% at 57% 92%, rgba(86, 150, 214, 0.30) 0%, transparent 62%),
    radial-gradient(120% 95% at 88% 4%, #241f47 0%, transparent 55%),
    radial-gradient(130% 120% at 4% 104%, #102843 0%, transparent 55%),
    #070912;
}
.dark__title, .dark__ofcourse {
  position: absolute; z-index: 3; margin: 0; white-space: nowrap;
  font-size: 46px; font-weight: 900; letter-spacing: -0.02em; line-height: 1;
  color: transparent;
  background: linear-gradient(180deg, #e2eef6 0%, #9fbace 100%);
  -webkit-background-clip: text; background-clip: text;
}
/* each label is centred on its own phone's vertical axis: the title above the
   front phone (centre = left 40 + 320/2 = 200), "Of Course" below the back phone
   (centre = right 44 + 320/2 = 204 from the right edge). */
.dark__title   { top: 40px; left: 200px; transform: translateX(-50%); }
.dark__ofcourse { bottom: 65px; right: 204px; transform: translateX(50%); }

/* phones partially clipped by the section's rounded edges */
.dark__phone { position: absolute; width: 320px; max-width: 72%; filter: drop-shadow(0 26px 56px rgba(0, 0, 0, 0.6)); }
.dark__phone--front { left: 40px; top: 118px; z-index: 2; }   /* 6.png — top of screen visible */
.dark__phone--back  { right: 44px; bottom: 150px; z-index: 1; } /* 7.png — bottom of screen visible */

/* roadmap (3 cols, column-gap 30, row-gap 20, faded bottom) ------------- */
.roadmap { margin-top: 170px; }
.roadmap .section-title { margin-bottom: 24px; }
.roadmap__cols {
  display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 30px;
  -webkit-mask-image: linear-gradient(360deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%);
  mask-image: linear-gradient(360deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%);
}
.roadmap ul { list-style: none; padding: 0; }
.roadmap li { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 16px; font-weight: 400; }
.roadmap li::before {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 1px solid var(--card);
}
.roadmap li.done::before { content: "✓"; display: grid; place-items: center; background: #d1d1d6; color: #fff; font-size: 14px; font-weight: 700; }

/* download bottom (margin-top 120, centered) ---------------------------- */
.download { display: flex; justify-content: center; margin-top: 110px; }

/* questions (margin-top 120, gap 30) ------------------------------------ */
.questions { margin-top: 170px; }
.questions .section-title { margin-bottom: 24px; }
.qa { margin-bottom: 30px; }
.qa h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.qa p { font-size: 18px; font-weight: 400; max-width: 70ch; }
.questions__ask { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 18px; font-weight: 400; }
.ask-icon { width: 16px; height: auto; display: block; }

/* footer (card, top radius 32, padding 48 38 40 38, margin-top 100) ----- */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--card);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding: 48px 38px 40px 38px;
  margin-top: 100px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__links a { font-size: 14px; font-weight: 600; color: var(--muted); }
.footer__links a:hover { color: var(--ink); }
.footer__credit { font-size: 14px; font-weight: 400; color: var(--muted); text-align: end; }

/* legal / privacy page (readable single prose column) ------------------- */
.legal { max-width: 720px; margin: 60px auto 0; }
.legal__title { font-size: 48px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
.legal h2 { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin-top: 40px; }
.legal p { font-size: 18px; line-height: 1.6; color: #3a3b40; margin-top: 14px; }
.legal a { color: var(--blue); }
.legal a:hover { text-decoration: underline; }
.legal__back { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; margin-top: 48px; }

/* sticky footer: on short legal pages the page fills the viewport and the
   footer is pushed to the bottom instead of floating mid-screen. */
.legal-page { display: flex; flex-direction: column; min-height: 100vh; }
.legal-page .wrap { flex: 1 0 auto; display: flex; flex-direction: column; }
.legal-page .footer { margin-top: auto; }

/* ===================== responsive ===================== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 44px; margin-top: 30px; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; }
  .hero__title { font-size: 64px; }
  .hero__lede { max-width: 42ch; }
  .iphone { width: 320px; }
  .steps {
    grid-template-columns: 1fr; row-gap: 0; justify-items: center;
    grid-template-areas: "title" "video" "steps";
  }
  .steps__title { text-align: center; margin-bottom: 30px; padding-top: 0; white-space: normal; }
  .step-cards { width: 100%; margin-top: 30px; }
  .amounts__body { grid-template-columns: 1fr; justify-items: center; row-gap: 30px; }
  .amounts__phone { order: -1; }
  .unit-grid { margin-top: 30px; grid-template-columns: repeat(2, minmax(0, 206px)); grid-template-rows: repeat(4, 60px); column-gap: 18px; row-gap: 16px; }
  .unit { width: 100%; height: 60px; font-size: 16px; padding: 0 16px; }
  .amounts__phone { margin-top: 0; }
  .widgets { grid-template-columns: 1fr; row-gap: 24px; justify-items: center; text-align: center; }
  /* full-width column so the phone's max-width:100% caps it to the card (the
     stacked grid is centre-justified, which would otherwise let it overflow). */
  .widgets__phone { width: 100%; }
  .widgets__copy .description, .widgets__copy p { max-width: 260px; }
  .values__title { text-align: left; }
  .value-grid { column-gap: 24px; }
  .value-card { padding: 22px 18px 24px 18px; }
  .dark { height: 380px; }
  .dark__title, .dark__ofcourse { font-size: 38px; }
  .dark__title { top: 32px; left: 156px; }       /* front centre: 24 + 264/2 */
  .dark__ofcourse { bottom: 32px; right: 160px; } /* back centre: 28 + 264/2 */
  .dark__phone { width: 264px; }
  .dark__phone--front { left: 24px; top: 104px; }
  .dark__phone--back { right: 28px; bottom: 120px; }
}
@media (max-width: 600px) {
  .hero__title { font-size: 48px; }
  .ghost-title { font-size: 54px; }
  .legal__title { font-size: 36px; }
  .value-grid, .roadmap__cols { grid-template-columns: 1fr; row-gap: 24px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 30px; }
  .footer__links { flex-direction: column; gap: 10px; }
  /* narrow phones: cap the phone to a fixed width so it never overflows the card,
     and match the crop height so it still stops just above the chart card. */
  .widgets__phone { height: 266px; }
  .widgets__phone .phone { width: 240px; }
  .dark { height: 304px; }
  .dark__title, .dark__ofcourse { font-size: 27px; }
  .dark__title { top: 18px; left: 103px; }        /* front centre: 12 + 182/2 */
  .dark__ofcourse { bottom: 18px; right: 105px; } /* back centre: 14 + 182/2 */
  .dark__phone { width: 182px; }
  .dark__phone--front { left: 12px; top: 74px; }
  .dark__phone--back { right: 14px; bottom: 92px; }
}

/* ===================== dark mode (system theme, no toggle) =====================
   The site follows the OS appearance via `prefers-color-scheme` — there is no
   in-page switch. When the system is dark these overrides apply automatically.
   Most surfaces (cards, footer, units, value/step cards, headings) already read
   from the --bg / --ink / --muted / --card variables, so simply re-pointing
   those recolours the whole page for free. The selector rules below only restate
   the handful of places that hard-coded a light-mode colour: the near-black
   monochrome glyphs, the dark download pill, the fixed grey body prose, and the
   roadmap bullets. Dark screenshots are swapped in the markup via
   <picture> + a `(prefers-color-scheme: dark)` <source> (img/dark/*). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0c;
    --ink: #f5f5f7;
    --ink-soft: #f5f5f7;
    --muted: #8e8e93;
    --card: #1c1c1e;
    --card-soft: #2c2c2e;
    --line: #38383a;
    --blue: #0a84ff;
    --stub-border: #48484a;
  }

  /* Body prose that hard-coded a dark grey → lift to a soft light grey so it
     stays readable (but quieter than the white headings) on the dark bg. */
  .hero__lede,
  .legal p { color: #aeb0b8; }

  /* Primary download pill — invert so a light button reads on the dark page
     instead of a near-black button vanishing into it. */
  .dl-btn { background: #f5f5f7; color: #0c0d10; }

  /* App Store badge keeps its black chip but gains a hairline so its edge is
     still defined against the dark background. */
  .appstore { border: 1px solid var(--line); }

  /* Monochrome glyphs that baked in a near-black ink (#16171a) → flip to the
     light ink token so they don't disappear. */
  .rating-shown,
  .rating__stars svg,
  .laurel,
  .step-icon,
  .unit-icon,
  .value-icon { color: var(--ink); }

  /* Roadmap bullets — the empty circle was pure white and the done-check a
     light grey; recolour both so they sit calmly on the dark cards. */
  .roadmap li::before { background: var(--card-soft); border-color: var(--line); }
  .roadmap li.done::before { background: #48484a; color: #fff; }
}
