/* ============================================================
   GLOBAL
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f3e0c6;
    color: #111111;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(100% - 40px, 1000px);
    margin: 0 auto;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    padding: 65px 0 35px;
    text-align: center;
}

.brand h1 {
    margin: 0;
    font-size: clamp(56px, 10vw, 105px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -4px;
}

.brand-holmdel {
    color: #000000;
}

.brand-hack {
    color: #d98200;
}

.brand p {
    margin: 22px 0 0;
    color: #8c4e0b;
    font-size: clamp(16px, 2.5vw, 25px);
    font-weight: 800;
    letter-spacing: 3px;
}


/* ============================================================
   TAB NAVIGATION
   ============================================================ */

.tab-navigation {
    margin-bottom: 50px;
}

.tab-container {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.tab-button {
    border: none;
    background: transparent;
    color: #8c4e0b;
    padding: 15px 34px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    transition: 0.2s ease;
}

.tab-button:hover {
    background: rgba(0, 0, 0, 0.06);
}

.tab-button.active {
    background: #000000;
    color: #ffffff;
}


/* ============================================================
   TAB PAGES
   ============================================================ */

.tab-page {
    display: none;
}

.tab-page.active-page {
    display: block;
}


/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    padding: 45px;
    margin-bottom: 35px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.section-heading {
    margin-bottom: 42px;
}

.section-heading.centered {
    text-align: center;
}

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #d98200;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
}

.section-heading h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1px;
}

.subsection-heading {
    margin: 45px 0 22px;
}

.subsection-heading h3 {
    margin: 0;
    font-size: 21px;
    font-weight: 900;
}

.subsection-heading p {
    margin: 6px 0 0;
    color: #6f5a47;
    font-size: 14px;
}

.mileage-heading {
    margin-top: 48px;
}


/* ============================================================
   FORM
   ============================================================ */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #111111;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

input,
select {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 14px;
    padding: 0 18px;
    background: #000000;
    color: #ffffff;
    outline: none;
    font-size: 17px;
    font-weight: 700;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

select {
    cursor: pointer;
}

input:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(217, 130, 0, 0.35);
}


/* ============================================================
   TEAM
   ============================================================ */

.team-intro {
    margin: -15px 0 25px;
    color: #6f5a47;
    font-size: 14px;
}

.team-runner-card {
    margin-bottom: 18px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.team-runner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.team-runner-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
}

.team-runner-header span {
    color: #8c4e0b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.team-mileage-heading {
    margin-top: 18px;
    margin-bottom: 14px;
}

.team-mileage-heading h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.team-mileage-heading p {
    margin: 4px 0 0;
    color: #6f5a47;
    font-size: 12px;
}


/* ============================================================
   BUTTON
   ============================================================ */

.predict-button {
    width: 100%;
    margin-top: 38px;
    padding: 21px 30px;
    border: none;
    border-radius: 16px;
    background: #000000;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.predict-button:hover {
    background: #222222;
    transform: translateY(-2px);
}

.predict-button:active {
    transform: translateY(0);
}


/* ============================================================
   ERRORS
   ============================================================ */

.error-message {
    min-height: 24px;
    margin: 18px 0 0;
    color: #a32222;
    text-align: center;
    font-weight: 700;
}


/* ============================================================
   RESULTS
   ============================================================ */

.results-card {
    background: #000000;
    color: #ffffff;
    border-radius: 30px;
    padding: 58px 35px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.results-label {
    color: #d98200;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 2px;
}

.prediction-time {
    margin-top: 18px;
    font-size: clamp(70px, 12vw, 100px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -4px;
}

.prediction-caption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.range-box {
    margin: 40px auto 0;
    padding: 22px;
    max-width: 500px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.range-label {
    color: #d98200;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.range-value {
    margin-top: 6px;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
}


/* ============================================================
   TEAM RESULTS
   ============================================================ */

.team-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 35px auto 0;
}

.team-result-box {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.team-result-box span {
    display: block;
    margin-bottom: 7px;
    color: #d98200;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.team-result-box strong {
    font-size: 26px;
}

.team-runners-list {
    max-width: 600px;
    margin: 25px auto 0;
}

.team-runner-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 17px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.team-runner-result.counted {
    background: rgba(217, 130, 0, 0.18);
}

.team-runner-left {
    text-align: left;
}

.team-runner-left strong {
    display: block;
    font-size: 14px;
}

.team-runner-left span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.team-runner-time {
    font-size: 19px;
    font-weight: 900;
}


/* ============================================================
   ABOUT
   ============================================================ */

.about-card {
    padding: 55px;
}

.about-section {
    margin-bottom: 38px;
}

.about-section h3 {
    margin: 0 0 9px;
    font-size: 21px;
    font-weight: 900;
}

.about-section p {
    margin: 0;
    color: #4f4236;
    font-size: 16px;
    line-height: 1.75;
}

.about-signoff {
    margin-top: 55px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    color: #4f4236;
}

.about-signoff p {
    margin: 0 0 12px;
}

.signature {
    color: #111111;
    font-size: 22px;
    font-weight: 700;
    font-style: italic;
}


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

.site-footer {
    padding: 55px 0 70px;
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: #8c4e0b;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
}


/* ============================================================
   SHARE
   ============================================================ */

.share-results-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.share-results-button {
    width: 100%;
    max-width: 500px;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 0.75rem;
    background: #000000;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.share-results-button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.share-results-button:active {
    transform: translateY(0);
}


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

.hidden {
    display: none !important;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .container {
        width: min(100% - 26px, 1000px);
    }

    .site-header {
        padding-top: 40px;
    }

    .brand h1 {
        letter-spacing: -2px;
    }

    .brand p {
        letter-spacing: 1.5px;
    }

    .tab-navigation {
        margin-bottom: 30px;
    }

    .tab-button {
        padding: 13px 20px;
        font-size: 13px;
    }

    .card {
        padding: 28px 22px;
        border-radius: 22px;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .prediction-time {
        font-size: 70px;
        letter-spacing: -3px;
    }

    .about-card {
        padding: 30px 22px;
    }

    .team-result-summary {
        grid-template-columns: 1fr;
    }

    .team-runner-card {
        padding: 17px;
    }

}