/* The Outdoor Club — artist briefing tool
   Crotona paste-up design system (cream/ink/bolt, Space Grotesk,
   stamp-shadows, tape-labels, subtle tilts). Self-hosted assets only
   (CSP self-only). Mobile-first. */

/* ==================== FONTS ==================== */

@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/fonts/space-grotesk-300.woff2") format("woff2");
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/fonts/space-grotesk-400.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2");
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/fonts/space-grotesk-600.woff2") format("woff2");
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ==================== TOKENS (Crotona) ==================== */

:root {
    --ink:        rgb(35, 37, 34);      /* #232522 near-black, warm */
    --cream:      rgb(250, 243, 227);   /* #faf3e3 paper */
    --bolt:       rgb(255, 212, 97);    /* #ffd461 lightning yellow */
    --teal:       rgb(15, 113, 132);    /* #0f7184 deep disco teal */
    --sky:        rgb(137, 213, 239);   /* #89d5ef pale sky blue */
    --blush:      rgb(255, 166, 177);   /* #ffa6b1 warm coral */
    --lilac:      rgb(164, 130, 196);   /* #a482c4 dusty lavender */
    --tomato:     rgb(255, 107, 91);    /* #ff6b5b paste-up red */

    --ink-90:     rgba(35, 37, 34, 0.90);
    --ink-70:     rgba(35, 37, 34, 0.70);
    --ink-50:     rgba(35, 37, 34, 0.50);
    --ink-25:     rgba(35, 37, 34, 0.25);
    --ink-10:     rgba(35, 37, 34, 0.10);

    --font: "Space Grotesk", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1.00);
    --dur-fast: 180ms;
}

/* ==================== BASE ==================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
    isolation: isolate;
}

/* Paper grain over the whole page */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("/assets/img/grain.svg");
    background-size: 240px;
    mix-blend-mode: multiply;
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}

.page {
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.1rem, 4vw, 2rem) 4rem;
    position: relative;
    z-index: 2;
}

.page--wide { max-width: 72rem; }

::selection { background: var(--bolt); color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
    transition: background var(--dur-fast) var(--ease-out);
}
a:hover { background: var(--bolt); text-decoration-thickness: 2px; }

p { margin: 0 0 0.75rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== TYPE ==================== */

h1 {
    font-weight: 700;
    font-size: clamp(2.2rem, 7vw, 3.6rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

/* Section headings render as bolt-yellow tape labels */
h2 {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--bolt);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    padding: 5px 12px;
    margin: 0 0 1.1rem;
    transform: rotate(-1.5deg);
}

h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
    padding-bottom: 0.25rem;
    background-image: linear-gradient(var(--bolt), var(--bolt));
    background-repeat: no-repeat;
    background-size: 2.5rem 4px;
    background-position: left bottom;
}

/* ==================== TAPES (paste-up labels) ==================== */

.tape {
    display: inline-block;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    background: var(--cream);
    color: var(--ink);
}

.tape--bolt  { background: var(--bolt); }
.tape--blush { background: var(--blush); }
.tape--sky   { background: var(--sky); }

/* ==================== HERO ==================== */

.hero {
    text-align: center;
    padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(1.75rem, 5vw, 3rem);
}

.hero .tape { margin: 0.3rem 0.2rem; }
.hero .tape--bolt  { transform: rotate(-2deg); }
.hero .tape--blush { transform: rotate(1.2deg); }
.hero .tape--sky   { transform: rotate(-1deg); }

.hero h1 {
    font-size: clamp(2.6rem, 9vw, 4.5rem);
    margin: 1.4rem 0 0.75rem;
}

.hero__lead {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--ink-90);
    max-width: 34rem;
    margin: 0 auto;
}

/* ==================== CARDS (cream + ink border + stamp) ==================== */

.card {
    background: var(--cream);
    border: 2.5px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    padding: clamp(1.25rem, 3.5vw, 2rem);
    margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
}

/* Light paste-up tilt cycle; killed on mobile */
.page > .card:nth-of-type(2n+1),
.page > form > .card:nth-of-type(2n+1) { transform: rotate(-0.5deg); }
.page > .card:nth-of-type(2n),
.page > form > .card:nth-of-type(2n)   { transform: rotate(0.4deg); }
.page > .card:nth-of-type(3n),
.page > form > .card:nth-of-type(3n)   { transform: rotate(-0.7deg); }

.card--intro { box-shadow: 7px 7px 0 var(--ink); }

/* ==================== SLOTS (ticket-stubs) ==================== */

.slots {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin: 1.25rem 0;
}

.slot-card {
    border: 2.5px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 1rem 1.2rem;
    background: var(--bolt);
}

.slots .slot-card:nth-child(3n+1) { background: var(--bolt);  transform: rotate(-0.6deg); }
.slots .slot-card:nth-child(3n+2) { background: var(--blush); transform: rotate(0.5deg); }
.slots .slot-card:nth-child(3n)   { background: var(--sky);   transform: rotate(-0.4deg); }

.slot-day {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.slot-time {
    font-size: clamp(1.9rem, 6vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0.15rem 0;
}

.slot-stage {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
}

.slot-arrival {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 2px dashed var(--ink-25);
    font-size: 0.95rem;
}

.slot-arrival strong { font-size: 1.05rem; }

.slot-notes {
    margin-top: 0.35rem;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--ink-70);
}

.address {
    color: var(--ink-70);
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* ==================== BRIEFING BLOCKS ==================== */

.briefing-block {
    padding: 0.9rem 0;
    border-bottom: 1.5px dashed var(--ink-25);
}

.briefing-block:first-of-type { padding-top: 0.25rem; }
.briefing-block:last-child { border-bottom: none; padding-bottom: 0; }

.briefing-block p {
    color: var(--ink-90);
    font-size: 0.98rem;
    margin: 0;
}

/* Contact rows */
.contact-row {
    padding: 0.6rem 0;
    border-bottom: 1.5px dashed var(--ink-25);
    margin: 0;
}
.contact-row:last-of-type { border-bottom: none; }
.contact-row strong {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-50);
    min-width: 7.5rem;
}

.apology {
    font-style: italic;
    background: rgba(255, 212, 97, 0.35);
    border-left: 4px solid var(--ink);
    padding: 0.75rem 1rem;
    color: var(--ink-90);
}

/* ==================== BANNERS ==================== */

.banner {
    border: 2.5px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    transform: rotate(-0.4deg);
}

.banner--success { background: var(--bolt); }
.banner--error   { background: var(--blush); }

.banner p { margin: 0 0 0.35rem; }
.banner p:last-child { margin-bottom: 0; }
.banner ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }

/* ==================== FORMS ==================== */

button, input, select, textarea { font-family: inherit; font-size: 1rem; }

form h3 {
    margin-top: 2rem;
    font-size: 1.05rem;
    background-size: 3.5rem 5px;
}

form h3:first-of-type { margin-top: 0.5rem; }

.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field input[type="text"],
.field input[type="password"],
.field textarea,
.field select,
input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    padding: 0.7rem 0.9rem;
    line-height: 1.4;
    transition: border-color 120ms ease, background 120ms ease;
}

input:focus, select:focus, textarea:focus {
    outline: 3px solid var(--bolt);
    outline-offset: 0;
    border-color: var(--ink);
    background: #fff;
}

textarea { resize: vertical; }

select {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    min-width: 12rem;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23232522' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 8px;
}

.field--error input[type="text"],
.field--error textarea {
    border-color: var(--tomato);
    outline: 2px solid var(--tomato);
}

.field-error {
    color: #b3271b;
    font-weight: 600;
    font-size: 0.88rem;
    margin: 0.35rem 0 0;
}

.upload-current {
    font-size: 0.88rem;
    color: var(--ink-70);
    margin: 0 0 0.4rem;
}

input[type="file"] {
    width: 100%;
    border: 2px dashed var(--ink-50);
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.35);
}

input[type="file"]::file-selector-button {
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--bolt);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    padding: 0.45rem 0.9rem;
    margin-right: 0.9rem;
    cursor: pointer;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem 0.9rem;
}

.checkbox-option,
.radio-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.4rem;
    cursor: pointer;
}

.checkbox-option input,
.radio-option input { flex: 0 0 auto; }

input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--ink);
    background: rgba(255, 255, 255, 0.5);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

input[type="radio"] { border-radius: 50%; }

input[type="checkbox"]:checked,
input[type="radio"]:checked { background: var(--bolt); }

input[type="checkbox"]:checked::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    background: var(--ink);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="radio"]:checked::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--ink);
}

/* License plate field: CSS-only reveal when the parking-request checkbox is
   checked. Relies on markup order: checkbox, its label, then this field, as
   siblings under the same .field parent (no JS; CSP-friendly). */
.license-plate-field {
    display: none;
    margin: 0.5rem 0 0.75rem 1.8rem;
}

.parking-checkbox:checked ~ .license-plate-field { display: block; }

/* Standalone checkbox followed by its label (parking request): keep them on
   one line — the label itself is a flex row. */
.parking-checkbox { vertical-align: middle; }
.parking-checkbox + .checkbox-option { display: inline-flex; vertical-align: middle; margin-left: 0.55rem; }

/* ==================== BUTTONS (stamp style) ==================== */

.btn-submit,
button[type="submit"],
.copy-btn {
    display: inline-block;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--bolt);
    color: var(--ink);
    border: 2.5px solid var(--ink);
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--ink);
    padding: 0.8rem 1.6rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}

.btn-submit:hover,
button[type="submit"]:hover,
.copy-btn:hover,
.btn-submit:focus-visible,
button[type="submit"]:focus-visible,
.copy-btn:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
    outline: none;
}

.btn-submit { font-size: 1rem; padding: 0.9rem 2rem; }

.copy-btn { background: var(--sky); font-size: 0.82rem; padding: 0.6rem 1.2rem; }

/* Quieter secondary buttons (logout etc.) */
.btn-quiet,
button.btn-quiet {
    background: var(--cream);
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 0.78rem;
    padding: 0.5rem 1rem;
}

/* ==================== ADMIN ==================== */

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 1rem 0 0.25rem;
}

.admin-nav a {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--sky);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    padding: 0.45rem 0.9rem;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}

.admin-nav a:hover {
    background: var(--bolt);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}

.admin-nav form { display: inline; margin: 0; }

.sort-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sort-bar__label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-50);
}

.sort-chip {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--cream);
    border: 2px solid var(--ink);
    padding: 0.3rem 0.75rem;
}

.sort-chip:hover { background: var(--sky); }

.sort-chip--active {
    background: var(--bolt);
    box-shadow: 2px 2px 0 var(--ink);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 2px solid var(--ink);
    background: var(--cream);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 640px;
}

.admin-table th {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    background: var(--bolt);
    border-bottom: 2.5px solid var(--ink);
    padding: 0.6rem 0.85rem;
    white-space: nowrap;
}

.admin-table td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1.5px dashed var(--ink-25);
    vertical-align: top;
}

.admin-table tbody tr:nth-child(odd) td { background: rgba(255, 255, 255, 0.4); }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: rgba(255, 212, 97, 0.25); }

/* Inline gage-autosave cell (dashboard) */
.fee-cell {
    white-space: nowrap;
    transition: background 300ms ease;
}

.fee-cell .fee-select {
    width: auto;
    min-width: 0;
    padding: 0.35rem 1.9rem 0.35rem 0.6rem;
    font-size: 0.85rem;
    background-position: right 0.6rem center;
}

.fee-cell .fee-amount {
    width: 6.5rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    margin-left: 0.35rem;
}

.admin-table tbody tr .fee-cell.fee-cell--saved,
.admin-table tbody tr:hover .fee-cell.fee-cell--saved { background: rgba(46, 189, 89, 0.35); }
.admin-table tbody tr .fee-cell.fee-cell--error,
.admin-table tbody tr:hover .fee-cell.fee-cell--error { background: rgba(255, 107, 91, 0.45); }

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid var(--ink);
    background: var(--cream);
    color: var(--ink-70);
    white-space: nowrap;
}

.status-badge--geopend  { background: var(--blush); color: var(--ink); }
.status-badge--concept  { background: var(--sky);   color: var(--ink); }
.status-badge--ingevuld { background: var(--bolt);  color: var(--ink); }
.status-badge--leeg     { background: var(--cream); color: var(--ink-50); }

/* Admin detail: definition list */
dl { margin: 0; }

dt {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-50);
    margin-top: 0.9rem;
}

dd {
    margin: 0.15rem 0 0;
    padding-bottom: 0.6rem;
    border-bottom: 1.5px dashed var(--ink-10);
}

dd em, .card em { color: var(--ink-50); }

.card ul { margin: 0.25rem 0; padding-left: 1.3rem; }
.card li { margin-bottom: 0.35rem; }

/* ==================== COPY TEXTAREAS ==================== */

.copy-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.55);
    border: 2px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    padding: 0.7rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.45;
    resize: vertical;
}

/* ==================== FOOTER ==================== */

.site-footer {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-50);
}

/* The white TOC logo only works on the dark TOC theme; hide it on the
   cream paste-up base (toc.css turns it back on). */
.hero__logo { display: none; }

/* ==================== ADMIN THEME (straightened) ====================
   The paste-up tilts are fun artist-side, but the admin is a work tool:
   body.theme-admin keeps the style and drops every rotation. */

.theme-admin .card,
.theme-admin .page > .card,
.theme-admin .page > form > .card,
.theme-admin h2,
.theme-admin .tape,
.theme-admin .banner {
    transform: none;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 600px) {
    .card {
        padding: 1.25rem 1rem;
        box-shadow: 3px 3px 0 var(--ink);
    }

    .page > .card,
    .page > form > .card,
    .slots .slot-card,
    .banner,
    h2 {
        transform: rotate(0deg);
    }

    .checkbox-grid { grid-template-columns: 1fr; }

    .table-scroll {
        margin-left: -1rem;
        margin-right: -1rem;
        border-left: none;
        border-right: none;
    }
}
