/* ==========================================================================
   Helm Sailing — page-scoped styles (css/helm.css)

   Namespaced under .helm-page so nothing here can leak into the rest of the
   site. Gist owns violet→pink and the portfolio owns blue→violet; Helm owns
   the app's own Wet UI palette, taken from Shared/Theme.swift.
   ========================================================================== */

.helm-page {
    /* Wet UI — from Shared/Theme.swift. Every colour has one semantic job. */
    --helm-neon: #FAFF00;
    /* primary data (SOG digits), START, the accent */
    --helm-orange: #FF9F0A;
    /* STOP state, warnings, FAIR GPS, ebb current */
    --helm-green: #30D158;
    /* GOOD GPS, positive coach findings */
    --helm-red: #FF453A;
    /* POOR GPS, permission errors */
    --helm-cyan: #0AE0FF;
    --helm-dim: rgba(255, 255, 255, 0.55);
    --helm-card: #171717;
    --helm-line: rgba(255, 255, 255, 0.09);
    --helm-grad: linear-gradient(120deg, #FAFF00, #30D158 55%, #0AE0FF);

    background-color: #000;
}

/* The app's only background colour is pure black. The contrast against the
   rest of the site's aurora is the point — it makes the product feel like
   itself. (Plan §4.) */
.helm-page #aurora-bg {
    display: none;
}

.helm-page .section-title {
    max-width: 22ch;
}

/* ── The instrument readout ───────────────────────────────────────────────
   The typographic move that sells the product: tabular figures, tight
   tracking, oversized — the watch face, on the page. */
.helm-readout {
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: var(--helm-neon);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.helm-readout-unit {
    font-size: 0.4em;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--helm-dim);
    margin-left: 0.25em;
}

.helm-readout-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--helm-dim);
    margin-top: 0.5rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.helm-hero {
    position: relative;
    padding: 9rem 0 4.5rem;
    overflow: hidden;
}

.helm-hero::before {
    /* One cold wash of the app's gradient, very low, behind the text. */
    content: "";
    position: absolute;
    inset: -30% 40% 30% -20%;
    background: var(--helm-grad);
    opacity: 0.07;
    filter: blur(90px);
    pointer-events: none;
}

.helm-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
}

.helm-lockup {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.helm-applogo {
    border-radius: 12px;
    flex-shrink: 0;
}

.helm-brand {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}

.helm-brand-sub {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--helm-dim);
    letter-spacing: 0.02em;
}

.helm-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin-bottom: 1.5rem;
    color: #fff;
}

.helm-hero-lead {
    font-size: 1.08rem;
    line-height: 1.65;
    color: var(--text-main, rgba(255, 255, 255, 0.82));
    max-width: 54ch;
    margin-bottom: 2rem;
}

.helm-hero-lead strong {
    color: #fff;
    font-weight: 600;
}

.helm-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.helm-req-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    font-size: 0.85rem;
    color: var(--helm-dim);
}

.helm-req-line span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.helm-req-line .icon {
    width: 0.95em;
    height: 0.95em;
    fill: var(--helm-neon);
    opacity: 0.85;
}

/* ── Device frames ────────────────────────────────────────────────────────
   Frames live in CSS, never baked into the image — keeps the screenshots
   small and re-capturable when the app's UI moves on. */
.helm-device {
    position: relative;
    border-radius: 34px;
    padding: 9px;
    background: linear-gradient(160deg, #2a2a2a, #0d0d0d);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.07);
    max-width: 280px;
    margin: 0 auto;
}

.helm-device img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 26px;
}

.helm-hero-visual {
    display: flex;
    justify-content: center;
}

.helm-hero-visual .helm-device {
    max-width: 300px;
}

/* ── Flagship honesty band ───────────────────────────────────────────────
   The analogue of Gist's privacy band: the one section that has to land. */
.helm-usp {
    position: relative;
    padding: 5.5rem 0;
    border-top: 1px solid var(--helm-line);
    border-bottom: 1px solid var(--helm-line);
}

.helm-usp.is-flagship {
    background:
        radial-gradient(ellipse 70% 100% at 50% 0%, rgba(250, 255, 0, 0.05), transparent 70%),
        #050505;
}

.helm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--helm-neon);
    margin-bottom: 1.1rem;
}

.helm-kicker .icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.helm-usp h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #fff;
    max-width: 20ch;
    margin-bottom: 1.25rem;
}

.helm-usp-body {
    font-size: 1.04rem;
    line-height: 1.7;
    color: var(--text-main, rgba(255, 255, 255, 0.8));
    max-width: 62ch;
}

.helm-usp-body code {
    font-size: 0.85em;
    padding: 0.1em 0.4em;
    border-radius: 5px;
    background: rgba(250, 255, 0, 0.1);
    color: var(--helm-neon);
}

.helm-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.helm-proof-card {
    background: var(--helm-card);
    border: 1px solid var(--helm-line);
    border-radius: 18px;
    padding: 1.6rem;
}

.helm-proof-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--helm-neon);
    margin-bottom: 0.7rem;
    letter-spacing: -0.005em;
}

.helm-proof-card p {
    font-size: 0.92rem;
    line-height: 1.62;
    color: var(--helm-dim);
    margin: 0;
}

/* ── Watch strip ─────────────────────────────────────────────────────────
   All four pages visible at once. No tabs, no click-to-reveal — the site
   has zero disclosure widgets by design. */
.helm-watch-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.helm-watch-item {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.helm-watch-caption {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--helm-dim);
}

.helm-watch-caption strong {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

/* The watch itself, drawn in CSS — sharper than a screenshot at this size,
   weightless, and it re-themes with the tokens. Labelled illustrative. */
.helm-watch {
    position: relative;
    width: 100%;
    max-width: 176px;
    margin: 0 auto;
    aspect-ratio: 176 / 214;
    border-radius: 30%/24%;
    padding: 12px;
    background: linear-gradient(155deg, #3a3a38, #111);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.helm-watch-screen {
    width: 100%;
    height: 100%;
    border-radius: 26%/21%;
    background: #000;
    overflow: hidden;
    padding: 9px 8px;
    display: flex;
    flex-direction: column;
    font-variant-numeric: tabular-nums;
}

.helm-watch-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--helm-dim);
}

.helm-gps {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--helm-green);
}

.helm-gps::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.helm-watch-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.helm-watch-sog {
    font-size: 2.9rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--helm-neon);
}

.helm-watch-sub {
    font-size: 0.45rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--helm-dim);
    margin-top: 3px;
}

.helm-watch-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}

.helm-watch-cog {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* The bottom row sits tight against the bezel; its label needs to lose the
   generous spacing the centred readout gets, or it clips. */
.helm-watch-bottom .helm-watch-sub {
    margin-top: 1px;
    line-height: 1;
}

.helm-watch-btn {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #000;
    background: var(--helm-neon);
    border-radius: 9px;
    padding: 7px 12px;
}

.helm-watch-btn.is-stop {
    background: var(--helm-orange);
}

/* Chart page */
.helm-watch-map {
    position: absolute;
    inset: 12px;
    border-radius: 26%/21%;
    overflow: hidden;
    background:
        radial-gradient(circle at 60% 70%, #0d2438, #061420 70%);
}

.helm-watch-track {
    position: absolute;
    inset: 0;
}

/* Conditions page */
.helm-cond-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.helm-cond-row:last-child {
    border-bottom: 0;
}

.helm-cond-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--helm-neon);
    line-height: 1;
}

.helm-cond-val.is-tide {
    color: #fff;
}

.helm-cond-key {
    font-size: 0.44rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    color: var(--helm-dim);
}

.helm-arrow {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.helm-arrow .icon {
    width: 9px;
    height: 9px;
    fill: var(--helm-neon);
}

/* Race timer page */
.helm-watch-timer {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--helm-orange);
    letter-spacing: -0.03em;
    line-height: 1;
}

.helm-illustrative {
    display: block;
    font-size: 0.78rem;
    color: var(--helm-dim);
    margin-top: 1.4rem;
    font-style: italic;
}

.helm-detail-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--helm-line);
}

.helm-detail-row p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--helm-dim);
    margin: 0;
}

.helm-detail-row .icon {
    width: 1.05em;
    height: 1.05em;
    fill: var(--helm-neon);
    vertical-align: -0.12em;
    margin-right: 0.45rem;
}

/* ── Feature grid (the debrief) ──────────────────────────────────────── */
.helm-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.75rem;
}

.helm-feature {
    background: var(--helm-card);
    border: 1px solid var(--helm-line);
    border-radius: 18px;
    padding: 1.6rem;
}

.helm-feature-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.helm-feature .icon {
    width: 1.15rem;
    height: 1.15rem;
    fill: var(--helm-neon);
    flex-shrink: 0;
}

.helm-feature h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.helm-feature p {
    font-size: 0.92rem;
    line-height: 1.62;
    color: var(--helm-dim);
    margin: 0;
}

/* Marks a feature that belongs to the paid tier. Free/paid has to be
   legible on the page, not discovered after installing. */
.helm-pro-chip {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--helm-neon);
    border: 1px solid rgba(250, 255, 0, 0.35);
    border-radius: 999px;
    padding: 0.18em 0.55em;
}

.helm-ver-chip {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--helm-cyan);
    border: 1px solid rgba(10, 224, 255, 0.35);
    border-radius: 999px;
    padding: 0.18em 0.55em;
}

/* ── The coach card ──────────────────────────────────────────────────── */
.helm-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2.5rem;
}

.helm-coach-card {
    background: var(--helm-card);
    border: 1px solid var(--helm-line);
    border-radius: 20px;
    padding: 1.4rem;
}

.helm-coach-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--helm-dim);
    margin-bottom: 1.1rem;
}

.helm-finding {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--helm-line);
}

.helm-finding:first-of-type {
    border-top: 0;
}

.helm-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.45rem;
}

.helm-dot.is-red {
    background: var(--helm-red);
}

.helm-dot.is-orange {
    background: var(--helm-orange);
}

.helm-dot.is-green {
    background: var(--helm-green);
}

.helm-finding-body h4 {
    font-size: 0.93rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.2rem;
}

.helm-finding-body p {
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--helm-dim);
    margin: 0;
}

.helm-time-chip {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
}

/* Severity is never colour alone — every dot has a text label beside it. */
.helm-sev {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.helm-sev.is-red {
    color: var(--helm-red);
}

.helm-sev.is-orange {
    color: var(--helm-orange);
}

.helm-sev.is-green {
    color: var(--helm-green);
}

/* ── Caveats — the honesty notes that are the pitch, not the small print ── */
.helm-caveat-list {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 0;
    display: grid;
    gap: 0.9rem;
}

.helm-caveat {
    display: flex;
    gap: 0.75rem;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--helm-dim);
}

.helm-caveat .icon {
    width: 1.05em;
    height: 1.05em;
    fill: var(--helm-neon);
    flex-shrink: 0;
    margin-top: 0.25em;
}

/* ── Data sources ────────────────────────────────────────────────────── */
.helm-source-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.helm-source-list li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--helm-line);
}

.helm-source-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.helm-source-list .icon {
    width: 1.15rem;
    height: 1.15rem;
    fill: var(--helm-neon);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.helm-source-list strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}

.helm-source-list span {
    font-size: 0.88rem;
    color: var(--helm-dim);
}

.helm-privacy-note {
    background: var(--helm-card);
    border: 1px solid var(--helm-line);
    border-left: 3px solid var(--helm-neon);
    border-radius: 16px;
    padding: 1.6rem;
    font-size: 0.98rem;
    line-height: 1.68;
    color: var(--text-main, rgba(255, 255, 255, 0.82));
}

.helm-privacy-note strong {
    color: #fff;
}

/* ── Access band ─────────────────────────────────────────────────────── */
.helm-access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2.5rem 0 2rem;
}

.helm-access-card {
    background: var(--helm-card);
    border: 1px solid var(--helm-line);
    border-radius: 20px;
    padding: 1.8rem;
}

.helm-access-card.is-free {
    border-color: rgba(250, 255, 0, 0.28);
}

.helm-access-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.35rem;
}

.helm-access-card .helm-access-sub {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--helm-neon);
    margin-bottom: 1.1rem;
}

.helm-access-card.is-pro .helm-access-sub {
    color: var(--helm-cyan);
}

.helm-access-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.helm-access-card li {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--helm-dim);
    display: flex;
    gap: 0.6rem;
}

.helm-access-card .icon {
    width: 1em;
    height: 1em;
    fill: var(--helm-neon);
    flex-shrink: 0;
    margin-top: 0.3em;
}

.helm-access-card.is-pro .icon {
    fill: var(--helm-cyan);
}

.helm-reassure {
    text-align: center;
    font-size: 0.88rem;
    color: var(--helm-dim);
    margin-top: 1.5rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {

    .helm-proof-grid,
    .helm-feature-grid,
    .helm-detail-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .helm-watch-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 860px) {
    .helm-hero {
        padding-top: 7rem;
    }

    .helm-hero-grid,
    .helm-split,
    .helm-access-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .helm-hero-visual {
        order: -1;
    }

    .helm-hero-visual .helm-device {
        max-width: 230px;
    }
}

@media (max-width: 640px) {

    .helm-proof-grid,
    .helm-feature-grid,
    .helm-detail-row {
        grid-template-columns: 1fr;
    }

    /* The watch strip becomes a scroll-snapped rail: all four still in the
       DOM and reachable, just swiped rather than tiled. */
    .helm-watch-strip {
        display: flex;
        gap: 1.25rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        margin-inline: -1.25rem;
        padding-inline: 1.25rem;
        scrollbar-width: none;
    }

    .helm-watch-strip::-webkit-scrollbar {
        display: none;
    }

    .helm-watch-item {
        flex: 0 0 78%;
        scroll-snap-align: center;
    }

    .helm-usp {
        padding: 4rem 0;
    }
}

/* Keyboard users must be able to reach and scroll the rail. */
.helm-watch-strip:focus-visible {
    outline: 2px solid var(--helm-neon);
    outline-offset: 6px;
    border-radius: 12px;
}
