/* =============================================================
   Is It A Cycling Morning? — Stylesheet
   Bold, mobile-first, no build step.
   ============================================================= */

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

:root {
    --orange:   #F97316;
    --green:    #15803D;
    --red:      #B91C1C;
    --unknown:  #1E3A5F;
    --dark:     #0A0F1A;
    --dark-2:   #111827;
    --card:     #1A2236;
    --border:   #2D3A52;
    --light:    #F8FAFC;
    --muted:    rgba(248, 250, 252, 0.45);
    --warn-bg:  #78350F;
    --warn-fg:  #FDE68A;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}


/* =============================================================
   VERDICT SECTION
   ============================================================= */

#verdict {
    min-height: 100svh;
    min-height: 100vh; /* fallback */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem 5rem;
    position: relative;
    transition: background 0.4s;
}

#verdict.yes     { background: var(--green); }
#verdict.no      { background: var(--red); }
#verdict.unknown { background: var(--unknown); }

.verdict-eyebrow {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.75rem;
}

.verdict-word {
    font-size: clamp(5.5rem, 32vw, 22rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.03em;
    color: #fff;
    /* Slight text shadow to punch off the background */
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.verdict-reason {
    font-size: clamp(1.25rem, 3.5vw, 1.75rem);
    font-weight: 600;
    margin-top: 1.75rem;
    max-width: 520px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
}

.warn-inline {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--warn-fg);
    max-width: 480px;
}

.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.15s;
}
.scroll-cue:hover { color: rgba(255, 255, 255, 0.75); }
.scroll-cue-arrow {
    font-size: 1.25rem;
    animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(7px); }
}


/* =============================================================
   SIGNALS SECTION
   ============================================================= */

#signals {
    background: var(--dark-2);
    padding: 3.5rem 1.5rem 3rem;
    border-top: 1px solid var(--border);
}

.section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--orange);
    text-align: center;
    margin-bottom: 1.75rem;
}

.signals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    max-width: 440px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .signals-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 600px;
    }
}

.signal-badge {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color 0.15s;
}

.signal-badge.ok   { border-color: #166534; }
.signal-badge.warn { border-color: #92400E; }
.signal-badge.bad  { border-color: #7F1D1D; }

.signal-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.signal-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
}

.signal-value {
    font-size: 2rem;
    font-weight: 900;
    margin-top: 0.375rem;
    display: block;
    letter-spacing: -0.02em;
    line-height: 1;
}

.signal-badge.ok   .signal-value { color: #4ADE80; }
.signal-badge.warn .signal-value { color: #FCD34D; }
.signal-badge.bad  .signal-value { color: #FCA5A5; }

.data-meta {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.6875rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.data-meta a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* =============================================================
   ROUTES SECTION
   ============================================================= */

#routes {
    background: var(--dark);
    padding: 3.5rem 1.5rem 4rem;
    border-top: 1px solid var(--border);
}

.distance-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.dist-btn {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--light);
    border-radius: 100px;
    padding: 0.4375rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.dist-btn:hover,
.dist-btn.active {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.routes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 760px;
    margin: 0 auto;
}

@media (min-width: 580px) {
    .routes-grid { grid-template-columns: repeat(2, 1fr); }
}

.route-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    transition: border-color 0.15s, transform 0.15s;
}

.route-card:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.route-name {
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.2;
}

.route-distance {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--orange);
    white-space: nowrap;
    flex-shrink: 0;
}

.route-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.tag-easy     { background: #052E16; color: #86EFAC; border: 1px solid #166534; }
.tag-moderate { background: #431407; color: #FED7AA; border: 1px solid #9A3412; }
.tag-hard     { background: #450A0A; color: #FCA5A5; border: 1px solid #991B1B; }
.tag-elev     { background: var(--border); color: var(--muted); border: 1px solid transparent; }

.route-vibe {
    font-size: 0.8125rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.45;
}

.route-start {
    font-size: 0.6875rem;
    color: var(--muted);
}

.route-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.375rem;
    border-top: 1px solid var(--border);
}

.route-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--orange);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    transition: opacity 0.15s;
}

.route-link:hover { opacity: 0.75; }

.route-link-maps {
    color: #fff;
    background: #1A73E8;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

.route-attribution {
    font-size: 0.625rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.routes-empty {
    text-align: center;
    color: var(--muted);
    padding: 2rem;
    font-size: 0.875rem;
    grid-column: 1 / -1;
}

/* Submit CTA */
.submit-cta {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.submit-cta p {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.875rem;
}

.btn-submit {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--orange);
    color: var(--orange);
    border-radius: 100px;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.btn-submit:hover {
    background: var(--orange);
    color: #fff;
}


/* =============================================================
   FOOTER
   ============================================================= */

footer {
    background: #050810;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.8;
}

footer a {
    color: var(--orange);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


/* =============================================================
   LOCATION BANNER
   ============================================================= */

#location-banner {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
    margin: -1.25rem auto 1.5rem;
    max-width: 440px;
    display: none; /* shown by JS */
}

#location-banner.visible { display: block; }


/* =============================================================
   UTILITY
   ============================================================= */

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-cue-arrow { animation: none; }
    .route-card:hover { transform: none; }
}
