/* ============================================================
   Galvbike — shared site styles
============================================================ */

*, *::before, *::after { font-family: 'Raleway', sans-serif; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --g: #00693e;
    --g-dark: #005231;
    --g-light: #4ade80;
    --bg-off: #f4f4f2;
}

/* Nav states */
#navbar { transition: background 0.3s ease, box-shadow 0.3s ease; }
#navbar.nav-solid { background: #ffffff; box-shadow: 0 1px 24px rgba(0,0,0,0.07); }
#navbar.nav-transparent { background: transparent; }

/* Nav links */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: #00693e;
    transition: width 0.22s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link:focus-visible { outline: 2px solid #00693e; outline-offset: 3px; border-radius: 2px; }

/* Button: green solid */
.btn-green {
    background: #00693e;
    color: #fff;
    transition: background 0.2s ease, transform 0.15s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
    box-shadow: 0 4px 18px rgba(0,105,62,0.32);
}
.btn-green:hover { background: #005231; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0,105,62,0.42); }
.btn-green:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(0,105,62,0.28); }
.btn-green:focus-visible { outline: 2px solid #00693e; outline-offset: 3px; }

/* Outline button — for secondary actions on light bg */
.btn-outline {
    background: transparent;
    color: #00693e;
    border: 2px solid #00693e;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { background: #00693e; color: #fff; }

/* Ghost button — for secondary actions over dark/photo backgrounds (e.g. the hero) */
.btn-ghost {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.55);
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-ghost:hover { background: #fff; color: #00693e; border-color: #fff; transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }
.btn-ghost:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* News card */
.news-card {
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 64px rgba(0,105,62,0.12), 0 4px 20px rgba(0,0,0,0.06);
}
.news-card img { transition: transform 0.5s ease; }
.news-card:hover img { transform: scale(1.05); }

/* Read more */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #00693e;
    font-weight: 700;
    font-size: 0.8125rem;
    transition: gap 0.2s ease;
}
.read-more:hover { gap: 10px; }
.read-more:focus-visible { outline: 2px solid #00693e; outline-offset: 2px; border-radius: 2px; }

/* Feature check */
.feature-check {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #00693e;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}

/* Scroll indicator */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
.scroll-bounce { animation: bounce-slow 2s ease-in-out infinite; }

/* Grain overlay */
.grain-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
}

/* ============================================================
   Mobile-only chrome — bottom tab bar + body padding
============================================================ */

@media (max-width: 767px) {
    body { padding-bottom: 60px; }
    /* The sticky buy-bar belongs to desktop only — the tab bar replaces it on mobile. */
    #buy-bar { display: none !important; }
    #mobile-tabbar {
        height: 60px;
        /* Force GPU layer so transitions during iOS toolbar animation stay smooth. */
        will-change: top;
        transform: translateZ(0);
    }
    /* The fix for "tab bar floats above the bottom when iOS Chrome's toolbar
       collapses". `100dvh` is the *dynamic* viewport height — it shrinks/grows
       as the browser chrome animates, unlike `100vh`. Anchoring the bar's TOP
       to `100dvh - 60px` keeps its bottom edge glued to the dynamic viewport
       bottom. Old browsers without dvh fall back to `bottom: 0`. */
    @supports (height: 100dvh) {
        #mobile-tabbar {
            top: calc(100dvh - 60px);
            bottom: auto !important;
        }
    }
}

/* Bottom tab-bar items */
#mobile-tabbar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 10px;
    color: #6b7280;
    transition: color 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
#mobile-tabbar .tab-item span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}
#mobile-tabbar .tab-item:active { background: rgba(0,105,62,0.06); }
#mobile-tabbar .tab-item.is-active { color: #00693e; }
#mobile-tabbar .tab-item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 28%;
    height: 3px;
    background: #00693e;
    border-radius: 0 0 3px 3px;
}
#mobile-tabbar .tab-item { position: relative; }

/* The Buy tab gets a filled green pill for emphasis */
#mobile-tabbar .tab-item.tab-buy {
    background: #00693e;
    color: #fff;
    margin: 6px 6px 8px;
    border-radius: 14px;
    padding: 6px 4px 8px;
}
#mobile-tabbar .tab-item.tab-buy.is-active::before { display: none; }
#mobile-tabbar .tab-item.tab-buy:active { background: #005231; }

/* Sticky Buy Bar (desktop) */
#buy-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 55;
    background: #00693e;
    color: #fff;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
#buy-bar.shown { transform: translateY(0); }

/* ============================================================
   Page-specific reusable bits
============================================================ */

/* Sub-hero: solid colour banner sitting under nav, shorter than the main hero */
.sub-hero {
    position: relative;
    overflow: hidden;
    padding-top: 11rem;
    padding-bottom: 4rem;
}
.sub-hero-dark { background: #0a0a0a; color: #fff; }
.sub-hero-green {
    background: #00693e;
    color: #fff;
}
.sub-hero-light { background: #f4f4f2; color: #000; }

.eyebrow {
    color: #00693e;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.eyebrow-light { color: rgba(255,255,255,0.65); }

/* Spec sheet — clean two-column data row */
.spec-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 1.125rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    align-items: baseline;
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.005em;
}
.spec-row dd {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #555;
    line-height: 1.55;
}

/* Numbered annotation marker for the specs-B page */
.spec-pin {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00693e;
    color: #fff;
    font-weight: 900;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 8px 22px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

/* Big numeric stat */
.stat-num {
    font-size: clamp(3rem, 5.5vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #00693e;
}
.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #555;
}

/* ============================================================
   Specs page — shared hero
============================================================ */

.specs-hero {
    position: relative;
    min-height: 92vh;
    background:
        linear-gradient(to right, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.55) 38%, rgba(10,10,10,0.15) 62%, rgba(10,10,10,0.55) 100%),
        url('../brand_assets/bike-workshop.jpg') center/cover no-repeat;
    color: #fff;
}
@media (max-width: 768px) {
    .specs-hero {
        min-height: 50vh;
        background:
            linear-gradient(to bottom, rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.55) 65%, rgba(10,10,10,0.92) 100%),
            url('../brand_assets/bike-workshop.jpg') center/cover no-repeat;
    }
}
.hero-stat {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.18);
    backdrop-filter: blur(6px);
    border-radius: 0.875rem;
    padding: 0.85rem 1.1rem;
}
.hero-stat .num {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #fff;
}
.hero-stat .num small {
    font-size: 0.7em;
    color: rgba(255,255,255,0.55);
    font-weight: 800;
    margin-left: 0.15rem;
}
.hero-stat .label {
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-top: 0.4rem;
}

/* ============================================================
   Spec tables — three variants. Common bits first, then per-variant.
============================================================ */

.spec-cat-eyebrow {
    color: #00693e;
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.spec-cat-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #000;
}

/* ---- Variant A · "Card grid" — 2-up category cards with horizontal spec/value rows ---- */
.spec-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) { .spec-cards { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.spec-card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 1rem;
    padding: 1.75rem;
    background: #fff;
}
.spec-card .row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: baseline;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.spec-card .row:last-child { border-bottom: none; }
.spec-card .row .k {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #000;
}
.spec-card .row .v {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #444;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---- Variant B · "Classic data table" — full-width single column, sectioned ---- */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}
.spec-table .sect-head {
    padding: 1.5rem 0 0.875rem;
    border-bottom: 2px solid #000;
}
.spec-table .sect-head th {
    text-align: left;
    font-size: 1.125rem;
    font-weight: 900;
    letter-spacing: -0.015em;
    color: #000;
}
.spec-table .sect-head .num {
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: #00693e;
    text-align: right;
}
.spec-table tr.row td {
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    font-variant-numeric: tabular-nums;
}
.spec-table tr.row td.k {
    font-size: 0.875rem;
    font-weight: 700;
    color: #000;
    width: 38%;
}
.spec-table tr.row td.v {
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
    text-align: right;
}

/* ---- Variant C · "Editorial split" — large category title + spec rows alongside ---- */
.spec-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}
@media (min-width: 900px) { .spec-split { gap: 5rem; } }
.spec-split-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.spec-split-row:last-child { border-bottom: none; padding-bottom: 0; }
@media (min-width: 768px) {
    .spec-split-row { grid-template-columns: 1fr 1.6fr; gap: 4rem; }
}
.spec-split-row .lede h3 {
    font-size: clamp(1.875rem, 3.5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: #000;
    margin-bottom: 0.75rem;
}
.spec-split-row .lede p {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #555;
    line-height: 1.65;
    max-width: 22rem;
}
.spec-split-row .rows .row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    align-items: baseline;
}
.spec-split-row .rows .row:first-child { border-top: 1px solid rgba(0,0,0,0.07); }
.spec-split-row .rows .row .k {
    font-size: 0.875rem;
    font-weight: 700;
    color: #000;
}
.spec-split-row .rows .row .v {
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Bordered subtle card */
.card-outline {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card-outline:hover {
    border-color: rgba(0,105,62,0.4);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.06);
}

/* Diagonal stripe pattern for placeholder/section dividers */
.stripes {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0,105,62,0.04) 0,
        rgba(0,105,62,0.04) 12px,
        transparent 12px,
        transparent 24px
    );
}

/* Use-case page B timeline */
.timeline-time {
    font-size: 0.875rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #00693e;
    text-transform: uppercase;
}
.timeline-rail {
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        rgba(0,105,62,0.0) 0,
        rgba(0,105,62,0.25) 8%,
        rgba(0,105,62,0.25) 92%,
        rgba(0,105,62,0.0) 100%);
    transform: translateX(-1px);
}
.timeline-dot {
    width: 14px; height: 14px;
    background: #00693e;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(0,105,62,0.18);
}
