/*
 * hankbicyclecompany.org: the parent of bike.tools and Bike Archive.
 * Light only. Tokens follow the bike.tools design system (Inter, navy ink,
 * 6px controls, 12px cards, sentence case, no all-caps labels, no step
 * circles), with HBC's orange as the parent accent. The footer is the one
 * navy band.
 */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/Inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/Inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/Inter-800.woff2') format('woff2'); }

:root {
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* bike.tools design system */
    --navy-900: #14284b;
    --navy-800: #1d345c;
    --blue-600: #225481;
    --orange-300: #f2a66b;
    --surface: #ffffff;
    --surface-alt: #f3f5f9;
    --text: var(--navy-900);
    --text-muted: #3a4a66;
    --text-subtle: #56637c;
    --on-navy: #ffffff;
    --on-navy-muted: #c9d3e6;
    --border: #dce1ea;
    --border-soft: #e8ebf1;
    --border-control: #7d8aa1;
    --border-on-navy: #6479a0;
    --link: var(--blue-600);
    --focus: var(--blue-600);

    /* Hank Bicycle Company */
    --hbc-500: #d8735a;          /* the HBC mark */
    --hbc-700: #b04d35;          /* HBC orange behind white text: 5.3:1 */
    --hbc-800: #933f2b;          /* its hover */

    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 80px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --container: 1120px;
    --measure: 660px;

    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main { flex: 1; }

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--navy-900); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-4);
}
@media (min-width: 720px) { .wrap { padding: 0 var(--space-6); } }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -48px;
    background: var(--surface);
    color: var(--text);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    z-index: 10;
}
.skip-link:focus { top: var(--space-2); }

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3) var(--space-5);
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { display: block; width: 36px; height: 36px; }
.brand-name { font-size: 1.05rem; }
.brand--on-navy, .brand--on-navy:hover { color: var(--on-navy); }

.nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); }
.nav a[aria-current='page'] { font-weight: 700; }

/* Hero */
.hero {
    padding: var(--space-7) 0;
    border-bottom: 1px solid var(--border);
}
@media (min-width: 720px) { .hero { padding: var(--space-9) 0; } }

.hero--page { background: var(--surface-alt); padding: var(--space-7) 0; }
@media (min-width: 720px) { .hero--page { padding: var(--space-8) 0; } }

.hero-grid {
    display: grid;
    gap: var(--space-7);
    align-items: center;
}
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 1fr; gap: var(--space-8); } }

.display {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: var(--space-5);
    max-width: 18ch;
}
.hero--page .display { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 24ch; }

.lede {
    color: var(--text-muted);
    font-size: 1.1875rem;
    line-height: 1.65;
    max-width: var(--measure);
}

/* The two products' long logos, side by side with the headline. */
.hero-logos {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.logo-card {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.logo-card:hover { color: var(--text-muted); border-color: var(--border-control); }
.logo-card-art { display: flex; align-items: center; min-height: 64px; }
.logo-card-art svg, .logo-card-art img { display: block; width: auto; max-height: 100%; }
.logo-card-art--bt svg { height: 96px; margin-left: -10px; }
.logo-card-art--ba img { height: 44px; }
.logo-card-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--space-4); font-size: 15px; }
.logo-card-text strong { color: var(--text); }
.logo-card-go { color: var(--link); font-weight: 600; }
.logo-card:hover .logo-card-go { color: var(--navy-900); text-decoration: underline; }

/* A product page's hero: its long logo as the heading. */
.hero-logo { margin: 0 0 var(--space-5); line-height: 0; }
.hero-logo img { display: block; width: auto; }
.hero-logo--bt img { height: 88px; }
.hero-logo--ba img { height: 52px; }
@media (max-width: 520px) { .hero-logo--bt img { height: 64px; } .hero-logo--ba img { height: 38px; } }
.hero-tagline {
    font-size: clamp(1.6rem, 3.4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: var(--space-4);
    max-width: 26ch;
}

/* Animated bike.tools logo (templates/partials/bike-tools-animated.njk): the design system's own animation
   (Motion: bike-tools-animated.svg), kept here because the CSP blocks a <style> inside the page. The BT mark
   bursts into the expanded logo once; reduced motion shows the finished logo. */
@keyframes bta-o{from{transform:translate(344.10px,0)}}
@keyframes bta-b{from{transform:translate(-344.10px,0)}}
.bta-o{animation:bta-o 0.9s cubic-bezier(.2,.8,.2,1) 0.4s both}
.bta-b{animation:bta-b 0.9s cubic-bezier(.2,.8,.2,1) 0.4s both}
.bta-l{transform-box:fill-box;transform-origin:center}
@media (prefers-reduced-motion:reduce){.bta *{animation:none!important}}
@keyframes bta-l0{from{transform:translate(344.10px,0)}}
.bta-l0{animation:bta-l0 0.9s cubic-bezier(.2,.8,.2,1) 0.4s both}
@keyframes bta-l1{from{transform:translate(326.43px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l1{animation:bta-l1 0.75s cubic-bezier(.22,.9,.3,1) 0.520s both}
@keyframes bta-l2{from{transform:translate(249.86px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l2{animation:bta-l2 0.75s cubic-bezier(.22,.9,.3,1) 0.565s both}
@keyframes bta-l3{from{transform:translate(154.78px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l3{animation:bta-l3 0.75s cubic-bezier(.22,.9,.3,1) 0.610s both}
@keyframes bta-l4{from{transform:translate(75.77px,0)}}
.bta-l4{animation:bta-l4 0.9s cubic-bezier(.2,.8,.2,1) 0.4s both}
@keyframes bta-l5{from{transform:translate(-81.91px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l5{animation:bta-l5 0.75s cubic-bezier(.22,.9,.3,1) 0.655s both}
@keyframes bta-l6{from{transform:translate(-200.37px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l6{animation:bta-l6 0.75s cubic-bezier(.22,.9,.3,1) 0.700s both}
@keyframes bta-l7{from{transform:translate(-303.41px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l7{animation:bta-l7 0.75s cubic-bezier(.22,.9,.3,1) 0.745s both}
@keyframes bta-l8{from{transform:translate(-393.62px,0) scale(.15);opacity:0}35%{opacity:1}70%{transform:translate(0,0) scale(1.08)}}
.bta-l8{animation:bta-l8 0.75s cubic-bezier(.22,.9,.3,1) 0.790s both}

/* Buttons */
.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 var(--space-5);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--hbc-700);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.button:hover { color: #ffffff; background: var(--hbc-800); }
.button--secondary {
    background: var(--surface);
    border-color: var(--border-control);
    color: var(--text);
    font-weight: 600;
}
.button--secondary:hover { background: var(--surface-alt); border-color: var(--navy-900); color: var(--text); }

.text-link { font-weight: 600; }

/* Sections */
.section { padding: var(--space-8) 0; }
@media (min-width: 720px) { .section { padding: var(--space-9) 0; } }
.section--alt { background: var(--surface-alt); }

.section-title {
    font-size: clamp(1.625rem, 3vw, 1.875rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-3);
    max-width: 30ch;
}
.section-title--gap { margin-bottom: var(--space-6); }
.section-title--sub { font-size: 1.35rem; margin-top: var(--space-7); }

.section-lede {
    color: var(--text-muted);
    font-size: 1.0625rem;
    max-width: var(--measure);
    margin-bottom: var(--space-6);
}

.split { display: grid; gap: var(--space-4) var(--space-7); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.3fr; align-items: start; } }

.prose { color: var(--text-muted); font-size: 1.0625rem; max-width: var(--measure); }
.prose h3 { color: var(--text); font-size: 1.1rem; margin: 28px 0 8px; }
.prose strong { color: var(--text); }

.section-lede--flush { margin-bottom: 0; }

/* A list of short points: a bold term and a line or two, divided by rules rather than boxed as cards. */
.feature-list {
    display: grid;
    gap: 0 var(--space-7);
    margin: 0;
}
.feature-list--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.feature-list--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.feature-list > div { padding: var(--space-4) 0 var(--space-5); border-top: 1px solid var(--border); }
.feature-list dt { color: var(--text); font-weight: 700; font-size: 1.0625rem; margin-bottom: 4px; }
.feature-list dt a { color: inherit; }
.feature-list dt a:hover { color: var(--link); }
.feature-list dd { margin: 0; color: var(--text-muted); }

/* Product cards */
.product-grid { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .product-grid { grid-template-columns: 1fr 1fr; } }

.product {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    color: var(--text-muted);
}

.product-head { display: flex; align-items: center; gap: 14px; }
.product-head img { width: 48px; height: 48px; flex: none; }
.product-head h3 { color: var(--text); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.015em; }
.product-tag { color: var(--text-subtle); font-size: 0.9rem; margin: 2px 0 0; }

.product-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.45em;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--hbc-500);
    border-bottom: 2px solid var(--hbc-500);
    transform: rotate(-45deg);
}
.ticks strong { color: var(--text); }
.ticks--large { color: var(--text-muted); font-size: 1.0625rem; gap: 14px; }

/* Card grid */
.card-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    color: var(--text-muted);
}
.card h3, .card-title { color: var(--text); font-size: 1.0625rem; font-weight: 700; margin-bottom: var(--space-2); }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--link); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.card-head h3 { margin-bottom: 0; }

.badge {
    flex: none;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text-subtle);
    font-size: 0.8125rem;
    font-weight: 600;
}
.badge--live { background: #e8f5ee; border-color: #bfe3cf; color: #176b40; }

.link-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 6px; }

/* Call to action */
.cta { background: var(--surface-alt); border-top: 1px solid var(--border); }
.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}
.cta p { color: var(--text-muted); }

.not-found { min-height: 50vh; }

/* Footer: the one navy band */
.site-footer {
    background: var(--navy-900);
    color: var(--on-navy-muted);
    padding: var(--space-7) 0 var(--space-5);
    font-size: 0.95rem;
}
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: var(--orange-300); }
.site-footer :focus-visible { outline-color: var(--orange-300); }

.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-about p { margin-top: var(--space-3); max-width: 32ch; }

.footer-col { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col h2 {
    color: var(--on-navy);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }

.footer-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2) var(--space-5);
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--navy-800);
    font-size: 0.85rem;
}

/* Keep a phone number on one line instead of breaking it at the hyphen. */
a[href^="sms:"] {
    white-space: nowrap;
}
