/* Hemch Racing — brand: black, white, racing red (#c52926 from the logo).
   Visual language comes from the car's own livery: slashes, flames, stripes. */
:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #2a2a2e;
  --fg: #f5f5f4;
  --muted: #a3a3a8;
  --red: #c52926;
  --red-hot: #e8312b;
  --radius: 4px;
  --container: 1200px;
  --cut: 56px;                     /* depth of angled section edges */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Placeholder fill for image slots not yet set in the admin. */
  /* Fallback for image slots not yet set in the admin: brand-coloured, not "unfinished" */
  --ph: radial-gradient(120% 90% at 85% 0%, rgba(197,41,38,.28), transparent 55%),
        repeating-linear-gradient(-60deg, rgba(255,255,255,.035) 0 2px, transparent 2px 34px),
        linear-gradient(160deg, #19191c 0%, #0b0b0c 70%);
}
@media (max-width: 767px) { :root { --cut: 28px; } }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; max-width: 60ch; }
figure { margin: 0; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.skip-link {
  position: absolute; inset-inline-start: 8px; top: 8px; z-index: 100;
  background: var(--red); color: #fff; padding: 8px 16px;
  transform: translateY(-300%);  /* hidden upwards: never adds sideways scroll (LTR or RTL) */
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 3px; }

/* ---------- Type ---------- */
.title, .hero-title, .eyebrow, .btn, .badge, .site-nav a, .tile, .poster-day,
.poster-title, .ticker, .link-arrow, .footer-nav a {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: uppercase;
}

.title {
  font-weight: 900;
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  line-height: .9;
  margin: 0 0 1.5rem;
}
.text-red { color: var(--red); }
.text-outline, .line-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--fg);
}

.eyebrow {
  font-weight: 800;
  letter-spacing: .16em;
  font-size: .95rem;
  color: var(--red-hot);
  margin: 0 0 1rem;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 36px; height: 6px; background: var(--red);
  transform: skewX(-24deg);
}

.lead { font-size: 1.2rem; color: #dcdcdc; max-width: 46ch; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; margin-top: .5rem;
  font-weight: 800; letter-spacing: .08em; font-size: 1.1rem;
  text-decoration: none; color: var(--red-hot);
}
.link-arrow::after { content: "→"; font-style: normal; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(6px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 12, .9);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--red);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
/* Full logo hangs below the header bar like a badge. */
.brand { align-self: flex-start; position: relative; z-index: 2; margin-top: 6px; }
.brand img {
  width: 104px; height: auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.7));
  transition: transform .2s var(--ease);
}
.brand:hover img { transform: rotate(-3deg) scale(1.03); }
@media (max-width: 1023px) { .brand img { width: 76px; } }
@media (prefers-reduced-motion: reduce) { .brand img { transition: none; } }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-weight: 800; letter-spacing: .06em; font-size: 1.1rem;
  text-decoration: none; padding: 10px 14px; color: #e4e4e4;
  transition: color .15s var(--ease);
}
.site-nav a:hover { color: var(--red-hot); }
.site-nav .nav-cta {
  background: var(--red); color: #fff; margin-left: 8px; padding: 10px 24px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.site-nav .nav-cta:hover { background: var(--red-hot); color: #fff; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }

@media (max-width: 1023px) {  /* collapsed nav (fits 5 links + language switcher from 1024px) */
  .nav-toggle-label {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; cursor: pointer;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block; width: 24px; height: 2px; background: var(--fg); position: relative;
    transition: transform .2s var(--ease), background .2s;
  }
  .nav-toggle-label span::before, .nav-toggle-label span::after { content: ""; position: absolute; }
  .nav-toggle-label span::before { top: -7px; }
  .nav-toggle-label span::after { top: 7px; }
  .nav-toggle:checked + .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked + .nav-toggle-label span::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label span::after { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 2px solid var(--red-hot); }

  .site-nav {
    position: absolute; top: 71px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 3px solid var(--red);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 1.35rem; }
  .site-nav .nav-cta { margin: 12px 0 0; text-align: center; border: 0; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px;
  font-weight: 800; letter-spacing: .06em; font-size: 1.15rem;
  text-decoration: none;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hot); }
.btn-ghost { background: #fff; color: var(--bg); }
.btn-ghost:hover { background: #dcdcdc; }

.badge {
  display: inline-block; margin-top: .5rem;
  font-weight: 900; letter-spacing: .1em; font-size: 1.05rem;
  padding: 8px 20px; background: var(--fg); color: var(--bg);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex; align-items: flex-end;
  padding: 120px 0 calc(var(--cut) + 72px);
  background:
    linear-gradient(90deg, rgba(11,11,12,.94) 0%, rgba(11,11,12,.7) 42%, rgba(11,11,12,.1) 100%),
    linear-gradient(0deg, rgba(11,11,12,.85) 0%, rgba(11,11,12,0) 40%),
    var(--hero-img, var(--ph)) 62% center / cover no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-weight: 900;
  font-size: clamp(3.75rem, 13vw, 9.5rem);
  line-height: .82;
  margin: 0 0 1.5rem;
  letter-spacing: -.005em;
}
.hero-title .line { display: block; }
.hero-title .line-outline { -webkit-text-stroke-width: 3px; }
.hero-title .line-red { color: var(--red); text-shadow: 0 6px 30px rgba(197, 41, 38, .35); }

@media (max-width: 767px) {
  .hero { background-position: 70% center; min-height: 86vh; }
  .hero .lead { font-size: 1.05rem; }
  .hero-title .line-outline { -webkit-text-stroke-width: 2px; }
}

/* ---------- Ticker ---------- */
.ticker {
  background: var(--red);
  color: #fff;
  overflow: hidden;
  margin-top: calc(var(--cut) * -1 + 8px);
  position: relative; z-index: 2;
  transform: skewY(-1.5deg);
  border-top: 3px solid #fff;
  border-bottom: 3px solid var(--bg);
}
.ticker-track {
  display: flex; gap: 28px; width: max-content;
  padding: 14px 0;
  font-weight: 900; font-size: 1.6rem; letter-spacing: .04em; line-height: 1;
  animation: ticker 28s linear infinite;
}
.ticker .star { color: var(--bg); font-style: normal; }
@keyframes ticker { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Sections ---------- */
[id] { scroll-margin-top: 72px; }
.section { position: relative; padding: 112px 0; }
@media (max-width: 767px) { .section { padding: 72px 0; } }

.section-team { background: var(--bg); }

.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr .95fr; gap: 72px; }
  .split-reverse > :first-child { order: 2; }
}

.framed {
  position: relative; justify-self: center; width: min(460px, 100%);
  isolation: isolate;
}
.framed img, .framed .ph-box {
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}
.ph-box { position: relative; aspect-ratio: 1; background: var(--ph); }
.framed::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  background: var(--red);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  z-index: -1;
}

/* ---------- Tiles ---------- */
.tiles {
  display: grid; grid-template-columns: 1fr;
  background: var(--bg);
}
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px; padding: 24px 24px 28px;
  text-decoration: none; color: #fff;
  border-top: 3px solid var(--red);
}
@media (min-width: 768px) {
  .tile { min-height: 380px; }
  .tile + .tile { border-left: 3px solid var(--bg); }
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--tile-img, var(--ph)) center / cover no-repeat;
  transition: transform .5s var(--ease);
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(11,11,12,.95) 10%, rgba(11,11,12,.35) 70%);
  transition: background .3s var(--ease);
}
.tile:hover::before, .tile:focus-visible::before { transform: scale(1.06); }
.tile:hover::after, .tile:focus-visible::after {
  background: linear-gradient(0deg, rgba(197,41,38,.92) 10%, rgba(11,11,12,.3) 75%);
}
.tile-num {
  position: absolute; top: 16px; right: 24px;
  font-weight: 900; font-size: 4.5rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.5);
}
.tile-label { font-weight: 900; font-size: 2.75rem; line-height: .95; }
.tile-sub {
  font-family: var(--font-body); font-style: normal; text-transform: none;
  color: #d4d4d4; margin-top: 4px;
}
@media (prefers-reduced-motion: reduce) { .tile::before { transition: none; } }

/* ---------- Events ---------- */
.section-events {
  background:
    radial-gradient(ellipse at center, rgba(11,11,12,.55) 0%, rgba(11,11,12,.9) 70%),
    var(--events-img, var(--ph)) center / cover no-repeat;
  clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
  padding-top: calc(112px + var(--cut));
  margin-top: calc(var(--cut) * -1);
}
.section-events .title, .section-events .eyebrow { text-align: center; justify-content: center; }
.section-events .eyebrow::after {
  content: ""; width: 36px; height: 6px; background: var(--red); transform: skewX(-24deg);
}

.poster {
  display: grid; grid-template-columns: auto 1fr; align-items: stretch;
  max-width: 760px; margin: 2.5rem auto 0;
  background: rgba(20,20,22,.92);
  border: 1px solid var(--border);
}
.poster-date {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 24px 32px; background: var(--red); color: #fff; text-align: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  padding-right: 44px;
}
.poster-day { font-weight: 900; font-size: 3rem; line-height: 1; }
.poster-month {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; font-size: .95rem;
}
.poster-body { padding: 24px 28px; align-self: center; }
.poster-title { font-weight: 900; font-size: 1.75rem; line-height: 1; margin-bottom: .5rem; }
.poster-body p:last-child { margin-bottom: 0; }
@media (max-width: 559px) {
  .poster { grid-template-columns: 1fr; }
  .poster-date { clip-path: none; padding: 20px; flex-direction: row; gap: 16px; }
}

/* ---------- Shop ---------- */
.section-shop {
  background:
    repeating-linear-gradient(-60deg, transparent 0 46px, rgba(255,255,255,.025) 46px 92px),
    var(--surface);
  border-top: 3px solid var(--red);
}
.shop-visual { justify-self: center; width: min(420px, 85%); position: relative; }
.shop-visual::before {
  content: ""; position: absolute; inset: 10% 0 0;
  background: radial-gradient(circle, rgba(197,41,38,.45), transparent 65%);
  z-index: 0;
}
.shop-visual img { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: #070708; }
.footer-stripe {
  position: relative;
  height: 120px;
  background: var(--banner-img, var(--ph)) center / cover no-repeat;
  border-top: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 32px; padding-top: 48px; padding-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-logo { width: 150px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a {
  font-weight: 800; font-size: 1.3rem; letter-spacing: .06em;
  text-decoration: none; color: #e4e4e4;
}
.footer-nav a:hover { color: var(--red-hot); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; padding-bottom: 28px; }
.footer-bottom p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Placeholder labels ---------- */
.ph-label {
  position: absolute; right: 16px; bottom: 16px; z-index: 1;
  font: 600 .75rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: rgba(11,11,12,.8);
  border: 1px dashed #3a3a40; padding: 6px 10px; pointer-events: none;
}
.hero .ph-label { top: 96px; bottom: auto; }
.ph-box .ph-label { right: 50%; bottom: 50%; transform: translate(50%, 50%); }
.tile .ph-label { top: 20px; bottom: auto; left: 24px; right: auto; }
.footer-stripe .ph-label { right: 50%; bottom: 50%; transform: translate(50%, 50%); }

/* ---------- Inner page hero ---------- */
.page-hero {
  padding: 128px 0 72px;
  background:
    linear-gradient(180deg, rgba(11,11,12,0) 40%, var(--bg) 100%),
    var(--ph);
  border-bottom: 3px solid var(--red);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut) / 2), 0 100%);
}
.page-hero .title { font-size: clamp(3rem, 9vw, 6.5rem); }
@media (max-width: 767px) { .page-hero { padding: 104px 0 56px; } }

/* ---------- Contact ---------- */
.section-contact { padding-top: 64px; }
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; } }

.info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--red); padding: 24px 24px 20px; margin-bottom: 16px;
}
.info-card p:last-child { margin-bottom: 0; }
.info-label {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; font-size: .9rem;
  color: var(--red-hot); margin-bottom: .5rem;
}
.info-email {
  display: inline-block; margin-bottom: .75rem;
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.1;
  text-decoration: none; word-break: break-all;
}
.info-email:hover { color: var(--red-hot); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--fg);
  background: var(--surface); border: 1px solid #3a3a40; border-radius: var(--radius);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 160px; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
  padding-right: 40px;
}
.field input::placeholder, .field textarea::placeholder { color: #6b6b72; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #55555c; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red-hot); background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(197, 41, 38, .25);
}
.has-error input, .has-error select, .has-error textarea { border-color: var(--red-hot); }
.field-error { margin: 0; color: #ff8a85; font-size: .9rem; }

.form .btn { justify-self: start; border: 0; cursor: pointer; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  padding: 16px 20px; margin-bottom: 24px; border-radius: var(--radius);
  border-left: 4px solid; font-weight: 500;
}
.notice-success { background: rgba(34, 197, 94, .1); border-color: #22c55e; color: #bbf7d0; }
.notice-error { background: rgba(197, 41, 38, .12); border-color: var(--red-hot); color: #fecaca; }

.footer-email {
  display: inline-block; margin-bottom: 8px; color: var(--fg);
  font-weight: 600; text-decoration: none;
}
.footer-email:hover { color: var(--red-hot); }
