/* ============================================================================
   Amathlon home page — "Home of every game" (2026-09-23)
   ----------------------------------------------------------------------------
   The home page only. results-methodology.html and terms.html still use
   site.css; the two files share nothing, so a change here cannot reach them.

   Dark, full-colour photography, one accent (lime). Fraunces for headlines,
   Inter for everything else. Mobile first; the layout widens at 700px and
   again at 1000px.

   The hero is pure CSS: six photos, six typed phrases and six progress bars
   all run the same 15s loop, each offset by --i x 2.5s, so they can never
   drift out of step with one another.
   ========================================================================= */

:root {
    --ink: #0B0C0E;
    --panel: #131518;
    --card: #1A1D21;
    --lime: #D9F55C;
    --text: #FFFFFF;
    --muted: rgba(255, 255, 255, 0.72);
    --faint: rgba(255, 255, 255, 0.55);
    --line: rgba(255, 255, 255, 0.10);

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --loop: 15s;
    --beat: 2.5s;
    --gutter: 20px;

    color-scheme: dark;
}

@media (min-width: 700px) { :root { --gutter: 48px; } }
@media (min-width: 1000px) { :root { --gutter: 96px; } }

/* ---------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--ink); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 10;
    background: var(--lime); color: var(--ink); padding: 10px 16px;
    border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* -------------------------------------------------------------- buttons -- */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 30px; border-radius: 999px;
    font: 700 16px/1 var(--sans); text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn--solid { background: #FFFFFF; color: var(--ink); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); }
.btn--ghost { color: var(--text); border: 1.5px solid rgba(255, 255, 255, 0.4); font-weight: 600; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14.5px; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
    .btn--solid:hover { background: var(--lime); }
    .btn--ghost:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
}

.eyebrow {
    display: flex; align-items: center; gap: 12px;
    font-size: 12.5px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
    color: var(--lime);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--lime); }

.h2 {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(36px, 5vw, 64px); line-height: 1.06; letter-spacing: -0.01em;
}
.h2 em, .confirm__h em { color: var(--lime); }

/* --------------------------------------------------------------- header -- */

.hn {
    position: absolute; top: 0; left: 0; right: 0; z-index: 5;
    display: flex; align-items: center; gap: 12px;
    padding: 16px var(--gutter);
}
.hn__brand {
    display: inline-flex; align-items: center; gap: 9px; margin-right: auto;
    font-family: var(--serif); font-weight: 600; font-size: 20px; text-decoration: none;
}
.hn__brand img { width: 26px; height: 26px; }
.hn__links, .hn__cta { display: none; }

@media (min-width: 700px) {
    .hn { padding-top: 26px; gap: 16px; }
    .hn__brand { font-size: 21px; margin-right: 0; }
    .hn__links { display: flex; gap: 28px; margin: 0 auto 0 36px; font-size: 15px; }
    .hn__links a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
    .hn__links a:hover { color: #FFFFFF; }
    .hn__cta { display: inline-flex; }
}

/* ----------------------------------------------------------------- hero -- */

.hero {
    position: relative; overflow: hidden;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    padding: 88px var(--gutter) 40px;
    text-align: center;
}
.hero__photos { position: absolute; inset: 0; }
.hero__photos::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 12, 14, 0.72) 0%, rgba(11, 12, 14, 0.55) 50%, var(--ink) 100%);
}
.ph {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: var(--pos-m);
    filter: saturate(1.05) brightness(0.92);
    opacity: 0;
    animation: cycle var(--loop) ease-in-out infinite;
    animation-delay: calc(var(--i) * var(--beat));
}
@keyframes cycle {
    0%, 1.3% { opacity: 0; }
    5%, 14% { opacity: 1; }
    17.5%, 100% { opacity: 0; }
}

.hero__body {
    position: relative; z-index: 1; width: 100%; max-width: 1200px;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.hero__h { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.motto {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(52px, 7.8vw, 112px); line-height: 1.02; letter-spacing: -0.02em;
}
.motto > span { display: block; }

/* The typed line. Each phrase is clipped to zero width and "typed" open in
   steps, holds, deletes, then hides until its turn comes round again. The
   lime border is the caret. Centred, so it types outward from the middle. */
.typed {
    position: relative; display: block; width: 100%;
    height: 1.25em;
    font-family: var(--serif); font-weight: 500; font-style: italic;
    font-size: clamp(36px, 4.6vw, 66px); line-height: 1.2;
    color: var(--lime);
}
.typed em {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    max-width: 0; overflow: hidden; white-space: nowrap;
    border-right: 0.055em solid var(--lime); padding-right: 0.06em;
    opacity: 0;
    animation: type var(--loop) linear infinite;
    animation-delay: calc(var(--i) * var(--beat));
}
@keyframes type {
    0% { opacity: 1; max-width: 0; animation-timing-function: steps(11, end); }
    6.5% { opacity: 1; max-width: 7em; }
    13.5% { opacity: 1; max-width: 7em; animation-timing-function: steps(8, end); }
    16.2% { opacity: 1; max-width: 0; }
    16.4%, 100% { opacity: 0; max-width: 0; }
}

.hero__cta {
    display: flex; flex-direction: column; gap: 10px; width: 100%;
    margin-top: 8px;
}
.bars { display: flex; justify-content: center; gap: 7px; margin-top: 6px; }
.bars span {
    position: relative; width: 26px; height: 3px; border-radius: 99px;
    background: rgba(255, 255, 255, 0.25); overflow: hidden;
}
.bars span::after {
    content: ""; position: absolute; inset: 0; background: var(--lime); opacity: 0;
    animation: cycle var(--loop) ease-in-out infinite;
    animation-delay: calc(var(--i) * var(--beat));
}

@media (min-width: 600px) {
    .motto > span { display: inline; }
}
@media (min-width: 700px) {
    .hero { padding-top: 110px; }
    .hero__photos::after {
        background:
            radial-gradient(ellipse at 50% 50%, rgba(10, 10, 12, 0.78) 0%, rgba(10, 10, 12, 0.55) 50%, rgba(10, 10, 12, 0.35) 100%),
            linear-gradient(180deg, transparent 78%, var(--ink) 100%);
    }
    .ph { object-position: var(--pos); }
    .hero__body { gap: 24px; }
    .hero__h { gap: 16px; }
    .hero__cta { flex-direction: row; justify-content: center; width: auto; gap: 16px; }
    .bars { gap: 8px; }
    .bars span { width: 34px; }
}

/* ----------------------------------------------------------- how it works -- */

.how { padding: 60px 0 56px; }
.how__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.how__head > div { display: flex; flex-direction: column; gap: 12px; }

.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.step {
    border-radius: 18px; overflow: hidden;
    background: var(--card); border: 1px solid var(--line);
}
.step__img { position: relative; height: 104px; background: var(--panel); }
.step__img img { width: 100%; height: 100%; object-fit: cover; }
.step__img i {
    position: absolute; left: 10px; top: 10px;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--lime); color: var(--ink);
    font: 600 14px/1 var(--serif); font-style: normal;
}
.step h3 {
    padding: 12px 13px 14px;
    font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 1.2;
}

@media (min-width: 1000px) {
    .how { padding: 110px 0 120px; }
    .how__head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 56px; }
    .how__head > div { gap: 18px; }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 24px; }
    .step { background: none; border: 0; border-radius: 0; overflow: visible; }
    .step__img { height: 250px; border-radius: 22px; overflow: hidden; }
    .step__img i { left: 18px; top: 18px; width: 44px; height: 44px; font-size: 20px; }
    .step h3 { padding: 18px 0 0; font-size: 26px; }
}

/* ------------------------------------------------------------ confirmed -- */

.confirm {
    position: relative; overflow: hidden;
    min-height: 380px; display: flex; align-items: center; justify-content: center;
    padding: 56px var(--gutter); text-align: center;
}
.confirm__bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 52% 50%;
    filter: saturate(1.05) brightness(0.95);
}
.confirm::after { content: ""; position: absolute; inset: 0; background: rgba(11, 12, 14, 0.62); }
.confirm__body { position: relative; z-index: 1; max-width: 900px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.confirm__h {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(40px, 5.6vw, 80px); line-height: 1.06; letter-spacing: -0.02em;
}
.confirm__h em { display: block; }

@media (min-width: 1000px) {
    .confirm { min-height: 620px; }
    .confirm__bg { object-position: 52% 45%; }
    .confirm__body { gap: 24px; }
}

/* ------------------------------------------------------------- partners -- */

.partners { padding: 56px 0; }
.partners .h2 { margin: 12px 0 24px; }
.pr { display: flex; flex-direction: column; gap: 12px; }
.pr__row {
    display: flex; align-items: center; gap: 16px;
    padding: 14px; border-radius: 18px;
    background: var(--card); border: 1px solid var(--line);
    text-decoration: none; scroll-margin-top: 24px;
    transition: border-color 160ms ease, background-color 160ms ease;
}
.pr__img { position: relative; flex-shrink: 0; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--panel); }
.pr__img img { width: 100%; height: 100%; object-fit: cover; }
.pr__tx { display: flex; flex-direction: column; gap: 4px; }
.pr__tx b { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.2; }
.pr__tx i { margin-top: 2px; font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--lime); }
@media (hover: hover) and (pointer: fine) {
    .pr__row:hover { border-color: rgba(217, 245, 92, 0.5); background: #1E2126; }
}

@media (min-width: 1000px) {
    .partners { padding: 120px 0; }
    .partners .h2 { margin: 18px 0 48px; }
    .pr { flex-direction: row; gap: 24px; }
    .pr__row { flex: 1 1 0; padding: 0; gap: 0; height: 220px; border-radius: 26px; overflow: hidden; align-items: stretch; }
    .pr__img { width: 230px; height: auto; border-radius: 0; }
    .pr__tx { padding: 34px; justify-content: center; gap: 10px; }
    .pr__tx b { font-size: 32px; line-height: 1.1; }
    .pr__tx i { margin-top: 6px; font-size: 15px; }
}

/* ---------------------------------------------------------------- final -- */

.final {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
    padding: 64px var(--gutter); text-align: center;
    border-top: 1px solid var(--line);
}
.final::before {
    content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(1100px, 140vw); height: 460px; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(217, 245, 92, 0.13) 0%, rgba(217, 245, 92, 0) 65%);
}
.final > * { position: relative; }
.final__h {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(46px, 6.7vw, 96px); line-height: 1.04; letter-spacing: -0.02em;
}
.final__h > span { display: block; }
.final .hero__cta { margin-top: 4px; }

@media (min-width: 600px) { .final__h > span { display: inline; } }
@media (min-width: 1000px) {
    .final { min-height: 560px; justify-content: center; gap: 28px; }
}

/* --------------------------------------------------------------- footer -- */

.ft { background: var(--panel); padding: 40px 0 32px; }
.ft__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.ft__brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.ft__brand .hn__brand { margin: 0; }
.ft__brand p { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--lime); }
.ft h4 { margin-bottom: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); }
.ft ul { display: flex; flex-direction: column; gap: 9px; }
.ft ul a { font-size: 14.5px; color: rgba(255, 255, 255, 0.84); text-decoration: none; }
.ft ul a:hover { color: #FFFFFF; text-decoration: underline; }
.ft__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
    margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line);
    font-size: 13px; color: var(--faint);
}
.ft__bottom a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }

@media (min-width: 1000px) {
    .ft { padding: 56px 0 40px; }
    .ft__grid { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 40px; }
    .ft__brand { grid-column: auto; }
}

/* -------------------------------------------------------- reduced motion -- */
/* Everything stands still: the first sport, the first phrase fully typed,
   the first bar lit. Nothing is hidden, nothing moves. */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ph, .typed em, .bars span::after { animation: none; }
    .ph[style*="--i:0"] { opacity: 1; }
    .typed em[style*="--i:0"] { opacity: 1; max-width: none; border-right-color: transparent; }
    .bars span[style*="--i:0"]::after { opacity: 1; }
    .btn, .pr__row { transition: none; }
}
