/* ============================================================
   MeteoWave — meteowave.com
   Static, no build step, no framework.

   The page is one day: scroll drives a single sky (see js/sky.js),
   and the content sits on it as small precise instrument panels.
   Sky carries the feeling; panels carry the data. That contrast is
   the design.
   ============================================================ */

/* --- Fonts -------------------------------------------------- */
/* Righteous is the app's own wordmark face — used only for the
   wordmark and the big temperature figures. Manrope carries
   everything else. */
@font-face {
  font-family: 'Righteous';
  src: url('../fonts/righteous-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-var-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}

/* --- Tokens ------------------------------------------------- */
:root {
  /* Sampled from the app icon: charcoal ground, orange sun,
     cornflower cloud, warm bolt. */
  --ink-0: #05070E;
  --ink-1: #0B1018;
  --paper: #EAF1FA;
  --mute: #AFBDCE;
  --mute-dim: #8494A8;

  --sun-1: #FFB43D;
  --sun-2: #FF7A1A;
  --cloud-blue: #6FA8F5;
  --bolt: #F5D46A;

  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --glass: rgba(8, 12, 21, 0.66);
  --glass-strong: rgba(6, 10, 18, 0.84);

  /* Driven live by js/sky.js */
  --sky-top: #05070E;
  --sky-bot: #131A2C;
  --sun-x: 12vw;
  --sun-y: 88vh;
  --sun-op: 0;
  --cloud-op: 0.1;
  --storm: 0;

  --measure: 68ch;
  --gap: clamp(1rem, 2.4vw, 1.9rem);
  --pad-x: clamp(1.15rem, 5vw, 3.5rem);
  --section-y: clamp(5.5rem, 13vh, 10rem);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Clears the fixed header when jumping to an anchor. */
  scroll-padding-top: 82px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--paper);
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--sun-1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Type --------------------------------------------------- */
h1, h2, h3 { margin: 0; line-height: 1.08; font-weight: 800; letter-spacing: -0.022em; }
h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.32rem); letter-spacing: -0.012em; }
p { margin: 0; }

.wordmark {
  font-family: 'Righteous', 'Manrope', sans-serif;
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* An eyebrow labels the atmosphere the section sits in — it names a
   real state of the sky, not an arbitrary number. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1.15rem;
}
.eyebrow::before {
  content: '';
  width: 1.9rem;
  height: 1px;
  background: linear-gradient(90deg, var(--sun-1), transparent);
}

.lede {
  color: var(--mute);
  font-size: clamp(1.02rem, 1.55vw, 1.2rem);
  max-width: 46ch;
  margin-top: 1.15rem;
}

/* ============================================================
   The sky
   ============================================================ */
.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 100%);
}

/* The sun is one object that climbs, crosses and sets across the
   whole document. */
.sun {
  position: absolute;
  left: var(--sun-x);
  top: var(--sun-y);
  width: clamp(150px, 24vw, 300px);
  aspect-ratio: 1;
  margin: -12vh 0 0 -6vw;
  border-radius: 50%;
  opacity: var(--sun-op);
  background: radial-gradient(circle at 50% 50%,
    #FFF3D4 0%, var(--sun-1) 34%, var(--sun-2) 56%, rgba(255, 122, 26, 0) 70%);
  filter: blur(2px);
}
.sun::after {
  content: '';
  position: absolute;
  inset: -120%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 160, 50, 0.22) 0%, rgba(255, 140, 40, 0.08) 38%, transparent 66%);
}

/* Two cloud bands drifting at different speeds. Pure CSS gradients —
   no image, no cost. */
.clouds {
  position: absolute;
  inset: 0;
  opacity: var(--cloud-op);
  transition: opacity 0.5s linear;
}
.clouds span {
  position: absolute;
  left: -50%;
  width: 200%;
  height: 60%;
  background:
    radial-gradient(60% 80% at 18% 55%, rgba(198, 212, 230, 0.34), transparent 70%),
    radial-gradient(48% 70% at 44% 42%, rgba(176, 192, 214, 0.30), transparent 72%),
    radial-gradient(66% 86% at 74% 58%, rgba(206, 218, 234, 0.26), transparent 70%);
  filter: blur(14px);
}
.clouds span:nth-child(1) { top: 4%;  animation: drift 132s linear infinite; }
.clouds span:nth-child(2) { top: 26%; opacity: 0.66; animation: drift 197s linear infinite reverse; }
@keyframes drift {
  from { transform: translate3d(-8%, 0, 0); }
  to   { transform: translate3d(8%, 0, 0); }
}

/* Keeps text legible no matter how bright the sky gets mid-arc, and holds
   the whole page at the app's cinematic darkness. Colour still reads
   through; brightness does not. */
.sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 6, 12, 0.78) 0%, rgba(4, 6, 12, 0.1) 30%, rgba(4, 6, 12, 0.1) 68%, rgba(4, 6, 12, 0.72) 100%),
    rgba(4, 6, 12, 0.34);
}

#sky-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   Layout
   ============================================================ */
.wrap {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
section { padding-block: var(--section-y); position: relative; }

/* ============================================================
   Header
   ============================================================ */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.7), rgba(5, 7, 14, 0.28));
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-head.is-stuck { border-bottom-color: var(--line-soft); }
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-family: 'Righteous', sans-serif; font-size: 1.12rem; letter-spacing: 0.01em; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mute);
  transition: color 0.2s;
}
.nav a:hover { color: var(--paper); }
@media (max-width: 720px) { .nav { display: none; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.32rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; flex: none; fill: currentColor; }
.btn-primary {
  background: linear-gradient(135deg, var(--sun-1), var(--sun-2));
  border-color: transparent;
  color: #1A0E02;
}
.btn-primary:hover { background: linear-gradient(135deg, #FFC155, #FF8A2B); }
.btn-ghost { background: transparent; }

.store-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(7rem, 17vh, 11rem); padding-bottom: clamp(4rem, 9vh, 7rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 .line { display: block; }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--sun-1), var(--sun-2) 60%, var(--bolt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The app, with the live web reading laid over it — both halves of the
   claim in one image. */
.hero-stage { position: relative; padding-bottom: 2.5rem; }
.hero-phone { margin-left: auto; margin-right: 0; width: min(258px, 60vw); }
.hero-stage .live-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(300px, 76%);
}
@media (max-width: 900px) {
  .hero-stage {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 2rem;
    padding-bottom: 0;
  }
  .hero-phone { margin-inline: auto; }
  .hero-stage .live-card { position: static; width: min(400px, 100%); }
}

/* The live card. This is the proof: a real reading from the same API
   the apps call, rendered with the app's own icon and wording. */
.live-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  max-width: 400px;
}
.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--mute);
}
.pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sun-1);
}
.pulse::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blip 2.4s ease-in-out infinite;
}
@keyframes blip {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.live-body { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.1rem; }
.live-body img { width: 74px; height: 74px; flex: none; }
.live-temp {
  font-family: 'Righteous', sans-serif;
  font-size: clamp(3.5rem, 9vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.live-temp sup { font-size: 0.36em; vertical-align: super; margin-left: 0.05em; }
.live-cond { font-weight: 700; font-size: 1.02rem; }
.live-meta { color: var(--mute); font-size: 0.83rem; margin-top: 0.2rem; }

.live-card.is-loading .live-temp,
.live-card.is-loading .live-cond { opacity: 0.35; }
.live-card.is-offline { border-color: rgba(255, 255, 255, 0.08); }
.live-card.is-offline .live-cond { color: var(--mute); font-weight: 600; }

.geo-btn {
  margin-top: 1.25rem;
  width: 100%;
  justify-content: center;
  font-size: 0.82rem;
  padding-block: 0.6rem;
}
.live-note { color: var(--mute-dim); font-size: 0.74rem; margin-top: 0.8rem; text-align: center; }

/* ============================================================
   Section shells
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
}

/* ============================================================
   Phone frames — real screenshots, no mockup chrome beyond a bezel
   ============================================================ */
.phone {
  position: relative;
  width: min(280px, 74vw);
  margin-inline: auto;
  border-radius: 34px;
  padding: 9px;
  background: linear-gradient(160deg, #2C3340, #0D1119 60%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -28px rgba(0, 0, 0, 0.85);
}
.phone img { border-radius: 26px; width: 100%; }
.phone-pair { display: flex; gap: clamp(0.7rem, 2vw, 1.4rem); justify-content: center; }
.phone-pair .phone:nth-child(1) { transform: rotate(-3deg) translateY(10px); width: min(230px, 42vw); }
.phone-pair .phone:nth-child(2) { transform: rotate(3deg); width: min(230px, 42vw); }

/* ============================================================
   Feature list — no numbers; these are parallel, not sequential
   ============================================================ */
.feat-list { display: grid; gap: 1.6rem; margin-top: 2.2rem; }
.feat { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.feat img { width: 34px; height: 34px; }
.feat h3 { margin-bottom: 0.28rem; }
.feat p { color: var(--mute); font-size: 0.95rem; }

/* ============================================================
   Live world band
   ============================================================ */
.city-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
  margin-top: 2.6rem;
}
@media (max-width: 1080px) { .city-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .city-grid { grid-template-columns: repeat(2, 1fr); } }
.city {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1.15rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.32s var(--ease), border-color 0.32s, background 0.32s;
  width: 100%;
}
.city:hover, .city.is-active {
  transform: translateY(-4px);
  border-color: rgba(255, 180, 61, 0.5);
  background: var(--glass-strong);
}
.city-name {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--mute);
}
.city-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.55rem; }
.city-row img { width: 42px; height: 42px; }
.city-temp { font-family: 'Righteous', sans-serif; font-size: 2.1rem; line-height: 1; }
.city-temp sup { font-size: 0.4em; vertical-align: super; }
.city-cond { font-size: 0.85rem; font-weight: 600; margin-top: 0.5rem; }
.city-meta { font-size: 0.74rem; color: var(--mute-dim); margin-top: 0.15rem; }
.city.is-loading .city-temp, .city.is-loading .city-cond { opacity: 0.3; }

.band-hint {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--mute-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   Metric strip — the data the app actually shows
   ============================================================ */
/* Column count is set per instance so the last row always fills — a
   half-empty grid cell reads as a mistake. */
.metrics {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 1px;
  margin-top: 2.6rem;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: var(--glass-strong);
  padding: 1.15rem 1rem;
}
.metric dt {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute-dim);
  font-weight: 700;
}
.metric dd { margin: 0.4rem 0 0; font-size: 0.94rem; font-weight: 600; }

/* ============================================================
   Premium / AI cards
   ============================================================ */
.card {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(1.5rem, 3.4vw, 2.4rem);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 2.4rem; }
.card ul { margin: 1.1rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.card li { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; color: var(--mute); font-size: 0.93rem; }
.card li::before { content: '·'; color: var(--sun-1); font-weight: 800; }

.soon {
  display: inline-block;
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 212, 106, 0.4);
  color: var(--bolt);
  margin-bottom: 0.9rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-foot {
  border-top: 1px solid var(--line-soft);
  padding-block: 3rem 2.4rem;
  background: rgba(3, 5, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 3rem;
  align-items: flex-start;
  justify-content: space-between;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.foot-links a { font-size: 0.88rem; color: var(--mute); transition: color 0.2s; }
.foot-links a:hover { color: var(--paper); }
.foot-legal {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  color: var(--mute-dim);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
}

/* ============================================================
   Scroll reveal — one gesture, used consistently
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Prose — privacy policy
   ============================================================ */
.prose { max-width: 74ch; margin-inline: auto; }
.prose h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  margin-top: 2.8rem;
  margin-bottom: 0.7rem;
}
.prose h3 { margin-top: 1.7rem; margin-bottom: 0.4rem; font-size: 1.02rem; }
.prose p, .prose li { color: var(--mute); }
.prose p + p { margin-top: 0.9rem; }
.prose ul { padding-left: 1.1rem; margin: 0.7rem 0 0; display: grid; gap: 0.45rem; }
.prose a { color: var(--sun-1); text-decoration: underline; text-underline-offset: 3px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.68rem 0.8rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.prose th { color: var(--paper); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.prose td { color: var(--mute); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.updated { color: var(--mute-dim); font-size: 0.85rem; margin-top: 0.6rem; }
