:root {
  --bg: oklch(0.14 0.005 250);
  --bg-deep: oklch(0.09 0.005 250);
  --ink: oklch(0.97 0.005 90);
  --muted: oklch(0.62 0.01 250);
  --line: oklch(0.28 0.008 250);
  --accent: oklch(0.68 0.19 38);   /* hot weld / brake-glow orange-red */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; overflow-x: hidden; }

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100vh;       /* fallback */
  height: 100svh;      /* iOS Safari before dvh */
  height: 100dvh;      /* shrinks/grows with browser chrome */
  min-height: 560px;
  width: 100%;
  overflow: hidden;
}

.slides { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.slide.active { opacity: 1; }

.slide-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  transition: transform 8s ease-out;
}
.slide.active .slide-img { transform: scale(1.18); }

/* dark overlay for legibility + cinematic mood */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, oklch(0.09 0.005 250 / 0.35) 0%, oklch(0.09 0.005 250 / 0.12) 35%, oklch(0.09 0.005 250 / 0.12) 60%, oklch(0.09 0.005 250 / 0.45) 100%),
    linear-gradient(90deg, oklch(0.09 0.005 250 / 0.25) 0%, oklch(0.09 0.005 250 / 0) 60%);
  pointer-events: none;
}

/* film grain */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* full-width bottom scrim — darkens the lower band where the copy + buttons live so
   text stays legible across photos, while the upper image stays open and unobscured */
.spotlight {
  position: absolute;
  inset: 0;
  z-index: 4;                        /* above .hero::before/::after, below .hero-content */
  pointer-events: none;
  background: linear-gradient(
    to top,
    oklch(0.05 0.005 250 / 0.55) 0%,
    oklch(0.05 0.005 250 / 0.32) 28%,
    transparent 62%
  );
}

.hero-content {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 48px 96px;
  max-width: 1600px;
  margin: 0 auto;
}


.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: oklch(0.88 0.01 250);
  text-shadow:
    0 0 14px oklch(0.05 0.005 250 / 0.65),
    0 0 4px oklch(0.05 0.005 250 / 0.85),
    0 1px 2px oklch(0.05 0.005 250 / 0.9);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.eyebrow .sep { color: var(--line); }

.hero-logo {
  display: block;
  height: 88px;
  width: auto;
  max-width: 100%;
  margin-bottom: 36px;
  align-self: flex-start;   /* parent .hero-content is column flex; opt out of stretch */
}

.sub {
  max-width: 540px;
  font-size: 17px;
  line-height: 1.55;
  color: oklch(0.96 0.005 250);
  text-shadow:
    0 0 18px oklch(0.05 0.005 250 / 0.6),
    0 0 6px oklch(0.05 0.005 250 / 0.8),
    0 1px 2px oklch(0.05 0.005 250 / 0.9);
  margin-bottom: 40px;
  font-weight: 300;
}

.actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: oklch(0.14 0.005 250);
}
.btn-primary:hover { background: oklch(0.74 0.19 38); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid oklch(0.97 0.005 90 / 0.4);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: oklch(0.97 0.005 90 / 0.05); }
.btn .arrow {
  display: inline-block;
  width: 14px; height: 1px;
  background: currentColor;
  position: relative;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* social icon links — match the ghost-button aesthetic, sit beside Contact Us */
.social {
  display: inline-grid;
  place-items: center;
  width: 50px; height: 50px;
  border: 1px solid oklch(0.97 0.005 90 / 0.4);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.social:hover { border-color: var(--accent); color: var(--accent); background: oklch(0.97 0.005 90 / 0.05); }
.social svg { width: 18px; height: 18px; }

/* ============ HERO CHROME ============ */
.hero-chrome {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.hero-chrome > * { pointer-events: auto; }

.counter {
  position: absolute;
  top: 50%;
  right: 48px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.counter .num {
  font-family: 'Anton', sans-serif;
  font-size: 80px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.counter .num .total {
  color: var(--muted);
  font-size: 32px;
  vertical-align: top;
  margin-left: 8px;
}
.counter .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  height: 140px;
  display: flex;
  align-items: center;
}

.ticks {
  position: absolute;
  bottom: 36px;
  left: 48px;
  right: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 6;
}
.tick-row {
  display: flex;
  flex: 1;
  gap: 8px;
}
.tick {
  flex: 1;
  height: 2px;
  background: oklch(0.97 0.005 90 / 0.18);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s;
}
.tick:hover { background: oklch(0.97 0.005 90 / 0.32); }
.tick.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  animation: fillTick 6s linear forwards;
}
.tick.done { background: oklch(0.97 0.005 90 / 0.55); }
@keyframes fillTick {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.ctrl {
  width: 38px; height: 38px;
  border: 1px solid oklch(0.97 0.005 90 / 0.3);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.ctrl:hover { border-color: var(--ink); background: oklch(0.97 0.005 90 / 0.05); }
.ctrl svg { width: 14px; height: 14px; }

.corner {
  position: absolute;
  width: 28px; height: 28px;
  border-color: var(--ink);
  z-index: 6;
  opacity: 0.6;
}
.corner.tl { top: 96px; left: 48px; border-top: 1px solid; border-left: 1px solid; }
.corner.tr { top: 96px; right: 48px; border-top: 1px solid; border-right: 1px solid; }
.corner.bl { bottom: 96px; left: 48px; border-bottom: 1px solid; border-left: 1px solid; }
.corner.br { bottom: 96px; right: 48px; border-bottom: 1px solid; border-right: 1px solid; }

/* ============ TABLET ============ */
@media (max-width: 900px) {
  .hero-content { padding: 0 24px 110px; }
  .hero-logo { height: 70px; margin-bottom: 28px; }
  .sub { font-size: 15px; margin-bottom: 28px; }
  .eyebrow { font-size: 10px; letter-spacing: 0.24em; gap: 10px; margin-bottom: 20px; }

  .counter { right: 24px; gap: 8px; }
  .counter .num { font-size: 48px; }
  .counter .num .total { font-size: 20px; margin-left: 4px; }
  .counter .label { display: none; }

  .ticks { left: 24px; right: 24px; bottom: 20px; gap: 12px; }

  .corner { width: 20px; height: 20px; }
  .corner.tl, .corner.tr { top: 80px; }
  .corner.bl, .corner.br { bottom: 80px; }
  .corner.tl, .corner.bl { left: 24px; }
  .corner.tr, .corner.br { right: 24px; }
}

/* ============ PHONE ============ */
@media (max-width: 600px) {
  .hero { min-height: 520px; }

  /* shift slide framing on phones; per-slide override via inline --m-shift */
  .slide-img { background-position: calc(50% + var(--m-shift, -80px)) center; }

  /* bottom scrim sits a touch taller on phones since the copy block is taller relative to the viewport */
  .spotlight {
    background: linear-gradient(
      to top,
      oklch(0.05 0.005 250 / 0.6) 0%,
      oklch(0.05 0.005 250 / 0.35) 32%,
      transparent 68%
    );
  }

  /* ease the hero overlay further on phones so the photo + copy breathe */
  .hero::before {
    background:
      linear-gradient(180deg, oklch(0.09 0.005 250 / 0.22) 0%, oklch(0.09 0.005 250 / 0.06) 35%, oklch(0.09 0.005 250 / 0.1) 60%, oklch(0.09 0.005 250 / 0.32) 100%),
      linear-gradient(90deg, oklch(0.09 0.005 250 / 0.15) 0%, oklch(0.09 0.005 250 / 0) 60%);
  }

  .hero-content { padding: 0 20px 130px; }
  .hero-logo { height: 56px; margin-bottom: 24px; }
  .sub { font-size: 14px; max-width: 100%; }

  /* the side counter visually competes with the headline on narrow screens */
  .counter { display: none; }
  .corner { display: none; }

  .actions { gap: 10px; width: 100%; flex-wrap: nowrap; }
  .btn { padding: 14px 20px; font-size: 11px; flex: 1; justify-content: center; min-width: 0; }
  .social { width: 44px; height: 44px; }

  .ticks { gap: 8px; bottom: max(20px, env(safe-area-inset-bottom)); }
  .ctrl { width: 34px; height: 34px; }
}

/* very narrow / older phones */
@media (max-width: 380px) {
  .hero-logo { height: 46px; margin-bottom: 20px; }
  .actions { gap: 8px; }
  .btn { padding: 13px 14px; }
  .social { width: 40px; height: 40px; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slide, .slide-img { transition: none; }
  .slide.active .slide-img { transform: scale(1); }
  .eyebrow .dot { animation: none; }
  .tick.active::before { animation: none; background: var(--accent); }
}
