/* Audi Q3 e-hybrid — Brain Bar QR game. Mobile-first, static, no build step.
   Layout mirrors the printed "TUDTAD?" card: key visual with rings + claim on
   top, title + copy, illustration, then the game progress. */
:root {
    color-scheme: dark;
    --bg: #000000;
    --surface: #111111;
    --surface-2: #1c1c1c;
    --line: #2a2a2a;
    --text: #ffffff;
    --muted: #b8b8b8;
    --accent: #f50537; /* Audi red */
    --radius: 3px;
    --font: "AudiType", "AudiTypeScreen", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-ext: "AudiType Extended", "AudiTypeExtended", "AudiType", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --gutter: 8.5%;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

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

/* The phone-wide sheet; on a larger screen it simply sits centred. */
.sheet {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* Hero — key visual, 2:1 like the print; rings and claim in the right column. */
.hero {
    position: relative;
    aspect-ratio: 2 / 1;
    background-color: #1a1e24;
    background-size: cover;
    background-position: center;
    padding-top: env(safe-area-inset-top);
}
.hero::after {
    /* Keep the white type legible over the sky without flattening the car. */
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.28) 100%);
    pointer-events: none;
}
.rings {
    position: absolute;
    top: 15%;
    left: 58%;
    width: 23%;
    color: var(--text);
    z-index: 1;
}
.rings svg { display: block; width: 100%; height: auto; }
.claim {
    position: absolute;
    top: 38%;
    left: 58%;
    right: 4%;
    z-index: 1;
    font-family: var(--font-ext);
    letter-spacing: .02em;
    line-height: 1.22;
    font-size: clamp(15px, 4.6vw, 20px);
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.claim strong {
    display: block;
    font-weight: 700;
    font-size: 1.2em;
    margin-bottom: .1em;
}
.claim span { display: block; }

/* Content */
.page {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card, .intro, .form {
    padding: 26px var(--gutter) 0;
}
.card-title {
    font-family: var(--font-ext);
    font-weight: 400;
    font-size: clamp(21px, 6vw, 26px);
    line-height: 1.2;
    letter-spacing: .01em;
}
.card-body { margin-top: 14px; font-size: 15px; line-height: 1.45; }
.card-body p + p { margin-top: 12px; }

.card-figure {
    margin: 22px calc(-1 * var(--gutter)) 0;
    padding: 0 3%;
}
.card-figure img {
    width: auto; max-width: 100%;
    max-height: 60vh;
    margin: 0 auto;
}

/* Game block: separated from the "printed" part by a thin rule. */
.game {
    margin-top: 28px;
    padding: 22px var(--gutter) 30px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 18px;
}
.progress-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 13px; color: var(--muted);
}
.progress-count { font-size: 14px; color: var(--text); }
.progress-count strong { font-size: 22px; font-family: var(--font-ext); }
.segments { list-style: none; display: flex; gap: 4px; margin-top: 10px; }
.segments li { flex: 1; height: 5px; background: var(--surface-2); border-radius: 2px; }
.segments li.is-done { background: var(--accent); }
.cards { list-style: none; margin-top: 14px; display: grid; gap: 5px; }
.cards li {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
}
.cards li.is-done { color: var(--text); }
.cards li.is-current { border-color: var(--accent); }
.cards .tick {
    width: 24px; height: 24px; flex: 0 0 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-size: 12px; font-weight: 700;
}
.cards li.is-done .tick { background: var(--accent); border-color: var(--accent); color: #fff; }

.note { color: var(--muted); font-size: 14px; }

.cta {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 18px;
    display: grid; gap: 10px;
}
.cta-title { font-family: var(--font-ext); font-size: 19px; }
.cta p { color: var(--muted); font-size: 14px; }

.btn {
    display: block; width: 100%;
    background: var(--accent); color: #fff;
    text-align: center; text-decoration: none;
    font: inherit; font-weight: 700; font-size: 16px;
    padding: 15px 18px;
    border: 0; border-radius: var(--radius);
    cursor: pointer;
}
.btn:hover { background: #d30430; }
.btn.ghost { background: transparent; border: 1px solid var(--line); margin-top: 24px; }

/* Form */
.form { display: grid; gap: 16px; padding-bottom: 30px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field input {
    width: 100%;
    font: inherit; font-size: 16px; color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 14px;
}
.field input:focus { outline: none; border-color: var(--text); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 18px; }
.check a { color: var(--text); }
.error { display: block; color: var(--accent); font-style: normal; font-size: 13px; }
.form .btn { margin-top: 6px; }

/* Footer */
.foot {
    margin-top: auto;
    padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom));
    display: flex; justify-content: space-between; gap: 12px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--line);
}
.foot-brand { font-family: var(--font-ext); letter-spacing: .04em; }
