/* Feels Like Weather — feelslikeweather.app landing page.
   One continuous dusk sky, the app's own gradient (SkyPreset.warmDay), its glass cards,
   its comfort-colour ramp, and Instrument Serif italic for accents only. */

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  /* the app's warm-dusk sky, top → bottom */
  --peach:    #F6B98A;
  --coral:    #E78A6B;
  --plum:     #7E5C8E;
  --midnight: #2E3563;
  --deep:     #171634;
  --night:    #0E0D22;

  --cream: #FFF6EC;
  --sub:   rgba(255, 246, 236, 0.82);
  --faint: rgba(255, 246, 236, 0.68);

  --glass:      rgba(255, 243, 228, 0.13);
  --glass-edge: rgba(255, 255, 255, 0.26);

  /* Ramp.comfortColor */
  --good: #4ECF73;
  --mint: #9BE3C9;
  --amber: #F6CB6F;
  --orange: #F08F58;
  --red: #E25E5C;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
/* The root needs its own background, otherwise the body's gradient is propagated to the
   canvas and sized to the viewport instead of running the length of the document. */
html { scroll-behavior: smooth; background: var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  position: relative;
  color: var(--cream);
  font: 400 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* No background here on purpose: the body box paints after negative-z children, so any
     colour here would cover .sky. The night fallback lives on <html>. */
}

/* The page IS the sky: one gradient the whole document long. A real element rather than a
   body background, so its height is unambiguously the document's, not the viewport's. */
.sky {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg,
      var(--peach)     0%,
      var(--coral)     5%,
      #C4707C         11%,
      var(--plum)     19%,
      #6A5490         31%,
      #4C4680         46%,
      var(--midnight) 61%,
      var(--deep)     80%,
      var(--night)   100%);
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Soft light blooms: the only thing that breaks the flat gradient ── */
.bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.bloom-warm   { top: -14vh;  left: 50%; width: min(1100px, 130vw); aspect-ratio: 1.5;
                transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,214,164,.85), transparent 70%); }
.bloom-green  { top: 8%;  left: -12%; width: min(620px, 80vw); aspect-ratio: 1;
                background: radial-gradient(closest-side, rgba(78,207,115,.30), transparent 70%); opacity: .55; }
.bloom-violet { top: 4%;  right: -14%; width: min(720px, 90vw); aspect-ratio: 1;
                background: radial-gradient(closest-side, rgba(168,132,224,.38), transparent 70%); }

/* ───────────────────────────── Nav ───────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: linear-gradient(180deg, rgba(120,70,70,.22), rgba(120,70,70,0));
}
.nav-in {
  max-width: var(--wrap); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-mark { font-size: 26px; text-decoration: none; line-height: 1; letter-spacing: .01em; }
.nav-links { display: flex; gap: 22px; font-size: 14.5px; }
.nav-links a { color: var(--sub); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--cream); }
@media (max-width: 620px) { .nav-links a:not(:last-child) { display: none; } }

/* ───────────────────────────── Hero ───────────────────────────── */
.hero { position: relative; padding: clamp(34px, 7vw, 76px) 0 clamp(60px, 9vw, 120px); text-align: center; }
.hero-in { position: relative; z-index: 1; }
.wordmark {
  font-size: clamp(34px, 6.4vw, 56px);
  line-height: 1; margin: 0 0 10px; letter-spacing: .01em;
  text-shadow: 0 2px 30px rgba(60, 24, 40, .28);
}
h1 {
  font-size: clamp(42px, 8.4vw, 82px);
  line-height: 1.02; letter-spacing: -0.028em; font-weight: 700;
  margin: 0 auto 20px; max-width: 15ch; text-wrap: balance;
  text-shadow: 0 1px 16px rgba(52, 20, 38, .22);
}
.lede {
  font-size: clamp(16.5px, 1.9vw, 19px);
  color: var(--sub); margin: 0 auto; max-width: 54ch; text-wrap: pretty;
}
.hero .lede { max-width: 50ch; }
.fineprint { font-size: 13.5px; color: rgba(255, 246, 236, .68); margin: 14px 0 0; letter-spacing: .01em; }

.pill {
  display: inline-block; margin-top: 26px;
  padding: 13px 26px; border-radius: 999px;
  border: 1.5px solid rgba(255, 246, 236, .55);
  background: rgba(255, 246, 236, .07);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 15px; font-weight: 600; letter-spacing: .012em;
  position: relative; overflow: hidden;
}
.pill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.42) 50%, transparent 62%);
  transform: translateX(-140%);
  animation: sheen 5.5s ease-in-out 1.4s infinite;
}
@keyframes sheen { 0%, 62% { transform: translateX(-140%); } 88%, 100% { transform: translateX(140%); } }

.hero-phone { margin: clamp(38px, 6vw, 66px) auto 0; width: min(330px, 76vw); }

/* ── The floating screenshot ── */
.screen {
  position: relative;
  border-radius: 8.5%/4%;
  box-shadow:
    0 2px 0 rgba(255,255,255,.16) inset,
    0 30px 70px -24px rgba(12, 8, 30, .75),
    0 90px 120px -60px rgba(12, 8, 30, .6);
}
.screen img { border-radius: inherit; }
.screen::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset;
}
.float { animation: float 8s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ───────────────────────── Sections ───────────────────────── */
.sec { position: relative; padding: clamp(62px, 8.5vw, 108px) 0; scroll-margin-top: 64px; }
.sec > .wrap { position: relative; z-index: 1; }
.sec-head { text-align: center; margin: 0 auto clamp(34px, 5vw, 58px); max-width: 720px; }
.kicker { font-size: clamp(20px, 3vw, 27px); color: var(--sub); margin: 0 0 8px; line-height: 1; }
h2 {
  font-size: clamp(31px, 5vw, 50px); line-height: 1.06; letter-spacing: -0.026em;
  font-weight: 700; margin: 0 0 16px; text-wrap: balance;
}
h3 { font-size: 18px; font-weight: 650; margin: 0 0 7px; letter-spacing: -0.008em; }

.split { display: grid; grid-template-columns: 1fr minmax(0, 340px); gap: clamp(28px, 5vw, 64px); align-items: start; }
.split-rev { grid-template-columns: minmax(0, 340px) 1fr; }
.col { min-width: 0; }
.col-phone { position: sticky; top: 84px; }
@media (max-width: 880px) {
  .split, .split-rev { grid-template-columns: 1fr; }
  .col-phone { position: static; width: min(320px, 78vw); margin: 8px auto 0; order: 2; }
  .split-rev .col-phone { order: 2; }
}

/* ── Glass card (the app's GlassCard) ── */
.card {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 0.5px solid var(--glass-edge);
  border-radius: 24px;
  box-shadow: 0 14px 40px -18px rgba(10, 6, 26, .55);
  position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 42%);
  mask-image: linear-gradient(180deg, #000, transparent 55%);
  opacity: .7;
}

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin: 30px 0 10px;
}
.eyebrow.flush { margin-top: 0; }

/* ── Score ring ── */
.score-card { padding: 30px 24px 26px; text-align: center; }
@media (min-width: 700px) {
  .score-card {
    display: flex; align-items: center; gap: 28px; text-align: left;
    padding: 28px 32px;
  }
  .score-card .ring-row { flex: none; margin: 0; }
  .score-card .score-say { min-width: 0; }
  .score-label { margin-top: 0; }
}
.ring-row { position: relative; width: 128px; margin: 0 auto; }
.ring-row.small { width: 92px; }
.ring { width: 100%; height: auto; display: block; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 9; }
.ring-arc {
  fill: none; stroke: var(--good); stroke-width: 9; stroke-linecap: round;
  /* Drawn at 95% by default so a script-less page still reads 10/10; the script empties
     it first (below) and animates it back up on reveal. */
  stroke-dasharray: 339.29; stroke-dashoffset: 16.96;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--good) 55%, transparent));
  transition: stroke .45s ease, stroke-dashoffset .7s cubic-bezier(.22,.9,.32,1);
}
.js .ring-arc { stroke-dashoffset: 339.29; }
.ring-num {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1;
}
.ring-val { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-row.small .ring-val { font-size: 30px; }
.ring-den { font-size: 12.5px; color: var(--faint); margin-top: 3px; }
.score-label { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin: 16px 0 4px; }
.score-sub { color: var(--sub); font-size: 15.5px; margin: 0; }

/* ── Factor rows ── */
.factors { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.factor { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-radius: 18px; }
.fx-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--good);
          box-shadow: 0 0 10px color-mix(in srgb, var(--good) 65%, transparent); }
.fx-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.fx-body b { font-weight: 600; font-size: 16px; }
.fx-body span { color: var(--sub); font-size: 14.5px; }
.fx-arrow { font-size: 19px; color: var(--good); flex: none; }

/* ── The 1–10 ladder ── */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ladder li {
  display: grid; grid-template-columns: 20px auto 1fr auto; align-items: center; gap: 12px;
  padding: 11px 16px; border-radius: 15px;
  background: rgba(255, 246, 236, .06);
  border: 0.5px solid rgba(255,255,255,.12);
}
.ladder i { width: 20px; height: 20px; border-radius: 7px; background: var(--c); display: block; }
.ladder b { font-weight: 600; font-size: 15.5px; }
.ladder span { color: var(--sub); font-size: 14px; min-width: 0; }
.ladder em { font-style: normal; color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .ladder li { grid-template-columns: 18px 1fr auto; }
  .ladder span { display: none; }
}

/* ── 24-hour strip ── */
.strip-card { margin-top: clamp(30px, 5vw, 52px); padding: 24px 24px 20px; }
.strip-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.strip-note { color: var(--faint); font-size: 13.5px; margin: 0 0 14px; }
/* The strip's bars are built by the script, so it only exists when scripting does. */
.strip, .strip-axis { display: none; }
.js .strip { display: flex; align-items: flex-end; gap: clamp(3px, 0.9vw, 8px); height: 132px; }
.js .strip-axis { display: flex; }
.strip .bar {
  flex: 1; border-radius: 5px 5px 3px 3px; background: var(--c);
  height: 6px; transform-origin: bottom;
  transition: height .8s cubic-bezier(.22,.9,.32,1);
  opacity: .72;
}
.strip .bar.best { opacity: 1; box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.strip-axis {
  justify-content: space-between; margin-top: 9px;
  font-size: 12px; color: var(--faint); letter-spacing: .04em;
}
.best-chip {
  display: inline-block; margin: 16px 0 0; padding: 8px 15px; border-radius: 999px;
  background: rgba(78, 207, 115, .16); border: 0.5px solid rgba(78, 207, 115, .45);
  font-size: 14px; color: #C9F5D6;
}
.best-chip b { color: #EAFFF0; }

/* ───────────────────── Interactive quiz demo ───────────────────── */
.demo { padding: 26px 24px 28px; }
.demo-q { font-size: clamp(19px, 2.4vw, 23px); font-weight: 650; letter-spacing: -0.018em; margin: 4px 0 18px; }
.opts { display: grid; gap: 9px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--cream);
  padding: 15px 18px; border-radius: 16px;
  background: rgba(255, 246, 236, .07);
  border: 1px solid rgba(255,255,255,.14);
  transition: background .2s, border-color .25s, transform .12s;
}
.opt:hover { background: rgba(255, 246, 236, .12); }
.opt:active { transform: scale(.988); }
.opt i {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 1.5px solid rgba(255,255,255,.35);
  display: grid; place-items: center;
  transition: background .25s, border-color .25s;
}
.opt i::after {
  content: ""; width: 11px; height: 6px; border-left: 2px solid #10331C; border-bottom: 2px solid #10331C;
  transform: rotate(-45deg) scale(0); transform-origin: center; transition: transform .22s cubic-bezier(.3,1.5,.5,1);
  margin-top: -2px;
}
.opt.is-on { border-color: rgba(78, 207, 115, .85); background: rgba(78, 207, 115, .13); }
.opt.is-on i { background: var(--good); border-color: var(--good); }
.opt.is-on i::after { transform: rotate(-45deg) scale(1); }
.opt:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

.demo-out { margin-top: 22px; }
.shift-chip {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 16px;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 246, 236, .08); border: 0.5px solid rgba(255,255,255,.15);
}
.shift-chip b { font-size: 16px; font-weight: 650; }
.shift-chip span { color: var(--sub); font-size: 14.5px; }

.reads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 560px) { .reads { grid-template-columns: 1fr; } }
.read {
  padding: 14px 16px; border-radius: 15px;
  background: rgba(255, 246, 236, .06); border: 0.5px solid rgba(255,255,255,.12);
}
.read-k { display: block; font-size: 12.5px; color: var(--faint); letter-spacing: .02em; }
.read-v {
  display: block; margin-top: 4px; font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}

.mini { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
@media (max-width: 460px) { .mini { flex-direction: column; text-align: center; gap: 14px; } }
.mini-copy { margin: 0; font-size: 15.5px; }
.mini-copy b { font-weight: 650; }
.mini-copy span { display: block; margin-top: 6px; color: var(--faint); font-size: 13.5px; line-height: 1.5; }

/* ───────────────────── Thermometer ───────────────────── */
.thermo-card { padding: 26px 24px 22px; }
.thermo { position: relative; display: grid; grid-template-columns: 46px 60px 1fr; align-items: stretch; height: 420px; }
.thermo-bar { width: 60px; height: 420px; grid-column: 2; grid-row: 1; }
.thermo-ticks { position: relative; grid-column: 1; grid-row: 1; }
.thermo-ticks span {
  position: absolute; right: 8px; font-size: 12.5px; color: var(--faint);
  font-variant-numeric: tabular-nums;
  /* 20°..100° maps to the bar's 10..410 range */
  top: calc(10px + (100 - var(--p)) * 5px); transform: translateY(-50%);
}
/* Ideal-range band, laid over the ramp in the same grid cell */
.thermo-band { grid-column: 2; grid-row: 1; position: relative; pointer-events: none; }
.thermo-band span {
  position: absolute; left: 16px; right: 16px; display: block;
  background: rgba(255, 255, 255, .16);
  border-top: 2px solid rgba(255,255,255,.8);
  border-bottom: 2px solid rgba(255,255,255,.8);
  transition: top .55s cubic-bezier(.22,.9,.32,1), height .55s cubic-bezier(.22,.9,.32,1);
}

.thermo-marks { position: relative; grid-column: 3; grid-row: 1; }
.mark {
  position: absolute; left: 0; right: 0; padding-left: 18px;
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
  transform: translateY(-50%);
  transition: top .55s cubic-bezier(.22,.9,.32,1);
}
/* Keep marks on one line at every width: stacking them makes the 8° gap between
   "t-shirt weather" and "layer on" too tight and they collide. */
@media (max-width: 560px) {
  .thermo { grid-template-columns: 40px 60px 1fr; }
  .mark { padding-left: 15px; }
  .mark b { font-size: 13.5px; }
  .mark span { font-size: 13px; }
}
.mark::before {
  content: ""; position: absolute; left: -8px; top: 50%; width: 20px; height: 2px;
  background: rgba(255,255,255,.4); transform: translateY(-50%);
}
.mark::after {
  content: ""; position: absolute; left: -14px; top: 50%; width: 11px; height: 11px;
  border-radius: 50%; background: var(--cream); transform: translate(0, -50%);
  box-shadow: 0 0 0 3px rgba(20, 14, 40, .35);
}
.mark b { font-size: 15px; font-weight: 650; }
.mark span { color: var(--sub); font-size: 14px; }
.mark em, .thermo-note em { font-style: normal; color: var(--cream); font-weight: 650; font-variant-numeric: tabular-nums; }
.thermo-note { color: var(--faint); font-size: 13.5px; margin: 20px 0 0; line-height: 1.55; }

/* ───────────────────── Features + closer ───────────────────── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.feature { padding: 26px 24px; }
.feature p { margin: 0; color: var(--sub); font-size: 15.5px; }
.closer { text-align: center; margin: clamp(48px, 8vw, 88px) 0 0; }
.closer-mark { display: block; font-size: clamp(30px, 5vw, 44px); line-height: 1; margin-bottom: 6px; }

/* ───────────────────────── Footer ───────────────────────── */
footer {
  border-top: 1px solid rgba(255,255,255,.11);
  padding: 30px 0 52px; text-align: center;
  font-size: 13.5px; color: var(--faint);
}
footer nav { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
footer nav a { color: var(--sub); text-decoration: none; }
footer nav a:hover { color: var(--cream); text-decoration: underline; }
.credits { max-width: 74ch; margin: 0 auto; line-height: 1.6; }

/* ───────────────────────── Reveals ───────────────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.9,.32,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.d1 { transition-delay: .07s; } .d2 { transition-delay: .14s; }
.d3 { transition-delay: .21s; } .d4 { transition-delay: .28s; } .d5 { transition-delay: .34s; }
.factors .reveal:nth-child(2) { transition-delay: .08s; }
.ladder .reveal:nth-child(2) { transition-delay: .05s; }
.ladder .reveal:nth-child(3) { transition-delay: .10s; }
.ladder .reveal:nth-child(4) { transition-delay: .15s; }
.ladder .reveal:nth-child(5) { transition-delay: .20s; }
.features .reveal:nth-child(2) { transition-delay: .09s; }
.features .reveal:nth-child(3) { transition-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .float, .pill::after { animation: none; }
  .ring-arc, .strip .bar, .mark, .opt, .thermo-band span { transition: none; }
}
