/* website/css/home.css — hero, feature grid, gallery, spotlight, CTA band (populated in later tasks) */

/* ── hero ── */
#hero { position: relative; overflow: hidden; padding: var(--space-6) 0 var(--space-7); }
.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--grad-clear-a), var(--grad-clear-b));
  transition: background 1.4s var(--ease-standard);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: var(--space-6);
  align-items: center;
}

#hero h1 { color: var(--ink-on-dark); }
.hero-sub {
  color: var(--ink-on-dark);
  opacity: .85;
  max-width: 42ch;
  margin-top: var(--space-3);
  font-size: 1.05rem;
}
.hero-actions { display: flex; gap: var(--space-1); margin-top: var(--space-4); }
.hero-actions .badge-store { border-color: var(--hairline-dark); color: var(--ink-on-dark); }

/* ── accent picker ── */
.accent-picker { display: flex; gap: var(--space-1); margin-top: var(--space-4); }
.accent-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.accent-dot.is-active { border-color: var(--ink-on-dark); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .accent-picker { justify-content: center; }
}

/* ── hero phone mockup: a live-rendered mini recreation of the app, not a screenshot ── */
.hero-phone { display: flex; justify-content: center; }
.phone-frame {
  position: relative;
  width: min(300px, 70vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 32px;
  overflow: hidden;
  border: 6px solid var(--bg-void);
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  animation: nb-breathe 9s ease-in-out infinite;
  font-family: var(--font-body);
  cursor: default;
  user-select: none;
}
@media (prefers-reduced-motion: reduce) { .phone-frame { animation: none; } }
@keyframes nb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }

.mock-sky { position: absolute; inset: -2px; transition: background 1.2s var(--ease-standard); }
.mock-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mock-drop {
  position: absolute;
  top: -10%;
  width: 2px;
  height: 22px;
  background: rgba(190, 210, 255, .55);
  border-radius: 2px;
  animation: mock-fall linear infinite;
}
@keyframes mock-fall {
  0% { transform: translate3d(0, -30px, 0) rotate(var(--mock-rain-rot, 0deg)); }
  100% { transform: translate3d(var(--mock-rain-dx, 0px), 640px, 0) rotate(var(--mock-rain-rot, 0deg)); }
}
.mock-cloud {
  position: absolute;
  width: 130px;
  height: 50px;
  background: #fff;
  border-radius: 999px;
  filter: blur(1px);
}
.mock-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  animation: mock-twinkle 3s ease-in-out infinite;
}
@keyframes mock-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .mock-drop, .mock-star { animation: none; opacity: .5; }
}
.mock-orb {
  position: absolute;
  top: 16%;
  right: 12%;
  border-radius: 50%;
  transition: background .6s, opacity .6s, box-shadow .6s;
}
.mock-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity .12s ease-out;
}
.mock-flash.is-flashing { opacity: .55; }

.mock-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 56px;
}
.mock-header { display: flex; align-items: flex-start; justify-content: space-between; }
.mock-city-name { font-family: var(--font-display); font-size: 1rem; letter-spacing: .01em; }
.mock-city-cc { font-family: var(--font-mono); font-size: .55rem; opacity: .6; margin-left: 4px; }
.mock-icons { display: flex; gap: 6px; }
.mock-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.2px solid currentColor;
  opacity: .7;
  background: transparent;
  color: inherit;
  font-size: .7rem;
  cursor: pointer;
  padding: 0;
}
.mock-icon-btn.is-active { opacity: 1; background: currentColor; }
.mock-icon-btn.is-active { color: inherit; }

.mock-panel { display: none; flex: 1; flex-direction: column; min-height: 0; }
.mock-panel.is-active { display: flex; }

.mock-panel--now { justify-content: center; }
.mock-now-status {
  font-family: var(--font-mono);
  font-size: .55rem;
  letter-spacing: .1em;
  opacity: .75;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mock-live-dot { width: 5px; height: 5px; border-radius: 50%; animation: mock-blink 1.6s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .mock-live-dot { animation: none; } }
@keyframes mock-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .2; } }
.mock-now-row { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; }
.mock-now-main {
  flex: 1;
  min-width: 0;
  cursor: grab;
  touch-action: none;
  outline: none;
}
.mock-now-main:active { cursor: grabbing; }
.mock-temp-row { display: flex; align-items: flex-start; }
.mock-temp { font-family: var(--font-display); font-size: 3.6rem; line-height: .85; }
.mock-deg { font-family: var(--font-display); font-size: 1.5rem; margin-top: 5px; }
.mock-cond { font-family: var(--font-display); font-size: 1.3rem; margin-top: 2px; }
.mock-blurb { font-family: var(--font-body); font-weight: 500; font-size: .58rem; line-height: 1.3; opacity: .8; margin-top: 5px; }

/* ── tick timeline, ported from the real app's ticksFor() ── */
.mock-tickcol { flex: none; width: 34px; display: flex; flex-direction: column; align-items: center; }
.mock-step {
  width: 18px; height: 18px;
  border: none;
  background: transparent;
  color: inherit;
  opacity: .6;
  font-size: .5rem;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.mock-ticks { display: flex; flex-direction: column; align-items: flex-end; width: 100%; }
.mock-tick-row { height: 6.5px; width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.mock-tick-label { font-family: var(--font-mono); font-size: .38rem; letter-spacing: .04em; white-space: nowrap; }
.mock-tick-bar { height: 1px; }
.mock-instruments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 10px; background: var(--mock-ink, currentColor); opacity: .96; }
.mock-instr-cell { background: rgba(0,0,0,.18); padding: 5px 6px; color: var(--mock-ink-invert, inherit); }
.mock-instr-k { font-family: var(--font-mono); font-size: .48rem; letter-spacing: .1em; opacity: .65; display: block; }
.mock-instr-v { font-family: var(--font-display); font-size: .82rem; display: block; margin-top: 2px; }
.mock-instr-u { font-family: var(--font-mono); font-size: .45rem; opacity: .65; margin-left: 1px; }
.mock-hint { margin-top: 8px; opacity: .55; font-size: .55rem; }

.mock-panel--list { padding-top: 4px; }
.mock-list-title { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; opacity: .6; margin-bottom: 6px; }
.mock-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mock-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-mono);
  font-size: .62rem;
}
.mock-list-time { width: 46px; opacity: .8; }
.mock-list-cond { flex: 1; opacity: .6; letter-spacing: .04em; }
.mock-list-temp { font-family: var(--font-display); font-size: .85rem; }
.mock-lo { opacity: .5; font-size: .7rem; margin-right: 4px; }

.mock-tabs {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  display: flex;
  border: 1.2px solid currentColor;
  opacity: .95;
}
.mock-tab {
  flex: 1;
  height: 30px;
  border: none;
  background: transparent;
  color: inherit;
  font-family: var(--font-display);
  font-size: .6rem;
  letter-spacing: .04em;
  cursor: pointer;
}
.mock-tab.is-active { background: var(--mock-ink, currentColor); color: var(--mock-ink-invert, var(--bg-void)); }

.mock-sheet {
  position: absolute;
  inset: 0;
  background: var(--bg-void);
  color: var(--ink-on-dark);
  padding: 20px 16px;
  transform: translateY(100%);
  transition: transform .32s var(--ease-standard);
  display: flex;
  flex-direction: column;
}
@media (prefers-reduced-motion: reduce) { .mock-sheet { transition: none; } }
.mock-sheet.is-open { transform: translateY(0); }
.mock-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.mock-sheet-title { font-family: var(--font-display); font-size: .95rem; }
.mock-sheet-label { display: block; margin: 14px 0 8px; font-size: .55rem; }
.mock-city-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mock-city-chip {
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .04em;
  cursor: pointer;
}
.mock-city-chip-cc { opacity: .5; margin-left: 4px; }

/* ── features ── */
#features { padding: var(--space-7) 0; }
.section-head { max-width: 46ch; margin-bottom: var(--space-5); }
.section-head .eyebrow { display: block; margin-bottom: var(--space-2); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1.4px solid var(--hairline);
}
.feature-card {
  background: var(--paper);
  padding: var(--space-4);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease-standard), transform .5s var(--ease-standard);
}
.feature-card.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .feature-card { opacity: 1; transform: none; transition: none; }
}
.feature-index {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  opacity: .45;
}
.feature-card h3 { margin: var(--space-2) 0 var(--space-1); text-transform: none; }
.feature-card p { font-size: .92rem; opacity: .75; }
.feature-hint { margin-top: var(--space-2); opacity: .55; }
.feature-card--alert { background: var(--bg-void); }
.feature-card--alert h3, .feature-card--alert p { color: var(--ink-on-dark); }
.feature-card--alert .feature-index { color: var(--accent-acid); opacity: 1; }
.feature-card--alert p { opacity: .8; }

@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ── gallery ── */
#screenshots { padding-bottom: var(--space-7); }
.gallery-scroll {
  display: grid;
  /* auto-fit + minmax lets columns drop as the viewport narrows instead of
     ever needing a scrollbar — all six stay visible, just in more rows. */
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-3);
  padding-top: var(--space-2);
}
.gallery-card { margin: 0; }
.phone-frame--sm {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 24px;
  border-width: 5px;
  /* The base .phone-frame shadow (0 30px 70px) is tuned for one large hero
     mockup — six of these side by side overlapped into one smeared grey
     band along the row instead of reading as individual card depth. */
  box-shadow: 0 6px 16px rgba(0,0,0,.16);
}
.gallery-card figcaption {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  opacity: .6;
  text-align: center;
}

/* ── hazard stripe divider ── */
.hazard-stripe {
  height: 28px;
  background-image: repeating-linear-gradient(115deg, var(--accent-acid) 0 24px, var(--bg-void) 24px 48px);
  background-size: 96px 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .hazard-stripe { animation: nb-stripe 2.4s linear infinite; }
}
@keyframes nb-stripe { 0% { background-position: 0 0; } 100% { background-position: 96px 0; } }

/* ── spotlight (severe alerts gallery) ── */
.spotlight { background: var(--bg-void); color: var(--ink-on-dark); padding: var(--space-7) 0; }
.spotlight .section-head .eyebrow { color: var(--accent-acid); opacity: 1; }
.spotlight .section-head p { margin-top: var(--space-3); max-width: 48ch; opacity: .8; }
.spotlight .gallery-card figcaption { color: var(--ink-on-dark); opacity: .6; }
.phone-frame--dark { border-color: var(--ink-on-dark); }

@media (max-width: 860px) {
  .spotlight .section-head { text-align: center; }
}

/* ── cta band ── */
.cta-band {
  text-align: center;
  padding: var(--space-7) 0;
}
.cta-band .hero-actions { justify-content: center; margin-top: var(--space-4); }
.cta-band .badge-store { color: var(--ink-on-light); border-color: var(--hairline); opacity: .6; }
.cta-note {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  opacity: .5;
}
