/*
 * The WrestleVRS landing page. Colours, type, and materials follow
 * docs/visual-style-guide.md ("Ringside", 2.0): near-black surfaces, red as a
 * signal, Jockey One in capitals for display, Figtree for reading.
 */

@font-face {
    font-family: "Jockey One";
    src: url("/assets/fonts/jockey_one_regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Figtree";
    src: url("/assets/fonts/figtree_variable.ttf") format("truetype");
    font-weight: 300 900;
    font-display: swap;
}

:root {
    --black: #050607;
    --surface-1: #0E1011;
    --surface-2: #131516;
    --surface-3: #191B1D;
    --border: #292C2E;
    --border-strong: #3B3E40;
    --text-primary: #F2F2F0;
    --text-secondary: #A6A8A8;
    --text-tertiary: #686C6E;
    --red: #D9272E;
    --red-bright: #F13A3F;
    --red-dark: #8F171D;
    --green: #32B66A;
    --ink: #000000;
    --display: "Jockey One", Impact, "Arial Narrow", sans-serif;
    --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--black);
    color: var(--text-primary);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* -- The backdrop: the arena with the house lights down -------------------- */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        url("/assets/screentone.svg") top right / 560px 420px no-repeat,
        radial-gradient(ellipse 70% 55% at 100% 0%, rgba(217, 39, 46, 0.22), transparent 70%),
        radial-gradient(ellipse 55% 60% at 38% -8%, rgba(255, 226, 180, 0.10), transparent 70%),
        linear-gradient(180deg, rgba(12, 13, 14, 0.55) 0%, rgba(6, 7, 8, 0.92) 62%, #050607 100%),
        url("/assets/stadium.webp") center 18% / cover no-repeat,
        #0C0D0E;
}

.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/assets/grain.svg");
    opacity: 0.06;
    mix-blend-mode: overlay;
}

/* -- Layout ---------------------------------------------------------------- */

.stage {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: max(56px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 64px;
    align-items: center;
}

.pitch { max-width: 520px; }

/* -- Marks ----------------------------------------------------------------- */

/* Cloth tape, torn at both ends and square to the page. */
.tape {
    display: inline-block;
    padding: 5px 16px 4px;
    background: #2A2C2E;
    color: var(--text-primary);
    font-family: var(--body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    clip-path: polygon(
        0 8%, 3% 0, 97% 4%, 100% 0, 98% 30%, 100% 52%, 97% 74%, 100% 100%,
        4% 96%, 0 100%, 2% 70%, 0 48%, 3% 26%
    );
}

.tape-green { background: #1F6B40; }

.wordmark {
    margin: 18px 0 4px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(64px, 11vw, 120px);
    line-height: 0.9;
    letter-spacing: 0.01em;
    /* The wordmark is a brand composition, set as designed, not in capitals. */
    text-shadow: 4px 4px 0 var(--ink);
}

/* The paint stroke: the one red rule, made by hand. */
.paint {
    width: 200px;
    height: 12px;
    margin: 6px 0 36px;
    background: url("/assets/paint.svg") left center / 100% 100% no-repeat;
}

.headline {
    margin: 0 0 10px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.05;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow: 3px 3px 0 var(--ink);
}

.lede {
    margin: 0 0 32px;
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 30em;
}

/* -- The signup ------------------------------------------------------------ */

.signup-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.signup input[type="email"] {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--body);
    font-size: 17px;
    outline: none;
    transition: border-color 120ms;
}

.signup input[type="email"]::placeholder { color: var(--text-tertiary); }
.signup input[type="email"]:focus { border-color: var(--border-strong); background: var(--surface-3); }
.signup input[aria-invalid="true"] { border-color: var(--red); }

/* Red vinyl on a lip, drawn inside an ink line: the primary button. */
.ring-button {
    flex: none;
    height: 54px;
    padding: 0 26px;
    border: 2.5px solid var(--ink);
    border-radius: 10px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.09) 0 1px, transparent 1.5px) 0 0 / 5px 5px,
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.14) 0 1px, transparent 1.5px) 0 0 / 6px 6px,
        linear-gradient(180deg, var(--red-bright) 0%, var(--red) 55%, #B81F25 100%);
    color: #FFFFFF;
    font-family: var(--display);
    font-size: 21px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 5px 0 var(--red-dark), 0 7px 0 var(--ink);
    transform: translateY(-5px);
    margin-top: 5px;
    cursor: pointer;
    transition: transform 70ms, box-shadow 70ms, filter 120ms;
}

.ring-button:hover { filter: brightness(1.06); }
.ring-button:active {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 var(--red-dark), 0 3px 0 var(--ink);
}
.ring-button:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 4px; }
.ring-button[disabled] { cursor: progress; filter: saturate(0.6) brightness(0.85); }

.fine {
    margin: 14px 0 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.fine.error { color: var(--red-bright); }

.trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.done-line {
    margin: 12px 0 0;
    font-family: var(--display);
    font-size: 28px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

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

/* -- The teaser: a featured panel ------------------------------------------ */

/* The drop shadow lives on the wrapper so the cut corner keeps its hard ink. */
.teaser {
    /* As tall as the window allows, up to 400 wide, so the whole frame stays in view. */
    width: clamp(260px, calc((100vh - 150px) * 9 / 16), 400px);
    width: clamp(260px, calc((100dvh - 150px) * 9 / 16), 400px);
    filter: drop-shadow(7px 7px 0 var(--ink));
}

.panel {
    position: relative;
    margin: 0;
    aspect-ratio: 9 / 16;
    padding: 7px;
    background: linear-gradient(135deg, #5B5F62 0%, #2E3133 38%, #4A4E51 62%, #232527 100%);
    border-radius: 12px;
    /* The cut: the bottom-end corner, the one angle in the system. */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 42px), calc(100% - 42px) 100%, 0 100%);
}

/* The mark: a short bar of the brand colour on the top edge. */
.panel::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    left: 28px;
    width: 72px;
    height: 7px;
    background: var(--red);
}

.panel video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    border-radius: 6px;
    outline: 2.5px solid var(--ink);
    outline-offset: -1px;
}

.sound {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 8px 14px 7px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: rgba(14, 16, 17, 0.82);
    color: var(--text-primary);
    font-family: var(--display);
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 3px 0 var(--ink);
    cursor: pointer;
}

.sound:hover { background: rgba(25, 27, 29, 0.92); }
.sound:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

/* -- Footer ---------------------------------------------------------------- */

.foot {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px max(24px, env(safe-area-inset-bottom));
    color: var(--text-tertiary);
    font-size: 14px;
}

.foot a { color: var(--text-secondary); text-underline-offset: 3px; }
.foot a:hover { color: var(--text-primary); }

/* -- Narrow windows -------------------------------------------------------- */

@media (max-width: 860px) {
    .stage {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        padding-top: max(36px, env(safe-area-inset-top));
    }
    .pitch { max-width: none; }
    .teaser { width: min(100%, 360px); justify-self: center; }
    /* Keep the screen-tone in the corner, clear of the reading text. */
    .backdrop {
        background-size: 300px 225px, auto, auto, auto, cover, auto;
    }
}

@media (max-width: 480px) {
    .signup-row { flex-direction: column; gap: 14px; }
    .signup input[type="email"] { flex: none; }
    .ring-button { width: 100%; }
    .paint { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .ring-button { transition: none; }
}
