/* =============================================================================
   Tuning-Verein — Design System (black / red)
   ========================================================================== */
:root {
    --bg:        #0a0a0c;
    --bg-2:      #0f0f13;
    --surface:   #15151b;
    --surface-2: #1c1c24;
    --line:      #26262f;
    --text:      #f3f3f6;
    --muted:     #9a9aa8;
    --red:       #e10600;
    --red-2:     #ff2b2b;
    --gold:      #d4af37;
    --radius:    14px;
    --wrap:      1180px;
    --shadow:    0 18px 50px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red-2); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, .display {
    font-family: 'Oswald', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.08;
    margin: 0 0 .5rem;
    text-transform: uppercase;
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.section { padding: 4.5rem 0; }
.section-sm { padding: 2.5rem 0; }
.eyebrow {
    display: inline-block; color: var(--red-2); font-family: 'Oswald', sans-serif;
    font-weight: 600; letter-spacing: .22em; text-transform: uppercase; font-size: .8rem; margin-bottom: .6rem;
}
.lead { font-size: 1.15rem; color: #d8d8e0; max-width: 640px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
    font-size: .92rem; padding: .8rem 1.5rem; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface-2); color: var(--text); transition: .18s; text-decoration: none;
}
.btn:hover { color: #fff; border-color: #3a3a48; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--red), #b30500); border: 0; box-shadow: 0 8px 24px rgba(225,6,0,.35); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(225,6,0,.5); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .45rem .85rem; font-size: .8rem; }

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50; background: rgba(10,10,12,.82);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 0; }
.logo { display: flex; align-items: center; gap: .55rem; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.logo:hover { color: #fff; }
.logo .mark { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--red), #7a0400); display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 6px 18px rgba(225,6,0,.4); }
.logo .ev { color: var(--red-2); }
.nav-links { display: flex; gap: 1.4rem; margin-left: 1rem; }
.nav-links a { color: var(--muted); font-family: 'Oswald', sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-spacer { flex: 1; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,10,.94) 0%, rgba(8,8,10,.7) 45%, rgba(8,8,10,.35) 100%); }
.hero::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--red); }
.hero .wrap { position: relative; z-index: 2; padding-top: 3rem; padding-bottom: 3rem; }
.hero h1 { max-width: 780px; }
.hero .lead { margin-bottom: 1.8rem; }

/* ---- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .2s; }
.card:hover { border-color: #36363f; transform: translateY(-3px); }
.card-pad { padding: 1.4rem; }
.card .thumb { aspect-ratio: 16/10; object-fit: cover; width: 100%; }

.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.feature .ico { width: 46px; height: 46px; border-radius: 10px; background: rgba(225,6,0,.12); color: var(--red-2); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: .9rem; }

.stat { text-align: center; padding: 1.2rem; }
.stat b { font-family: 'Oswald', sans-serif; font-size: 2.4rem; color: #fff; display: block; line-height: 1; }
.stat span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }

.badge { display: inline-block; padding: .25rem .7rem; border-radius: 99px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.badge-red { background: rgba(225,6,0,.16); color: var(--red-2); }
.badge-line { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.badge-gold { background: rgba(212,175,55,.16); color: var(--gold); }

/* ---- Event / product cards ----------------------------------------------- */
.event-card .meta { display: flex; gap: .6rem; align-items: center; color: var(--muted); font-size: .85rem; margin: .3rem 0 .5rem; }
.price { font-family: 'Oswald', sans-serif; font-size: 1.3rem; color: #fff; }

/* ---- Gallery ------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.gallery-grid a { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1/1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.gallery-grid a:hover img { transform: scale(1.07); }

/* ---- Forms --------------------------------------------------------------- */
.field { margin-bottom: 1.05rem; }
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; font-weight: 500; }
input, textarea, select {
    width: 100%; padding: .75rem .85rem; border-radius: 10px; border: 1px solid var(--line);
    background: var(--bg-2); color: var(--text); font-family: inherit; font-size: .95rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,6,0,.18); }
.err { color: var(--red-2); font-size: .8rem; margin-top: .3rem; }
.flash { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.4); color: #b7f3d6; padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1.5rem; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 10px; padding: 1rem 1.2rem; }

/* ---- Sponsors ------------------------------------------------------------ */
.sponsor-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem; display: grid; place-items: center; min-height: 120px; transition: .2s; }
.sponsor-tile:hover { border-color: var(--red); }
.sponsor-tile img { max-height: 70px; object-fit: contain; filter: grayscale(1) brightness(1.6); opacity: .85; transition: .2s; }
.sponsor-tile:hover img { filter: none; opacity: 1; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-grid h4 { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: #fff; margin: 0 0 .9rem; }
.footer-grid a { color: var(--muted); display: block; padding: .22rem 0; font-size: .9rem; }
.footer-grid a:hover { color: var(--red-2); }
.social { display: flex; gap: .6rem; }
.social a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); font-size: 1.1rem; }
.social a:hover { border-color: var(--red); color: var(--red-2); }
.footer-bottom { border-top: 1px solid var(--line); padding: 1.1rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }

/* ---- Page header (interior pages) ---------------------------------------- */
.page-head { position: relative; padding: 4rem 0 3rem; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .25; }
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.6), var(--bg)); }
.page-head .wrap { position: relative; z-index: 2; }

/* ---- Prose --------------------------------------------------------------- */
.prose { max-width: 760px; }
.prose p { color: #d4d4dd; }
.prose h2, .prose h3 { margin-top: 1.8rem; }

/* ---- Misc ---------------------------------------------------------------- */
.divider { height: 1px; background: var(--line); margin: 2.5rem 0; }
.tag-stripe { height: 4px; width: 60px; background: var(--red); border-radius: 2px; margin: .8rem 0 1.4rem; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: .5rem 0 .5rem 2rem; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "▸"; color: var(--red-2); position: absolute; left: 0; font-weight: 700; }

/* ---- Responsive (Phone · Tablet · PC · TV) ------------------------------- */
html { font-size: 16px; }

/* Big screens & TV — scale everything up so it fills the space nicely */
@media (min-width: 1500px) { :root { --wrap: 1320px; } html { font-size: 17px; } }
@media (min-width: 1900px) { :root { --wrap: 1480px; } html { font-size: 18px; } }
@media (min-width: 2400px) { :root { --wrap: 1720px; } html { font-size: 20px; } }

/* Small laptops / tablet landscape */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 3.6rem 0; }
}

/* Tablet portrait — collapse nav into a menu, stack split layouts */
@media (max-width: 880px) {
    .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    /* custom split grids (sidebar/content) — the ones without a grid-N modifier */
    .grid:not(.grid-2):not(.grid-3):not(.grid-4):not(.gallery-grid) { grid-template-columns: 1fr !important; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: .5rem 1.5rem 1rem; margin: 0; box-shadow: var(--shadow); }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
    .nav-toggle { display: block; }
}

/* Phones */
@media (max-width: 640px) {
    .section { padding: 2.6rem 0; }
    .section-sm { padding: 1.8rem 0; }
    .wrap { padding: 0 1.1rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .hero { min-height: 74vh; }
    .hero .lead { font-size: 1.02rem; }
    .nav .btn-primary { display: none; }
    .btn-lg { padding: .85rem 1.4rem; font-size: .92rem; }
    .card-pad { padding: 1.15rem; }
    .member-card { padding: 1.3rem; }
    h1 { font-size: 2.1rem; }
    /* wide admin/data tables scroll horizontally instead of breaking the layout */
    .admin-body table, .card table { display: block; overflow-x: auto; white-space: nowrap; }
    table th, table td { padding: .6rem; font-size: .85rem; }
    .cookie-banner .wrap { flex-direction: column; align-items: flex-start; gap: .7rem; }
}

/* =============================================================================
   MODERN POLISH  v2
   ========================================================================== */
body {
    background:
        radial-gradient(900px 500px at 88% -8%, rgba(225,6,0,.10), transparent 60%),
        radial-gradient(700px 500px at -5% 12%, rgba(157,123,255,.06), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}

/* Eyebrow with a leading bar */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red); border-radius: 2px; }
.center .eyebrow { justify-content: center; }

/* Buttons — sharper, glow */
.btn { border-radius: 999px; transition: transform .16s, box-shadow .2s, border-color .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { box-shadow: 0 8px 22px rgba(225,6,0,.30), inset 0 0 0 1px rgba(255,255,255,.06); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(225,6,0,.55); }
.btn-ghost { backdrop-filter: blur(4px); border-color: rgba(255,255,255,.16); }

/* Cards — glass + glow on hover */
.card { background: linear-gradient(180deg, rgba(255,255,255,.022), transparent), var(--surface); transition: transform .22s, border-color .22s, box-shadow .22s; }
.card:hover { box-shadow: 0 22px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(225,6,0,.25); border-color: rgba(225,6,0,.4); }
.feature { transition: transform .22s, border-color .22s, box-shadow .22s; }
.feature:hover { transform: translateY(-3px); border-color: rgba(225,6,0,.35); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.feature .ico { transition: transform .25s; }
.feature:hover .ico { transform: scale(1.08) rotate(-3deg); }

/* Hero — layered cinematic gradient + slow sheen */
.hero-overlay {
    background:
        radial-gradient(700px 380px at 12% 30%, rgba(225,6,0,.16), transparent 60%),
        linear-gradient(90deg, rgba(7,7,9,.96) 0%, rgba(7,7,9,.78) 42%, rgba(7,7,9,.30) 100%);
}
.hero-bg { animation: heroZoom 18s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1.03); } to { transform: scale(1.12); } }
.hero h1 { text-shadow: 0 4px 40px rgba(0,0,0,.5); }
.hero::after { box-shadow: 0 0 30px 4px rgba(225,6,0,.6); }

/* Headings — gradient accent option already used; tighten */
h1, h2 { letter-spacing: -.01em; }

/* Stat numbers glow */
.stat b { text-shadow: 0 0 24px rgba(225,6,0,.35); }

/* Section dividers as thin red gradient lines */
.tag-stripe { background: linear-gradient(90deg, var(--red), transparent); height: 3px; width: 72px; }

/* Nav account link */
.nav-account { color: var(--text); font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.nav-account:hover { color: var(--red-2); text-decoration: none; }

/* Forms — modern focus glow */
input, textarea, select { transition: border-color .18s, box-shadow .18s, background .18s; }
input:focus, textarea:focus, select:focus { background: var(--surface); }

/* Pills / badges subtle ring */
.badge-red { box-shadow: inset 0 0 0 1px rgba(225,6,0,.3); }

/* Gallery hover overlay */
.gallery-grid a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(225,6,0,.0)); transition: .3s; }
.gallery-grid a:hover::after { background: linear-gradient(180deg, transparent 40%, rgba(225,6,0,.35)); }

/* Member card */
.member-card {
    position: relative; border-radius: 18px; padding: 1.6rem; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, #1a0608 0%, #2a0a0c 40%, #0c0c10 100%);
    border: 1px solid rgba(225,6,0,.35);
    box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
}
.member-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(225,6,0,.4), transparent 70%); }
.member-card::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--red), transparent); }

/* Dev credit */
.dev-credit { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.dev-credit a { color: var(--muted); }
.dev-credit a:hover { color: var(--red-2); }
.dev-credit strong { color: #cfcfd8; }

/* Smooth section entrance via CSS scroll animation (progressive enhancement) */
@supports (animation-timeline: view()) {
    .section > .wrap { animation: revealUp linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
    @keyframes revealUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
}

/* Cookie consent banner */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: rgba(15,15,19,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--red); padding: 1rem 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { color: var(--muted); }

/* Sticky footer — keeps the footer pinned to the bottom on short pages */
.site-body { min-height: 100vh; display: flex; flex-direction: column; }
.site-body > main { flex: 1 0 auto; }
.site-body > .site-footer { margin-top: auto; }

/* Selection */
::selection { background: var(--red); color: #fff; }

/* Scrollbar (WebKit) */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a34; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }
