:root {
  color-scheme: dark;
  --bg-1: #0b0b0b;
  --bg-2: #141414;
  --card: #1e1e1e;
  --border: #2a2a30;
  --text: #f5f5f1;
  --muted: #b3b3b3;
  --hint: #7a7a80;
  --accent: #e50914;
  --accent-soft: rgba(229, 9, 20, 0.18);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --container: 1200px;
}

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

body {
  font-family: "Spline Sans", sans-serif;
  background: radial-gradient(circle at 20% 10%, rgba(229, 9, 20, 0.22), transparent 40%),
    linear-gradient(180deg, #1a1a1a 0%, var(--bg-1) 60%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 80%, rgba(229, 9, 20, 0.08), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(242, 242, 242, 0.04), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid rgba(42, 42, 48, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 18px 0;
  gap: 16px;
}

.logo {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}

nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

nav a:hover,
nav a:focus {
  color: var(--text);
  border-color: var(--accent);
}

.hero {
  padding: 64px 0 36px;
  display: grid;
  gap: 18px;
  animation: fade-up 0.6s ease both;
}

.hero h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
}

.hero p {
  color: var(--muted);
  max-width: 600px;
}

.hero-story {
  position: relative;
  height: min(65vh, 520px);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 16px;
  background: #0e0e10;
  box-shadow: var(--shadow);
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  touch-action: pan-y;
}

.story-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  z-index: 2;
}

.story-progress[data-count="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.story-progress[data-count="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.story-progress[data-count="5"] {
  grid-template-columns: repeat(5, 1fr);
}

.story-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.story-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text);
  transition: width 0.2s linear;
}

.story-track {
  flex: 1;
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}

.story-paused .story-progress-fill {
  transition: none;
}

.story-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #121212;
  display: grid;
  align-items: end;
}

.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.9) 100%);
}

.story-content {
  position: relative;
  z-index: 1;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.story-content h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1;
}

.story-eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.story-actions {
  display: grid;
  gap: 10px;
}

.story-primary {
  width: 100%;
  min-height: 44px;
}

.story-nav {
  display: none;
  gap: 8px;
  z-index: 2;
}

.story-control {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button:hover,
.button:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(229, 9, 20, 0.35);
}

.section {
  padding: 28px 0 36px;
}

.section h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.section p {
  color: var(--muted);
  margin-bottom: 18px;
}

.carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-wrap {
  position: relative;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.carousel-arrow::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.prev::before {
  transform: rotate(-135deg);
}

.carousel-arrow.next {
  right: 10px;
}


.carousel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 210px;
  flex: 0 0 min(78vw, 280px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.25s ease, border 0.25s ease;
  animation: fade-up 0.5s ease both;
}

.carousel .card:nth-child(1),
.grid .card:nth-child(1) {
  animation-delay: 0.05s;
}

.carousel .card:nth-child(2),
.grid .card:nth-child(2) {
  animation-delay: 0.1s;
}

.carousel .card:nth-child(3),
.grid .card:nth-child(3) {
  animation-delay: 0.15s;
}

.carousel .card:nth-child(4),
.grid .card:nth-child(4) {
  animation-delay: 0.2s;
}

.carousel .card:nth-child(5),
.grid .card:nth-child(5) {
  animation-delay: 0.25s;
}

.card::before {
  content: "";
  display: block;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(130deg, rgba(229, 9, 20, 0.35), rgba(0, 0, 0, 0.8)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.5));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(229, 9, 20, 0.45);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--hint);
  font-size: 0.78rem;
}

.tag {
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(26, 26, 30, 0.6);
}

.card .action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.notice {
  border: 1px solid var(--border);
  background: rgba(26, 26, 30, 0.8);
  padding: 16px;
  border-radius: var(--radius-md);
  color: var(--muted);
}

.meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

@media (max-width: 820px) {
  nav {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  .header-inner {
    flex-direction: column;
  }
}

.carousel-arrow {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .story-track {
    transition: none;
  }

  .story-progress-fill {
    transition: none;
  }

  .story-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
