/* ============================================================
   LAYOUT.CSS — Global structure, section scaffolding,
   navigation, hero, and footer layout rules.
   No decorative / component-specific styles here — just
   positioning, sizing, and structural flow.
   ============================================================ */


/* ── Global Base ─────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  overflow-x: hidden;        /* Prevent horizontal scroll from animations */
}

/* Reusable max-width wrapper with responsive horizontal padding */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}


/* ── Section scaffolding ─────────────────────────────────── */

/* All sections get consistent vertical rhythm */
section {
  padding-block: var(--space-3xl);
  position: relative;
}

/* Section header — centred label + heading + subtext block */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-red);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: 1.05;
  color: var(--clr-white);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
}

.section-sub {
  font-size: var(--fs-md);
  color: var(--clr-text-muted);
  max-width: 55ch;
  margin-inline: auto;
  line-height: 1.6;
}

/* Utility — inline red accent text */
.text-accent { color: var(--clr-red); }


/* ── Navigation ──────────────────────────────────────────── */

/* Fixed top bar — starts transparent, becomes solid on scroll
   (background toggled by nav.js adding .nav--scrolled class) */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background-color var(--transition-base),
              backdrop-filter var(--transition-base),
              border-color var(--transition-base);
  border-bottom: 1px solid transparent;
}

/* Scrolled state — applied by nav.js */
.nav--scrolled {
  background-color: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--clr-border);
}

/* Inner flex row: logo left, links right */
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo: image + text stacked */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.1;
  color: var(--clr-white);
  letter-spacing: 0.05em;
}

.nav__logo-text em {
  font-style: normal;
  color: var(--clr-red);
}

/* Desktop links row */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

/* Animated underline on desktop nav links */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-red);
  transition: width var(--transition-fast);
}

.nav__link:hover {
  color: var(--clr-white);
}

.nav__link:hover::after {
  width: 100%;
}

/* CTA link in nav — styled as a button */
.nav__link--cta {
  color: var(--clr-white);
  background: var(--clr-red);
  padding: 0.45em 1.1em;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color var(--transition-fast),
              transform var(--transition-fast);
}

.nav__link--cta::after { display: none; } /* No underline on CTA */

.nav__link--cta:hover {
  background: var(--clr-red-dark);
  transform: translateY(-1px);
}

/* Hamburger button — hidden on desktop, visible on mobile */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  z-index: 1010;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--clr-white);
  border-radius: 2px;
  transition: transform var(--transition-base),
              opacity var(--transition-fast);
  transform-origin: center;
}

/* Hamburger → X animation (toggled by nav.js adding .is-open) */
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer — slides down from nav */
.nav__drawer {
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

/* Drawer open state — triggered by nav.js */
.nav__drawer.is-open {
  max-height: 400px;
}

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) var(--container-pad);
  gap: var(--space-sm);
}

.nav__drawer-link {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--clr-text);
  padding-block: var(--space-xs);
  border-bottom: 1px solid var(--clr-border);
  transition: color var(--transition-fast),
              padding-left var(--transition-fast);
}

.nav__drawer-link:hover {
  color: var(--clr-red);
  padding-left: var(--space-xs);
}


/* ── Hero Section ────────────────────────────────────────── */

/* Full viewport height, content centred vertically */
.hero {
  min-height: 100svh;           /* svh = small viewport height (excludes mobile browser chrome) */
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
  position: relative;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: var(--space-xl);
}

/* Eyebrow label above heading */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-red);
  margin-bottom: var(--space-md);
}

.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--clr-red);
}

/* Main headline — display font, stacked vertically */
.hero__headline {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
}

.hero__line { color: var(--clr-white); }
.hero__line--accent  { color: var(--clr-red); }
.hero__line--outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--clr-white);
  text-stroke: 2px var(--clr-white);
}

/* Hero subtitle paragraph */
.hero__sub {
  max-width: 55ch;
  font-size: var(--fs-md);
  color: var(--clr-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

/* CTA button row */
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

/* Stats strip at the bottom of the hero */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--clr-border);
}

.hero__stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.hero__stat-num {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--clr-white);
  line-height: 1;
}

.hero__stat-label {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Thin vertical divider between stats */
.hero__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--clr-border);
  flex-shrink: 0;
}

/* Animated down-arrow scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.hero__scroll-hint:hover { opacity: 1; }

.hero__scroll-arrow {
  display: block;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--clr-text-muted);
  border-bottom: 2px solid var(--clr-text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 1.4s ease-in-out infinite;
}


/* ── Games Section ───────────────────────────────────────── */

.games {
  background: var(--clr-bg-2);
}

/* 3-column grid that collapses to 1 on mobile */
.games__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Footer link below the grid */
.games__footer {
  text-align: center;
  margin-top: var(--space-xl);
}


/* ── About Section ───────────────────────────────────────── */

.about {
  background: var(--clr-bg);
}

/* Two-column split: story text left, pillars right */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.about__story .section-title {
  text-align: left;
  margin-bottom: var(--space-md);
}

.about__quote {
  border-left: 3px solid var(--clr-red);
  padding-left: var(--space-md);
  margin-block: var(--space-md);
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

.about__body {
  font-size: var(--fs-base);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

/* 2×2 pillars grid */
.about__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}


/* ── Studio / Internship Section ─────────────────────────── */

.studio {
  background: var(--clr-bg-2);
}

/* Timeline: vertical list of steps */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

/* Vertical connecting line behind all markers */
.timeline::before {
  content: '';
  position: absolute;
  left: 27px;              /* Centred on the 56px marker */
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--clr-border);
  z-index: 0;
}

/* Each step row */
.timeline__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-md);
  align-items: start;
  padding-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

/* Royalty strip — 4-column info bar */
.royalty-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  background: var(--clr-bg-3);
  border: 1px solid var(--clr-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
}


/* ── Team Section ────────────────────────────────────────── */

.team {
  background: var(--clr-bg);
}

/* 4-column grid on desktop */
.team__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.team__remote-note {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}


/* ── Contact Section ─────────────────────────────────────── */

.contact {
  background: var(--clr-bg-2);
  overflow: hidden;
}

/* Contact links — horizontal row of 3 platform tiles */
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-block: var(--space-lg);
}

.contact__inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact__sub {
  max-width: 50ch;
  margin-inline: auto;
  color: var(--clr-text-muted);
  line-height: 1.65;
  margin-top: var(--space-sm);
}


/* ── Footer ──────────────────────────────────────────────── */

.footer {
  background: var(--clr-bg);
  border-top: 1px solid var(--clr-border);
  padding-block: var(--space-2xl) var(--space-lg);
}

/* Top row: brand left, nav columns right */
.footer__inner {
  display: flex;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
  align-items: flex-start;
}

.footer__brand {
  flex-shrink: 0;
}

.footer__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.7;
}

/* Three navigation columns */
.footer__nav {
  display: flex;
  flex: 1;
  gap: var(--space-2xl);
  justify-content: flex-end;
}

.footer__col-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-red);
  margin-bottom: var(--space-sm);
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__col a {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  transition: color var(--transition-fast);
}

.footer__col a:hover { color: var(--clr-white); }

/* Bottom copyright strip */
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--clr-border);
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}
