/* === CSS RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Premium Tokens - Light Theme */
  --bg: #ffffff;
  --bg-offset: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #f59e0b; /* Golden Amber for "Chips" feel */
  --accent-contrast: #ffffff;
  --border: #e2e8f0;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);

  --font-headings: 'Instrument Serif', serif;
  --font-body: 'Inter Tight', sans-serif;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: clip;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-headings);
  line-height: 1.1;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* === STRUCTURAL BASELINES === */
.factory-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 5%;
  width: 100%;
}

.production-section {
  padding: 70px 0;
  position: relative;
}

@media (max-width: 768px) {
  .production-section { padding: 50px 0; }
}

/* === PREMIUM UI BLOCKS === */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glass);
}

/* Sharp rectangular button style (Design Direction #92) */
.btn-action {
  border: 3px solid var(--text);
  padding: 1rem 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

.btn-action:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-cta {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-cta:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* === PAPER TEAR DIVIDER (Design Direction #93) === */
.tear-divider {
  height: 60px;
  width: 100%;
  background: var(--bg);
  clip-path: polygon(0% 0%, 5% 40%, 10% 10%, 15% 50%, 20% 20%, 25% 60%, 30% 15%, 35% 45%, 40% 5%, 45% 55%, 50% 10%, 55% 65%, 60% 20%, 65% 40%, 70% 5%, 75% 50%, 80% 15%, 85% 60%, 90% 10%, 95% 45%, 100% 0%, 100% 100%, 0% 100%);
  position: absolute;
  bottom: -1px;
  left: 0;
  z-index: 10;
}

.tear-divider-top {
  top: -1px;
  bottom: auto;
  transform: rotate(180deg);
}

/* === NAVIGATION (Hidden until scroll - Design Direction #91) === */
.factory-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transform: translateY(-101%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1rem 0;
}

.factory-nav.is-visible {
  transform: translateY(0);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; font-size: 1.5rem; }
}

/* === HERO (Arena Showcase - Design Direction #107) === */
.arena-showcase {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #fffbeb 0%, #fef3c7 100%);
  padding-top: 2rem;
  overflow: hidden;
}

.arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

@media (max-width: 1024px) {
  .arena-grid { grid-template-columns: 1fr; text-align: center; }
}

.arena-content h1 {
  font-size: clamp(3.5rem, 8vw, 6rem);
  -webkit-text-stroke: 2px var(--text);
  color: transparent;
  margin-bottom: 1.5rem;
  line-height: 0.9;
}

.arena-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.arena-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Tilted screenshot (Design Direction #86) */
.arena-visual {
  position: relative;
  perspective: 1000px;
}

.tilted-screen {
  max-width: 320px;
  transform: rotate(8deg);
  box-shadow: 40px 40px 80px rgba(0,0,0,0.15);
  transition: transform 0.6s ease;
}

.tilted-screen:hover {
  transform: rotate(0deg) scale(1.05);
}

/* === SCREENSHOT GALLERY (Factory Floor - Design Direction #87) === */
.factory-floor {
  background: var(--bg-offset);
}

.gallery-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 24px;
  padding: 20px 0 40px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: auto;
}

.gallery-img {
  height: 500px;
  width: auto;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .gallery-img { height: 350px; }
}

/* === STATS (Production Metrics - Design Direction #89) === */
.production-metrics {
  background: var(--accent);
  color: var(--accent-contrast);
}

.metrics-bar {
  display: flex;
  justify-content: space-around;
  text-align: center;
  gap: 2rem;
}

@media (max-width: 768px) {
  .metrics-bar { flex-direction: column; gap: 3rem; }
}

.metric-item .count {
  display: block;
  font-family: var(--font-headings);
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-item .label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* === FEATURES (Editorial Grid - Design Direction #88) === */
.editorial-grid {
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.editorial-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Multi-column bento/offset grid (Design Direction #99) */
.editorial-block:nth-child(even) { direction: rtl; }
.editorial-block:nth-child(even) .editorial-content { direction: ltr; }

.editorial-block:nth-child(2) { margin-left: 80px; }
.editorial-block:nth-child(3) { margin-left: -80px; }

@media (max-width: 768px) {
  .editorial-block { grid-template-columns: 1fr; gap: 2rem; margin-left: 0 !important; }
  .editorial-grid { gap: 60px; }
}

.editorial-content {
  position: relative;
}

.editorial-number {
  font-family: var(--font-headings);
  font-size: 8rem;
  color: var(--accent);
  opacity: 0.15;
  position: absolute;
  top: -4rem;
  left: -2rem;
  z-index: 0;
  line-height: 1;
}

.editorial-text {
  position: relative;
  z-index: 1;
}

.editorial-text h3 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.reading-time {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

/* === REVIEWS (Player Voices - Design Direction #90) === */
.player-voices {
  background: var(--bg-offset);
}

.voices-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .voices-layout { grid-template-columns: 1fr; }
}

.featured-review {
  background: #fff;
  border: 3px solid var(--text);
  padding: 3rem;
  position: relative;
}

.quote-icon {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.3;
}

.review-stars {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.review-text {
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.review-author {
  font-weight: 800;
  display: block;
}

.supporting-reviews {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.review-card:hover { transform: translateY(-4px); }

/* === FAQ (Knowledge Base) === */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.faq-trigger {
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-body);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  padding-bottom: 0;
}

.faq-item.active .faq-content {
  max-height: 300px;
  padding-bottom: 1.5rem;
}

.faq-item.active .ph-plus { transform: rotate(45deg); }

/* === DOWNLOAD CTA (Glass Hub - Design Direction #113) === */
.download-hub {
  padding: 120px 0;
  background: radial-gradient(circle at top left, #fef3c7 0%, #fffbeb 50%, #fef3c7 100%);
  text-align: center;
}

.hub-glass {
  max-width: 900px;
  margin: 0 auto;
}

.hub-content .app-icon-main {
  width: 120px;
  height: 120px;
  border-radius: 30px;
  margin: 0 auto 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hub-content h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.store-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 3rem;
}

@media (max-width: 600px) {
  .store-buttons { flex-direction: column; align-items: center; }
}

/* === FOOTER (Accordion/Multi-column - Design Direction #94) === */
.factory-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .footer-main { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand .nav-logo {
  width: 24px;
  height: 24px;
  margin-bottom: 1.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
}

.social-link:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Mobile Accordion Style Footer (Design Direction #94) */
@media (max-width: 768px) {
  .footer-col {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
  }
  .footer-col h4 {
    margin-bottom: 0;
    padding: 1.5rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
  }
  .footer-col h4::after {
    content: '+';
  }
  .footer-col ul {
    display: none;
    padding-bottom: 1.5rem;
  }
  .footer-col.active ul {
    display: block;
  }
  .footer-col.active h4::after {
    content: '-';
  }
}

/* === UTILITIES & ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

[data-delay="200"] { transition-delay: 200ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="600"] { transition-delay: 600ms; }

.text-stroke {
  -webkit-text-stroke: 1px var(--text);
  color: transparent;
}
