@font-face {
    font-family: "Source Sans 3";
    src: url("../fonts/source-sans-3-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Sans 3";
    src: url("../fonts/source-sans-3-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Sans 3";
    src: url("../fonts/source-sans-3-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Barlow Semi Condensed";
    src: url("../fonts/barlow-sc-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Barlow Semi Condensed";
    src: url("../fonts/barlow-sc-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #F7F7F4;
    --ink: #0E1A1E;
    --on-ink: #F7F7F4;
    --panel: #0E1A1E;
    --yellow: #FFD84D;
    --lime: #B6F36B;
    --cyan: #34E0F5;
    --pink: #FF5CA8;
    --line: #DCDDD8;
    --muted: #3d4a4e;
    --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
    --body: "Source Sans 3", "Segoe UI", sans-serif;
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
}

@media (min-width: 768px) {
    body { font-size: 18px; }
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.skip {
    position: absolute;
    left: 8px;
    top: -48px;
    background: var(--yellow);
    color: var(--ink);
    padding: 8px 12px;
    z-index: 30;
}
.skip:focus { top: 8px; }

.wrap {
    width: min(1280px, calc(100% - 40px));
    margin-inline: auto;
}

@media (min-width: 768px) {
    .wrap { width: min(1280px, calc(100% - 80px)); }
}

/* Header */

.site-header {
    background: var(--panel);
    color: var(--on-ink);
}

.site-header .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}

.bar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme {
    display: flex;
    align-items: center;
    margin-left: 4px;
    padding-left: 16px;
    border-left: 1px solid rgba(247, 247, 244, 0.22);
}

.theme-toggle {
    position: relative;
    width: 58px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(247, 247, 244, 0.28);
    border-radius: 999px;
    background: rgba(8, 16, 18, 0.35);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    color: var(--on-ink);
    cursor: pointer;
}

.theme-toggle:hover { border-color: rgba(247, 247, 244, 0.55); }

.theme-toggle:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.theme-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffe9a0, #FFD84D);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-sun,
.theme-moon {
    position: absolute;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-top: -7.5px;
    color: var(--on-ink);
    opacity: 0.62;
    pointer-events: none;
}

.theme-sun { left: 6px; }
.theme-moon { right: 6px; }

html[data-theme="dark"] .theme-knob { transform: translateX(28px); }

html[data-theme="light"] .theme-sun,
html[data-theme="dark"] .theme-moon {
    color: #0E1A1E;
    opacity: 1;
}

@media (max-width: 520px) {
    .theme { margin-left: 0; padding-left: 0; border-left: 0; }
}

.wordmark {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--on-ink);
    text-decoration: none;
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.wordmark:hover { color: var(--on-ink); }
.wordmark img { width: 28px; height: 28px; }

@media (max-width: 520px) {
    .wordmark .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.nav {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    color: var(--on-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--cyan);
}

/* Hero */

.hero {
    background: var(--panel);
    color: var(--on-ink);
    padding: 64px 0;
}

@media (min-width: 768px) {
    .hero { padding: 96px 0; }
}

.hero-grid {
    display: grid;
    gap: 48px;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.hero h1 {
    margin: 0 0 16px;
    font-family: var(--display);
    font-weight: 800;
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--on-ink);
    max-width: 16ch;
}

@media (min-width: 768px) {
    .hero h1 { font-size: 72px; }
}

.hero .lead {
    color: var(--on-ink);
    max-width: 36rem;
}

.hero-figure {
    position: relative;
    margin: 0;
    padding: 24px;
}

.hero-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-codes {
    margin: 0;
    padding: 24px 8px;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(56px, 10vw, 104px);
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--on-ink);
}

.hero-codes span { display: block; }
.hero-codes .hi { color: var(--yellow); }

.hero-figure figcaption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.bracket {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 3px solid;
    pointer-events: none;
}
.bracket-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-color: #B6F36B; border-radius: 8px 0 0 0; }
.bracket-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-color: #FF5CA8; border-radius: 0 8px 0 0; }
.bracket-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-color: #34E0F5; border-radius: 0 0 0 8px; }
.bracket-br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-color: #FFD84D; border-radius: 0 0 8px 0; }

/* Inner mast */

.page-mast {
    background: var(--panel);
    color: var(--on-ink);
    padding: 64px 0;
}

.page-mast h1 {
    margin: 0 0 12px;
    font-family: var(--display);
    font-weight: 800;
    font-size: 40px;
    line-height: 1.05;
    color: var(--on-ink);
}

@media (min-width: 768px) {
    .page-mast { padding: 96px 0; }
    .page-mast h1 { font-size: 56px; }
}

.page-mast p {
    margin: 0;
    max-width: 38rem;
    color: var(--on-ink);
}

/* Type */

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
}

h2 {
    font-size: 28px;
    margin: 0 0 16px;
}

@media (min-width: 768px) {
    h2 { font-size: 36px; }
}

.lead {
    font-size: 1.1rem;
    max-width: 38rem;
}

.measure { max-width: 70ch; }

.muted { color: var(--muted); }

.iso {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lime);
    color: #0E1A1E;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 12px;
    min-height: 40px;
}

/* Sections */

.section {
    padding: 64px 0;
}

@media (min-width: 768px) {
    .section { padding: 96px 0; }
}

.section-primary {
    padding: 64px 0 80px;
}

@media (min-width: 768px) {
    .section-primary { padding: 96px 0 112px; }
}

.band-ink {
    background: var(--panel);
    color: var(--on-ink);
}

.band-ink h2,
.band-ink p { color: var(--on-ink); }

.band-ink a:not(.btn):not(.btn-secondary) { color: var(--cyan); }
.band-ink a:not(.btn):not(.btn-secondary):hover { color: var(--on-ink); }

.hero a.btn,
.band-ink a.btn,
.site-footer a.btn {
    color: #0E1A1E;
}

.hero a.btn:hover,
.band-ink a.btn:hover,
.site-footer a.btn:hover {
    color: #0E1A1E;
}

.hero .btn-secondary,
.band-ink .btn-secondary {
    border-color: var(--on-ink);
    color: var(--on-ink);
}

.hero a.btn-secondary:hover,
.band-ink a.btn-secondary:hover {
    background: var(--on-ink);
    color: var(--panel);
}

.split {
    display: grid;
    gap: 32px;
}

@media (min-width: 768px) {
    .split { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
    .split-wide-main { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}

.diagram {
    width: 100%;
    height: auto;
}

/* Tiles */

.tickets {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .tickets { grid-template-columns: 1fr 1fr; gap: 24px; }
    .tickets-stack { grid-template-columns: 1fr; }
}

.tickets li {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 16px;
    align-items: start;
    padding: 20px 20px 20px 16px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 0;
}

.tickets .picto {
    width: 40px;
    height: 40px;
    color: var(--ink);
}

.tickets .code {
    display: block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

@media (min-width: 768px) {
    .tickets .code { font-size: 28px; }
}

.tickets .bar-yellow { border-left: 4px solid var(--yellow); }
.tickets .bar-lime { border-left: 4px solid var(--lime); }
.tickets .bar-cyan { border-left: 4px solid var(--cyan); }
.tickets .bar-pink { border-left: 4px solid var(--pink); }

/* FAQ */

.faq details {
    border-bottom: 1px solid var(--ink);
}

.faq details:first-child { border-top: 1px solid var(--ink); }

.faq summary {
    cursor: pointer;
    list-style: none;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-weight: 600;
    font-size: 17px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq .chevron {
    width: 20px;
    height: 20px;
    flex: none;
    transition: transform 160ms ease;
}

.faq details[open] .chevron { transform: rotate(180deg); }

.faq details p {
    margin: 0 0 16px;
    color: var(--muted);
    max-width: 70ch;
}

/* Forms */

.form {
    display: grid;
    gap: 16px;
    max-width: 32rem;
}

.form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
}

.form input,
.form textarea {
    font: inherit;
    min-height: 52px;
    padding: 12px 14px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    width: 100%;
}

.form input:focus,
.form textarea:focus {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.form textarea { min-height: 9rem; resize: vertical; }

.form-note {
    margin: 0;
    font-weight: 400;
    font-size: 15px;
    color: var(--muted);
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Buttons */

.btn,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    min-width: 44px;
    padding: 0 20px;
    border-radius: 6px;
    font-family: var(--body);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn {
    background: var(--yellow);
    border: 2px solid var(--yellow);
    color: #0E1A1E;
}

.btn:hover {
    background: #f0c62e;
    border-color: #f0c62e;
    color: #0E1A1E;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--ink);
    color: var(--ink);
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
}

.notice {
    display: none;
    padding: 12px 14px;
    border: 2px solid var(--ink);
    margin: 0 0 16px;
}

.notice:target { display: block; }
.notice-ok { border-color: #1b5e20; }
.notice-err { border-color: #9b1848; }

.mt { margin-top: 24px; }

.vcard p { margin: 0 0 8px; }

.legal {
    font-size: 15px;
    color: var(--muted);
}

/* Footer */

.site-footer {
    background: var(--panel);
    color: var(--on-ink);
    padding: 48px 0 112px;
    font-size: 16px;
}

@media (min-width: 768px) {
    .site-footer { padding: 64px 0; }
}

.site-footer .wrap {
    display: grid;
    gap: 32px;
}

@media (min-width: 768px) {
    .site-footer .wrap {
        grid-template-columns: 1.4fr 1fr;
    }
}

.site-footer a:not(.btn):not(.btn-secondary) { color: var(--cyan); }
.site-footer a:not(.btn):not(.btn-secondary):hover { color: var(--on-ink); }
.site-footer p { margin: 0 0 8px; }
.site-footer .copy {
    margin-top: 16px;
    color: var(--on-ink);
}

/* Mobile dock */

.dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 2px solid var(--ink);
}

@media (min-width: 768px) {
    .dock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .btn-secondary, .faq .chevron, .theme-knob { transition: none; }
}

html[data-theme="dark"] {
    --paper: #0E1A1E;
    --ink: #F7F7F4;
    --on-ink: #F7F7F4;
    --panel: #0a1214;
    --line: #3a4548;
    --muted: #c5cec8;
}

html[data-theme="dark"] .tickets .picto { filter: invert(1); }

html[data-theme="dark"] .form input:focus,
html[data-theme="dark"] .form textarea:focus { outline-color: var(--cyan); }
