/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: #050505;
  color: #F0F0F0;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

::-webkit-scrollbar { width: 8px; background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* --- TYPOGRAPHY --- */
.serif-display {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.sans-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #888;
}

.container { width: 90%; max-width: 1400px; margin: 0 auto; }
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.9s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 38px 0;
  position: relative;
  z-index: 50;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: #FFF;
}

.logo-link { text-decoration: none; color: inherit; }

.menu-btn {
  border: 1px solid #333;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #DDD;
  text-decoration: none;
  transition: all 0.35s ease;
}

.menu-btn:hover {
  border-color: #666;
  color: #FFF;
  transform: translateY(-2px);
}

/* --- HERO --- */
.hero { padding-top: 70px; padding-bottom: 120px; }
.animated-headline { font-size: clamp(60px, 7vw, 110px); }
.headline-line { overflow: hidden; margin-bottom: 6px; }

.hero-subtext {
  margin-top: 32px;
  max-width: 620px;
  line-height: 1.7;
  color: #BDBDBD;
  font-size: 1.05rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 55px;
  max-width: 900px;
}

.stat {
  border: 1px solid #222;
  padding: 18px;
  border-radius: 14px;
  background: rgba(17,17,17,0.4);
}
.stat .serif-display { font-size: 38px; }
.stat .sans-label { margin-top: 12px; }

/* --- ROSTER SECTION --- */
.roster-section {
  padding: 95px 0;
  border-top: 1px solid #141414;
  border-bottom: 1px solid #141414;
}
.rolling-track { overflow: hidden; width: 100%; user-select: none; }
.rolling-inner { display: flex; flex-wrap: nowrap; gap: 0; padding: 22px 0; will-change: transform; }
.rolling-set { display: flex; flex-wrap: nowrap; gap: 35px; }
.rolling-item { white-space: nowrap; font-size: 1.15rem; color: #EAEAEA; opacity: 0.9; }

/* --- PORTFOLIO SECTION (scroll-snap carousel) --- */
:root{
  --card-w: 300px;
  --card-h: 450px;
  --card-gap: 12px;
}

.portfolio-section { padding: 130px 0; position: relative; }

.portfolio-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 55px;
}

.pf-controls { display: flex; gap: 10px; align-items: center; }
.pf-arrow {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid #2a2a2a; background: rgba(16,16,16,0.65);
  color: #F0F0F0;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.pf-arrow:hover { transform: translateY(-2px); border-color: #666; }

.portfolio-wrap {
  position: relative;
  height: 520px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #1a1a1a;
  background: radial-gradient(1200px 600px at 50% 20%, rgba(255,255,255,0.05), rgba(0,0,0,0));
}

/* The track is a native horizontal scroller */
.portfolio-track {
  display: flex;
  gap: var(--card-gap);
  padding-top: 20px;
  padding-bottom: 20px;

  /* Allow first/last to truly center, without negative padding */
  padding-left: max(20px, calc((100% - var(--card-w)) / 2));
  padding-right: max(20px, calc((100% - var(--card-w)) / 2));

  /* Helps snap + JS "center math" */
  scroll-padding-left: max(20px, calc((100% - var(--card-w)) / 2));
  scroll-padding-right: max(20px, calc((100% - var(--card-w)) / 2));

  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  overscroll-behavior-x: none;
  scroll-snap-stop: always;
}

/* hide scrollbar */
.portfolio-track::-webkit-scrollbar { height: 0; }
.portfolio-track { scrollbar-width: none; }

/* Base card (dimmed) */
.game-card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  flex-shrink: 0;

  border-radius: 14px;
  overflow: hidden;

  display: block;
  text-decoration: none;
  background: #111;
  border: 1px solid #333;

  scroll-snap-align: center;

  opacity: 0.18;
  filter: grayscale(100%);
  transform: scale(0.82);

  transition: transform 0.45s ease, box-shadow 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.game-card-label {
  position: absolute; bottom: 0; left: 0; width: 100%;
  padding: 25px 22px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  color: #FFF;
  font-size: 1.2rem;
}

/* Side cards (applied by JS) */
.game-card.left-card {
  opacity: 0.55;
  transform: scale(0.85) rotateY(20deg);
  box-shadow:
    -18px 22px 70px rgba(0, 0, 0, 0.55),
    18px 12px 50px rgba(0, 0, 0, 0.30);
}
.game-card.right-card {
  opacity: 0.55;
  transform: scale(0.85) rotateY(-20deg);
  box-shadow:
    18px 22px 70px rgba(0, 0, 0, 0.55),
    -18px 12px 50px rgba(0, 0, 0, 0.30);
}

/* Selected card */
.game-card.is-selected {
  opacity: 1;
  filter: grayscale(0%) contrast(1.1);
  transform: scale(1.06);
  border: none;
  box-shadow:
    30px 32px 110px rgba(0, 0, 0, 0.80),
    -30px 32px 110px rgba(0, 0, 0, 0.80),
    0 18px 55px rgba(0, 0, 0, 0.65);
}

.game-card.is-selected:hover img { transform: scale(1.06); }

/* --- CASE PAGES --- */
.case-page .navbar { padding-bottom: 22px; }
.case-hero { padding: 70px 0 40px; }
.case-hero h1 { font-size: clamp(56px, 6vw, 92px); margin-top: 12px; }
.case-subhead { margin-top: 22px; max-width: 760px; line-height: 1.7; color: #BDBDBD; font-size: 1.05rem; }

.case-meta { margin-top: 14px; }
.case-ig {
  display: inline-block;
  text-decoration: none;
  color: #DDD;
  border: 1px solid #2a2a2a;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.case-ig:hover { transform: translateY(-2px); border-color: #666; color: #FFF; }

.case-media { padding: 40px 0 70px; }
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #1a1a1a;
  background: #0b0b0b;
}
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.case-content { padding: 10px 0 120px; }
.case-writeup p { color: #BDBDBD; line-height: 1.8; max-width: 900px; }

/* --- CTA --- */
.cta-section {
  padding: 120px 0;
  border-top: 1px solid #141414;
  text-align: center;
}
.big-link {
  display: inline-block;
  color: #FFF;
  text-decoration: none;
  font-size: clamp(34px, 4.4vw, 58px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.big-link:hover { transform: translateY(-4px); opacity: 0.92; }

/* --- CONTACT --- */
.contact-section { padding: 120px 0; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.contact-card { border: 1px solid #222; background: rgba(17,17,17,0.55); padding: 22px; border-radius: 14px; }
.micro-note { margin-top: 10px; color: #7d7d7d; font-size: 0.85rem; line-height: 1.5; }

@media (max-width: 980px) {
  .hero-stats { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .portfolio-header { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .portfolio-wrap { height: auto; }
  .portfolio-track { flex-wrap: nowrap; }
}

/* Ensure arrows are clickable */
.portfolio-header { position: relative; z-index: 10; }
.pf-controls { position: relative; z-index: 11; }
.pf-arrow { position: relative; z-index: 12; }
.portfolio-wrap { position: relative; z-index: 1; }
.portfolio-track { position: relative; z-index: 1; }
