/* ============================================================
   KayoRider — dark night-garage theme (single locked dark mode:
   the brand is night riding, light mode is intentionally absent).
   Shape system: interactive controls = pill, cards/media = 18px.
   Single accent: --red. No other hues on the page.
   ============================================================ */

:root {
  --bg: #0d0c0c;
  --bg-2: #121010;
  --surface: #171414;
  --line: rgba(244, 241, 239, 0.09);
  --text: #f4f1ef;
  --muted: #b3aaa5;
  --red: #e23b2e;          /* accent on dark surfaces (4.56:1 on --bg) */
  --red-fill: #cf2d20;     /* solid fills under white text (5.19:1) */
  --red-text: #e8564a;     /* small red text on surfaces (5.11:1 on --surface) */
  --red-deep: #b52619;
  --red-glow: rgba(226, 59, 46, 0.32);
  --radius-card: 18px;
  --nav-h: 68px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.accent { color: var(--red); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -3rem; left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--red-fill);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Buttons (pill system) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--red-fill);
  color: #fff;
  box-shadow: 0 8px 28px -10px var(--red-glow);
}
.btn--primary:hover { background: var(--red-deep); }

.btn--ghost {
  background: rgba(244, 241, 239, 0.04);
  color: var(--text);
  border-color: rgba(244, 241, 239, 0.22);
}
.btn--ghost:hover { border-color: rgba(244, 241, 239, 0.5); background: rgba(244, 241, 239, 0.08); }

.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

:is(a, button):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(13, 12, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav__inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav__links {
  display: flex;
  gap: 2.2rem;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--text); }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 68% center;
  animation: hero-drift 24s var(--ease) forwards;
  transform-origin: 70% 60%;
}
@keyframes hero-drift {
  from { transform: scale(1.09); }
  to { transform: scale(1); }
}

.hero__fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(to top, rgba(13, 12, 12, 0.96) 0%, rgba(13, 12, 12, 0.35) 38%, rgba(13, 12, 12, 0.15) 60%, rgba(13, 12, 12, 0.4) 100%),
    linear-gradient(100deg, rgba(13, 12, 12, 0.82) 8%, rgba(13, 12, 12, 0) 55%);
}

.hero__content {
  position: relative;
  z-index: 4;
  width: 100%;
  padding-block: clamp(4rem, 12vh, 7rem);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9.5vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero__sub {
  margin: 1.4rem 0 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--muted);
}

.hero__cta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4.5rem, 10vw, 7.5rem); }

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  text-transform: uppercase;
}

.section__sub {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
}

/* ---------- Platforms bento ---------- */

.platforms { background: var(--bg); }

.bento {
  margin-top: 2.75rem;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  grid-template-rows: 250px 250px;
  gap: 1.1rem;
}

.cell {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cell:hover { transform: translateY(-4px); border-color: rgba(244, 241, 239, 0.25); }

.cell--yt { grid-row: 1 / 3; }

.cell__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.cell:hover .cell__img { transform: scale(1.04); }

.cell--tt .cell__img { object-position: center 30%; }

.cell__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(13, 12, 12, 0.92) 0%, rgba(13, 12, 12, 0.35) 55%, rgba(13, 12, 12, 0.12) 100%);
}
.cell--tg .cell__body {
  background:
    radial-gradient(120% 120% at 85% 0%, rgba(226, 59, 46, 0.22) 0%, rgba(226, 59, 46, 0) 55%),
    var(--surface);
}

.cell__icon {
  width: 30px; height: 30px;
  margin-bottom: auto;
  color: var(--text);
  opacity: 0.9;
}

.cell__name {
  margin: 1rem 0 0.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.cell__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 26rem;
}

.cell__link {
  margin-top: 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--red-text);
}

/* ---------- Collab ---------- */

.collab {
  position: relative;
  overflow: hidden;
}
.collab__bg { position: absolute; inset: 0; }
.collab__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.collab__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(13, 12, 12, 0.94) 0%, rgba(13, 12, 12, 0.78) 50%, rgba(13, 12, 12, 0.55) 100%);
}

.collab__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.collab__desc {
  margin: 1.2rem 0 0;
  max-width: 30rem;
  color: var(--muted);
}

.collab__card {
  padding: 1.8rem;
  border-radius: var(--radius-card);
  border: 1px solid rgba(244, 241, 239, 0.14);
  background: rgba(19, 16, 16, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(244, 241, 239, 0.07);
}
@supports not (backdrop-filter: blur(1px)) {
  .collab__card { background: var(--surface); }
}

.collab__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.collab__label {
  flex-basis: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.collab__handle { color: var(--muted); font-weight: 600; font-size: 0.92rem; }

.collab__divider {
  height: 1px;
  margin-block: 1.4rem;
  background: var(--line);
}

.collab__mail {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 241, 239, 0.3);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.collab__mail:hover { color: var(--red-text); border-color: var(--red-text); }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2rem;
  flex-wrap: wrap;
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
}

.footer__social { display: flex; gap: 0.4rem; }
.footer__social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.footer__social a:hover { color: var(--text); background: rgba(244, 241, 239, 0.07); }
.footer__social svg { width: 19px; height: 19px; }

.footer__copy { color: var(--muted); font-size: 0.88rem; }

/* ---------- Scroll reveal ---------- */

/* Hidden only when JS is running (main.js stamps .js on <html>),
   so content stays visible if the script fails to load. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg img { animation: none; }
  .hero__fx { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cell, .cell__img, .btn { transition: none; }
  .nav__links { transition: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .collab__inner { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: rgba(13, 12, 12, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s 0.35s;
  }
  .nav__links.open { transform: none; visibility: visible; transition-delay: 0s; }
  .nav__links a {
    padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem);
    font-size: 1.05rem;
  }
  .nav__burger { display: flex; }
  .nav.is-open { background: rgba(13, 12, 12, 0.97); }

  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .cell--yt { grid-row: auto; min-height: 300px; }
  .cell--tt { min-height: 340px; }
  .cell--tg { min-height: 220px; }


  .hero__scrim {
    background:
      linear-gradient(to top, rgba(13, 12, 12, 0.97) 0%, rgba(13, 12, 12, 0.62) 45%, rgba(13, 12, 12, 0.2) 70%, rgba(13, 12, 12, 0.4) 100%);
  }
}
