/* WindSpots — the page takes the colour of the wind. Bucket colours are the app's
   dark-mode forecast cells (ForecastColors.swift), so the site and the app read the same. */
:root {
    --calm: #1E3A52;
    --light: #1C4E70;
    --moderate: #245C2C;
    --fresh: #6B5E12;
    --strong: #7A4A12;
    --very-strong: #7E2F1A;
    --extreme: #6B1F4E;

    --ink: #F4F7FA;
    --ink-soft: rgba(244, 247, 250, 0.72);
    --ink-faint: rgba(244, 247, 250, 0.5);
    --night: #0A1622;
    --night-2: #0F1E2C;
    --line: rgba(244, 247, 250, 0.14);
    --accent: #4FB3FF;

    --gutter: clamp(16px, 5vw, 64px);
    --max: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--night);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

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

/* ---------- Top bar ---------- */
.topbar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max);
    margin: 0 auto;
    padding: 20px var(--gutter);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.brand img { border-radius: 22%; }
.toplinks { display: flex; gap: 22px; font-size: 15px; }
.toplinks a { text-decoration: none; color: var(--ink-soft); }
.toplinks a:hover { color: var(--ink); }

/* ---------- Hero: live reading ---------- */
.now {
    --bucket: var(--moderate);
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 110px 0 28px;
    background: var(--bucket);
    transition: background-color 900ms ease;
    overflow: hidden;
}
.now[data-intensity="calm"]        { --bucket: var(--calm); }
.now[data-intensity="light"]       { --bucket: var(--light); }
.now[data-intensity="moderate"]    { --bucket: var(--moderate); }
.now[data-intensity="fresh"]       { --bucket: var(--fresh); }
.now[data-intensity="strong"]      { --bucket: var(--strong); }
.now[data-intensity="veryStrong"]  { --bucket: var(--very-strong); }
.now[data-intensity="extreme"]     { --bucket: var(--extreme); }

.now-where {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    margin: 0 0 8px;
    font-size: clamp(17px, 2vw, 21px);
}
.now-label { color: var(--ink-soft); }
.spot-picker { display: inline-flex; flex-wrap: wrap; gap: 4px 4px; }
.spot-picker button {
    font: inherit;
    font-weight: 600;
    color: var(--ink-faint);
    background: none;
    border: 0;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
}
.spot-picker button:hover { color: var(--ink); }
.spot-picker button[aria-pressed="true"] {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.spot-picker .here::before { content: "⌖ "; }

.reading {
    display: flex;
    align-items: flex-end;
    gap: 0.06em;
    margin: 0;
    font-size: clamp(132px, 30vw, 360px);
    font-weight: 800;
    line-height: 0.82;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}
.reading .unit {
    font-size: 0.24em;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.2em 0.12em;
    color: var(--ink-soft);
}
.reading .arrow {
    display: inline-block;
    font-size: 0.32em;
    margin: 0 0 0.12em 0.3em;
    transition: transform 900ms cubic-bezier(.2,.8,.2,1);
}

.detail {
    margin: 22px 0 0;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: -0.015em;
}
.outlook {
    margin: 6px 0 0;
    font-size: clamp(17px, 2vw, 22px);
    color: var(--ink-soft);
}

.cta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin: 34px 0 40px;
}
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 14px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.05;
}
a.store-badge { color: #fff; text-decoration: none; }
.store-badge small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; }
.cta-note { color: var(--ink-soft); font-size: 15px; }

/* The strip: the next hours, cell by cell, like the app's table. */
.strip-wrap {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
            mask-image: linear-gradient(to right, #000 85%, transparent);
}
.strip-wrap::-webkit-scrollbar { display: none; }
.strip {
    display: flex;
    gap: 3px;
    list-style: none;
    margin: 0;
    padding: 0 var(--gutter);
    max-width: none;
}
@media (min-width: 1180px) {
    .strip { padding-left: calc((100vw - var(--max)) / 2 + var(--gutter)); }
}
.strip li {
    flex: 0 0 auto;
    width: 64px;
    border-radius: 8px;
    padding: 10px 0 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.22);
    font-variant-numeric: tabular-nums;
}
.strip li[data-intensity="calm"]       { background: var(--calm); }
.strip li[data-intensity="light"]      { background: var(--light); }
.strip li[data-intensity="moderate"]   { background: var(--moderate); }
.strip li[data-intensity="fresh"]      { background: var(--fresh); }
.strip li[data-intensity="strong"]     { background: var(--strong); }
.strip li[data-intensity="veryStrong"] { background: var(--very-strong); }
.strip li[data-intensity="extreme"]    { background: var(--extreme); }
.strip li { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.strip .h { display: block; font-size: 13px; color: var(--ink-soft); }
.strip .d { display: block; font-size: 11px; color: var(--ink-faint); height: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
.strip .w { display: block; font-size: 24px; font-weight: 700; margin-top: 4px; }
.strip .g { display: block; font-size: 13px; color: var(--ink-soft); }
.strip .a { display: inline-block; margin-top: 6px; font-size: 15px; }

.source { margin: 14px auto 0; font-size: 13px; color: var(--ink-faint); }
.source a { color: var(--ink-soft); }

/* ---------- Features ---------- */
.feature { padding: clamp(72px, 12vw, 150px) 0; background: var(--night); }
.feature.alt { background: var(--night-2); }

.feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(40px, 7vw, 110px);
}
.feature-grid.reverse .phone { order: 2; }

.phone {
    margin: 0;
    justify-self: center;
    width: min(100%, 360px);
    padding: 10px;
    border-radius: 54px;
    background: #1b1f24;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 40px 80px rgba(0,0,0,0.45);
}
.phone img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 44px;
}

.feature h2, .share h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5.6vw, 72px);
    line-height: 1.0;
    letter-spacing: -0.035em;
    font-weight: 800;
}
.feature p { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 34em; margin: 0; }

.facts { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; font-size: 17px; color: var(--ink-soft); }
.facts li { padding-left: 22px; position: relative; }
.facts li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.45em;
    width: 10px; height: 10px;
    border-radius: 3px;
    background: var(--moderate);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}
.facts li:nth-child(2)::before { background: var(--fresh); }
.facts li:nth-child(3)::before { background: var(--very-strong); }
.facts strong { color: var(--ink); font-weight: 600; }

.share { text-align: left; }
.bubble {
    margin-top: 36px;
    max-width: 440px;
    padding: 14px 18px;
    border-radius: 22px 22px 22px 6px;
    background: #26323e;
    font-size: 17px;
}
.bubble p { color: var(--ink); font-size: 17px; }
.bubble .link { color: var(--accent); margin-top: 4px; word-break: break-all; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; background: var(--night); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: 15px; }
.footer nav a { color: var(--ink-soft); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.fine { margin-top: 22px; font-size: 13px; color: var(--ink-faint); }
.fine a { color: var(--ink-soft); }

/* ---------- Document pages (support, privacy, terms) ---------- */
.doc-head { border-bottom: 1px solid var(--line); }
.doc-head .topbar { position: static; }
.doc {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px var(--gutter) 96px;
    color: var(--ink-soft);
    font-size: 17px;
}
.doc h1 { color: var(--ink); font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 12px; }
.doc h2 { color: var(--ink); font-size: 24px; letter-spacing: -0.01em; margin: 44px 0 10px; }
.doc h3 { color: var(--ink); font-size: 18px; margin: 26px 0 6px; }
.doc a { color: var(--accent); }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
    .toplinks { gap: 16px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-grid.reverse .phone { order: 0; }
    .phone { width: min(100%, 300px); border-radius: 46px; }
    .phone img { border-radius: 37px; }
    .strip li { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .now, .reading .arrow { transition: none; }
}

.doc .store-badge { color: #fff; }
