/* ─────────────────────────────────────────────
   Medal Engraving – Stylesheet
   Aesthetic: Industrial race / dark gold
   Fonts: Bebas Neue (display) + DM Sans (body)
───────────────────────────────────────────── */

:root {
    --gold:        #d4a843;
    --gold-light:  #e8c870;
    --gold-dark:   #a07830;
    --black:       #0d0d0d;
    --surface:     #161616;
    --surface-2:   #1f1f1f;
    --surface-3:   #2a2a2a;
    --text:        #f0ece4;
    --text-muted:  #8a8278;
    --border:      #2e2c28;
    --error:       #e05252;
    --success:     #52c07a;
    --radius:      4px;
    --radius-lg:   10px;
    --transition:  0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--black);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Typography ── */
h1, h2, h3 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.04em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Layout ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--narrow {
    max-width: 640px;
}

.site-main { flex: 1; }

/* ── Header ── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(13,13,13,0.92);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--text);
    letter-spacing: 0.06em;
}
.logo-icon { color: var(--gold); font-size: 1.4rem; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-step { color: var(--text-muted); transition: color var(--transition); }
.nav-step.active { color: var(--gold); }
.nav-divider { color: var(--border); }

/* ── Hero ── */
.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem 5rem;
    text-align: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    background: radial-gradient(circle, var(--gold), transparent 70%);
}
.hero-circle--1 { width: 600px; height: 600px; top: -200px; left: 50%; transform: translateX(-50%); opacity: 0.1; }
.hero-circle--2 { width: 300px; height: 300px; bottom: -100px; left: 10%; }
.hero-circle--3 { width: 200px; height: 200px; top: 50px; right: 5%; }

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    animation: fadeUp 0.6s ease both;
}
.hero-title {
    color: var(--text);
    margin-bottom: 1.25rem;
    animation: fadeUp 0.6s 0.1s ease both;
}
.hero-title em { color: var(--gold); font-style: normal; }
.hero-subtitle {
    max-width: 500px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.05rem;
    animation: fadeUp 0.6s 0.2s ease both;
}

/* ── Search Section ── */
.search-section {
    padding: 3rem 0 5rem;
}

.search-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 3rem;
    animation: fadeUp 0.6s 0.3s ease both;
}
.search-card__title {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.search-fields {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.search-group--name {
    flex: 1;
    position: relative;
}

.search-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.search-input-box {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.search-input-box:focus-within {
    border-color: var(--gold);
}

.search-prefix {
    padding: 0 0.2rem 0 1rem;
    color: var(--gold);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    flex-shrink: 0;
    user-select: none;
}

.search-sep {
    flex-shrink: 0;
    padding-bottom: 0.9rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.search-input--bib {
    width: 100px;
    padding-left: 0.3rem;
}

.search-actions {
    display: flex;
    justify-content: flex-end;
}

.search-input {
    flex: 1;
    background: var(--surface-2);
    color: var(--text);
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
}
.search-input::placeholder { color: var(--text-muted); }

.search-btn {
    background: var(--gold);
    color: var(--black);
    border: none;
    padding: 1rem 1.75rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition);
    white-space: nowrap;
}
.search-btn:hover { background: var(--gold-light); }
.search-btn__icon { transition: transform var(--transition); }
.search-btn:hover .search-btn__icon { transform: translateX(3px); }

.search-hint {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── Features ── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    animation: fadeUp 0.6s ease both;
}
.feature:nth-child(2) { animation-delay: 0.1s; }
.feature:nth-child(3) { animation-delay: 0.2s; }

.feature__icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.feature__title { margin-bottom: 0.4rem; color: var(--gold); }
.feature__text { font-size: 0.9rem; color: var(--text-muted); }

/* ── Runner Card ── */
.result-section, .checkout-section, .success-section {
    padding: 3rem 1.5rem 5rem;
}

.runner-card {
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
}
.runner-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
}
.runner-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.runner-card__bib {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 0.06em;
}
.runner-card__event {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.runner-card__name {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    line-height: 1;
}
.runner-card__stats {
    display: flex;
    gap: 2rem;
}

.stat__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.stat__value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: var(--text);
}
.stat__value--big {
    font-size: 2.2rem;
    color: var(--gold);
}

/* ── Order Card / Form ── */
.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    animation: fadeUp 0.5s 0.1s ease both;
}
.order-card__title { margin-bottom: 1.75rem; }

.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.form-optional { color: var(--text-muted); font-size: 0.75em; }
.form-input {
    width: 100%;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--gold); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ── Size Picker ── */
.size-picker {
    display: flex;
    gap: 1rem;
}
.size-option input { position: absolute; opacity: 0; pointer-events: none; }
.size-option__box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    background: var(--surface-2);
}
.size-option input:checked + .size-option__box {
    border-color: var(--gold);
    background: rgba(212,168,67,0.1);
}
.size-option__label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: var(--text);
}

/* ── Medal Preview ── */
.medal-preview {
    text-align: center;
    margin: 2rem 0;
}
.medal-preview__disc {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a3020, #2a2215);
    border: 3px solid var(--gold);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 0 30px rgba(212,168,67,0.2), inset 0 0 20px rgba(0,0,0,0.4);
    transition: all var(--transition);
}
.medal-preview__name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--gold-light);
    text-align: center;
    line-height: 1.2;
}
.medal-preview__time {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--gold);
    letter-spacing: 0.08em;
}
.medal-preview__custom {
    font-size: 0.6rem;
    color: var(--gold-light);
    opacity: 0.8;
    text-align: center;
    margin-top: 2px;
    letter-spacing: 0.04em;
}
.medal-preview__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* ── Price Bar ── */
.price-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.price-bar__label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; color: var(--text-muted); }
.price-bar__price { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--gold); letter-spacing: 0.04em; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
}
.btn--primary {
    background: var(--gold);
    color: var(--black);
}
.btn--primary:hover { background: var(--gold-light); color: var(--black); }
.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--full { width: 100%; margin-bottom: 0.75rem; }

/* ── Order Summary (checkout) ── */
.order-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.5s ease both;
}
.order-summary__title { margin-bottom: 1.25rem; }
.order-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.order-summary__row:last-child { border-bottom: none; }
.order-summary__row span { color: var(--text-muted); }
.order-summary__row--total { padding-top: 1rem; margin-top: 0.5rem; }
.order-summary__row--total strong { color: var(--gold); font-size: 1.2rem; }

/* ── Payment Card ── */
.payment-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    animation: fadeUp 0.5s 0.1s ease both;
}
.payment-card__title { margin-bottom: 1.5rem; }

/* ── Success ── */
.success-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    animation: fadeUp 0.5s ease both;
}
.success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(82,192,122,0.15);
    border: 2px solid var(--success);
    color: var(--success);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: popIn 0.4s 0.3s ease both;
}
.success-title { margin-bottom: 0.75rem; }
.success-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.success-details {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.75rem;
    text-align: left;
}
.success-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}
.success-detail__label { color: var(--text-muted); }
.success-collect {
    background: rgba(212,168,67,0.1);
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    color: var(--gold-light);
}

/* ── Alert ── */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert--error {
    background: rgba(224,82,82,0.1);
    border: 1px solid rgba(224,82,82,0.4);
    color: #f08080;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .site-header { flex-direction: column; gap: 0.75rem; padding: 1rem; }
    .site-nav { font-size: 0.7rem; }
    .runner-card__stats { flex-direction: column; gap: 1rem; }
    .size-picker { justify-content: center; }
    .search-btn { padding: 1rem 1rem; }
    .search-fields { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .search-sep { padding-bottom: 0; text-align: center; }
    .search-input--bib { width: 100%; }
    .search-actions .search-btn { width: 100%; justify-content: center; }
}
