/* ============================================================
   RC RACING CLUB - Racing Theme
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --red: #e10600;
  --red-dark: #a80400;
  --yellow: #ffd400;
  --carbon: #0c0d10;
  --carbon-2: #14161c;
  --panel: #1b1e26;
  --panel-2: #232733;
  --line: #2c313d;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --green: #2ecc71;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --display: 'Orbitron', sans-serif;
  --body: 'Rajdhani', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--carbon);
  color: var(--text);
  line-height: 1.5;
  font-size: 17px;
  /* Carbon-Faser Textur */
  background-image:
    linear-gradient(27deg, #12141a 5px, transparent 5px),
    linear-gradient(207deg, #12141a 5px, transparent 5px),
    linear-gradient(27deg, #0e1015 5px, transparent 5px),
    linear-gradient(207deg, #0e1015 5px, transparent 5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px, 10px 0, 0 10px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- Typografie ---------- */
h1, h2, h3, .display { font-family: var(--display); letter-spacing: 0.02em; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  text-transform: uppercase;
  font-style: italic;
  line-height: 1.05;
  position: relative;
  display: inline-block;
}
.section-title span { color: var(--red); }
.section-sub { color: var(--muted); max-width: 640px; margin-top: 10px; font-size: 1.05rem; }

.section { padding: 90px 0; position: relative; }
.section.alt { background: rgba(0, 0, 0, 0.35); }

/* Checkered accent bar */
.checker {
  height: 14px;
  width: 120px;
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #fff 75%),
    linear-gradient(-45deg, transparent 75%, #fff 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-color: #000;
  margin-bottom: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 14px 26px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--red);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 6px 18px rgba(225, 6, 0, 0.35);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(225, 6, 0, 0.5); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--red); color: #fff; }
.btn.yellow { background: var(--yellow); color: #111; box-shadow: 0 6px 18px rgba(255, 212, 0, 0.3); }
.btn.small { padding: 9px 16px; font-size: 0.78rem; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 900; font-style: italic; font-size: 1.25rem; text-transform: uppercase; }
.brand .logo {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: 1.4rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.brand small { color: var(--yellow); font-size: 0.7rem; letter-spacing: 0.15em; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 4px solid var(--red);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(225, 6, 0, 0.35), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(255, 212, 0, 0.12), transparent 60%);
  z-index: 0;
}
/* Speed lines */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255,255,255,0.02) 60px 62px);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 2; padding: 60px 0; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-style: italic;
  color: var(--yellow); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.9rem; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 900; font-style: italic; text-transform: uppercase;
  line-height: 0.98; margin-bottom: 22px;
}
.hero h1 .stroke {
  color: transparent; -webkit-text-stroke: 2px var(--text);
}
.hero h1 em { color: var(--red); font-style: italic; }
.hero p.lead { font-size: 1.25rem; color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-badges { display: flex; gap: 30px; margin-top: 46px; flex-wrap: wrap; }
.hero-badge { }
.hero-badge b { font-family: var(--display); font-size: 1.9rem; color: #fff; display: block; font-style: italic; }
.hero-badge span { color: var(--muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; }

/* ---------- Hero: Text + Buggy-Zeichnung ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero-art { position: relative; }
.hero-art img { width: 100%; max-width: 560px; display: block; margin-left: auto; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55)); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 14px; }
  .hero-art img { max-width: 380px; margin: 0 auto; }
}

/* ---------- Info / Feature cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  padding: 28px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.card .icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: rgba(225, 6, 0, 0.14); color: var(--red);
  font-size: 1.5rem; margin-bottom: 16px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.card h3 { font-size: 1.2rem; text-transform: uppercase; font-style: italic; margin-bottom: 8px; }
.card p { color: var(--muted); }

/* ---------- Schedule strip ---------- */
.schedule {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  padding: 34px 40px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  position: relative; overflow: hidden;
}
.schedule::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 140px;
  background-image:
    linear-gradient(45deg, rgba(0,0,0,.35) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,.35) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,.35) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,.35) 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  opacity: 0.5;
}
.schedule .big { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.schedule .time { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 900; }
.schedule small { display: block; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; font-size: 0.8rem; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--carbon-2); border: 1px solid var(--line);
  color: var(--text); padding: 12px 14px; font-family: var(--body); font-size: 1rem;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
textarea { resize: vertical; min-height: 90px; }

.panel {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  padding: 30px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  background: var(--carbon-2); text-transform: uppercase; font-size: 0.78rem;
  letter-spacing: 0.06em; color: var(--yellow); font-family: var(--display); font-weight: 700;
}
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.pos { font-family: var(--display); font-weight: 900; font-style: italic; }
.pos-1 { color: var(--yellow); }
.pos-2 { color: #cfd6e0; }
.pos-3 { color: #cd7f32; }

/* ---------- Showcase / car cards ---------- */
.car-card { overflow: hidden; padding: 0; }
.car-card .thumb { aspect-ratio: 16/10; background: var(--carbon-2); position: relative; overflow: hidden; }
.car-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-card .thumb .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line); font-size: 3rem; }
.car-card .num {
  position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 900; font-style: italic; padding: 4px 12px; font-size: 1.1rem;
}
.car-card .body { padding: 18px 20px; }
.car-card .body h3 { font-size: 1.1rem; text-transform: uppercase; font-style: italic; }
.car-card .body .owner { color: var(--yellow); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.car-card .specs { list-style: none; margin-top: 12px; display: grid; gap: 4px; }
.car-card .specs li { color: var(--muted); font-size: 0.9rem; display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.car-card .specs li b { color: var(--text); font-weight: 600; }

/* ---------- Framed photo (Strecke/Community-Treff) ---------- */
.framed {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.framed img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3/2; }
.framed .tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 16px; font-size: 0.8rem;
}

/* ---------- Karte (Anfahrt) ---------- */
.map-wrap {
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Badges / pills ---------- */
.pill { display: inline-block; padding: 3px 10px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.pill.red { background: rgba(225,6,0,0.15); color: #ff6b66; border-color: transparent; }
.pill.green { background: rgba(46,204,113,0.15); color: var(--green); border-color: transparent; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-top: 4px solid var(--red); padding: 32px; position: relative;
  max-height: 90vh; overflow-y: auto;
}
.modal.wide { width: min(720px, 100%); }
.modal h2 { text-transform: uppercase; font-style: italic; margin-bottom: 6px; }
.modal .close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modal .close:hover { color: #fff; }
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: none; color: var(--muted); padding: 10px; font-family: var(--display); font-weight: 700; text-transform: uppercase; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.active { color: #fff; border-bottom-color: var(--red); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; margin-bottom: 16px; font-size: 0.92rem; border-left: 4px solid; display: none; }
.alert.show { display: block; }
.alert.error { background: rgba(225,6,0,0.12); border-color: var(--red); color: #ff8a85; }
.alert.success { background: rgba(46,204,113,0.12); border-color: var(--green); color: #7ef0a9; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 0.9rem; }
.footer .foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 34px; }
.mb-2 { margin-bottom: 20px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap { gap: 14px; } .wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); border: 2px dashed var(--line); }
.thumb-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumb-strip .t { position: relative; width: 90px; height: 64px; overflow: hidden; border: 1px solid var(--line); }
.thumb-strip .t img { width: 100%; height: 100%; object-fit: cover; }
.thumb-strip .t button { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.7); border: none; color: #fff; width: 20px; height: 20px; cursor: pointer; font-size: 0.8rem; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: var(--carbon); padding: 20px; gap: 16px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 40px 0; }
}
