/* ==========================================
   mateo ai - Minimalist Luxury Agency Stylesheet
   ========================================== */

/* Design Tokens */
:root {
  --bg-obsidian: #070709;
  --bg-card: rgba(18, 18, 22, 0.8);
  --border-grid: rgba(255, 255, 255, 0.08);
  
  --text-primary: #f7f7f9;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Dynamic Typography variables (adjustable via Tweak Console) */
  --font-display: 'Syne', sans-serif;
  --font-ui: 'Outfit', sans-serif;
  --font-weight-display: 700;
  --tweak-ls: 0em; /* global letter-spacing offset (Tweak Console stepper) */
  
  --accent-color: #f7f7f9;
  --accent-color-dim: rgba(255, 255, 255, 0.4);
  
  --transition-smooth: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  color: var(--text-primary);
  font-family: var(--font-ui);
  overflow-x: clip;
}

body {
  font-family: var(--font-ui);
  background-color: transparent;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: clip;
  transition: var(--transition-normal);
  min-height: 100vh;
  position: relative;
  letter-spacing: calc(-0.01em + var(--tweak-ls));
}

/* Global Interactive Background */
.global-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg-obsidian);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-obsidian);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   App Header (Minimalist & Floating)
   ========================================== */
.app-header {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem 0 2rem;
  z-index: 100;
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  background: rgba(12, 12, 14, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 -1px 1px rgba(255, 255, 255, 0.03);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Sensory inner flare for luxury optical glass feel */
.app-header::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  opacity: 0.7;
}

/* Scrolled state of floating header capsule */
.app-header.scrolled {
  top: 15px;
  width: 85%;
  max-width: 980px;
  background: rgba(8, 8, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

.logo-container {
  z-index: 2;
  perspective: 1000px;
  width: 140px;
  height: 30px;
  position: relative;
}

.logo-3d-flipper {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  animation: flipLogo 8s infinite cubic-bezier(0.4, 0.0, 0.2, 1);
}

.logo-front, .logo-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
  color: #fff;
  white-space: nowrap;
  transform-origin: center center;
}

.logo-back {
  transform: rotateY(180deg);
  color: #fff;
}

@keyframes flipLogo {
  0%, 40% { transform: rotateY(0deg); }
  50%, 90% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

.nav-links {
  display: flex;
  position: relative;
  gap: 0.4rem;
  z-index: 2;
}

.nav-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: #ccff00;
  border-radius: 30px;
  box-shadow: 0 0 15px rgba(204, 255, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.55rem 1.1rem;
  border-radius: 30px;
  background: transparent;
  z-index: 2;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active {
  color: #070709;
  font-weight: 700;
}

.nav-links a::after {
  display: none;
}

/* ==========================================
   Floating Typography Tweak Panel
   ========================================== */
.typography-tweak-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  top: auto;
  z-index: 105;
  display: flex;
  flex-direction: column-reverse; /* Menu opens upwards */
  align-items: flex-end;
  font-family: var(--font-ui);
}

.tweak-toggle {
  background: rgba(18, 18, 22, 0.85);
  border: 1px solid var(--border-grid);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: var(--transition-fast);
}

.tweak-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.tweak-icon {
  font-size: 0.85rem;
}

.tweak-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tweak-menu {
  margin-bottom: 0.75rem;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid var(--border-grid);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  width: 230px;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.typography-tweak-panel.active .tweak-menu {
  display: flex;
}

.tweak-section-title {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.tweak-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.tweak-opt {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-grid);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 300;
  transition: var(--transition-fast);
}

.tweak-opt:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.tweak-opt.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
  font-weight: 500;
}

/* Letter-spacing stepper row */
.tweak-ls-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.tweak-ls-row .tweak-opt {
  text-align: center;
  padding: 0.4rem 0.7rem;
  flex: 0 0 auto;
}

.tweak-ls-value {
  flex: 1;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==========================================
   Hero Section (Cinematic full bleed)
   ========================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 8%;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
}

#hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) contrast(1.05);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(7,7,9,0.03) 0%, rgba(7,7,9,0.35) 82%, rgba(7,7,9,1) 100%);
  pointer-events: none;
}

.canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
}

#refraction-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  pointer-events: none;
}

.hero-text-wrap {
  max-width: 800px;
}

.hero-tag {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--accent-color-dim);
  display: block;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 5.8rem;
  line-height: 0.95;
  letter-spacing: calc(-0.03em + var(--tweak-ls));
  margin-bottom: 2.5rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  transition: var(--transition-fast);
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 200;
  max-width: 550px;
}

/* Bottom Controls */
.hero-bottom-controls {
  position: absolute;
  bottom: 40px;
  left: 8%;
  right: 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  pointer-events: auto;
}

.control-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}

.control-btn:hover {
  color: var(--text-primary);
}

.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
}

.scroll-arrow {
  font-size: 0.9rem;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(6px); }
  100% { transform: translateY(0); }
}

/* ==========================================
   Section Common Layouts (Below Fold)
   ========================================== */
.about-section,
.business-section,
.press-section,
.crew-section,
.crexian-section {
  padding: 8rem 0;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

.about-section,
.business-section,
.press-section,
.crew-section,
.contact-section {
  position: relative;
  padding: 10rem 0;
  z-index: 10;
  background: rgba(7, 7, 9, 0.15);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-top: 1px solid var(--border-grid);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6%;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: block;
}

.section-title {
  font-size: 3.6rem;
  line-height: 1.1;
  letter-spacing: calc(-0.02em + var(--tweak-ls));
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  transition: var(--transition-fast);
}

.section-header {
  margin-bottom: 5rem;
}

/* ==========================================
   About Section & Investment Badge
   ========================================== */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
}

.grid-left {
  display: flex;
  flex-direction: column;
}

.grid-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.editorial-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 200;
}

.editorial-text.font-bold {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
}

.investment-badge {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-grid);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1rem;
}

.badge-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.badge-value {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-primary);
}

/* ==========================================
   Business Section (3D Infinite Cylinder Carousel)
   ========================================== */
.business-scroll-container {
  position: relative;
  height: 250vh; /* Reduced from 400vh to avoid feeling stuck */

  background: rgba(7, 7, 9, 0.15);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-top: 1px solid var(--border-grid);
}

.business-sticky-wrap {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Flex item: don't let the works row's min-content width stretch the container */
.business-sticky-wrap .section-container {
  width: 100%;
  min-width: 0;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  /* Cards (560px) overhang the 440px stage by 60px above — keep the title clear */
  margin-bottom: 4.5rem;
}

.section-header-left {
  display: flex;
  flex-direction: column;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: var(--font-ui);
  font-weight: 300;
}

.rotate-icon {
  animation: spin 5s linear infinite;
  display: inline-block;
  font-size: 0.95rem;
}

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* 3D Carousel Cylinder Stage */
.carousel-3d-stage {
  perspective: 1500px;
  width: 100%;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Ambient Backlight Glow (AAA aesthetic) */
.carousel-ambient-glow {
  position: absolute;
  width: 480px;
  height: 560px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(80px);
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  transition: background 1.0s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-3d-cylinder {
  transform-style: preserve-3d;
  width: 300px;
  height: 560px;
  position: relative;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.12s ease-out;
}

/* Redesigned Premium Glassmorphic Narrow Cards */
.card-3d {
  position: absolute;
  width: 290px; /* Sleeker width */
  height: 560px; /* Elegant height to fit tags */
  left: 5px;
  top: 0;
  background: linear-gradient(135deg, rgba(20, 20, 26, 0.82) 0%, rgba(8, 8, 10, 0.96) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  backface-visibility: hidden;
  opacity: 0.12;
  transition: opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  pointer-events: none;
  transform-style: preserve-3d;
}

/* Color indicator bar at top edge of card */
.card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--theme-color);
  border-radius: 12px 12px 0 0;
  opacity: 0.15;
  transition: opacity 0.35s ease, box-shadow 0.35s ease;
}

.card-3d.active-3d {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 255, 255, 0.02);
  pointer-events: auto;
}

.card-3d.active-3d::before {
  opacity: 1;
  box-shadow: 0 0 12px var(--theme-color);
}

.b-header-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.b-num {
  font-size: 3rem;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 100;
  color: var(--text-primary);
  opacity: 0.12;
  margin-top: -0.5rem;
}

.b-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

.b-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 200;
  flex: 1;
}

/* Micro pill tag container */
.b-details-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tag-pill {
  font-size: 0.65rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-weight: 400;
  transition: var(--transition-fast);
  letter-spacing: 0.02em;
}

.tag-pill a {
  color: inherit;
  text-decoration: none;
}

.tag-pill:hover {
  background: #f7f7f9;
  border-color: #f7f7f9;
  color: #070709;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Dynamic Pillar Works Previews */
.pillar-works-section {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border-grid);
  padding-top: 2.5rem;
  width: 100%;
}

.pillar-works-header {
  margin-bottom: 1.5rem;
}

.p-works-tag {
  font-size: 0.65rem;
  font-family: var(--font-ui);
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pillar-works-container {
  position: relative;
  width: 100%;
  min-height: 225px;
}

.pillar-works-group {
  display: none;
  gap: 1.5rem;
  width: 100%;
  padding-bottom: 1.5rem; /* for scrollbar space */
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pillar-works-group.active {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Hairline scrollbar — barely-there until the row is hovered.
   NOTE: setting scrollbar-width/color would make Chrome IGNORE the
   ::-webkit-scrollbar styles below, so those go to Firefox only. */
@supports not selector(::-webkit-scrollbar) {
  .pillar-works-group {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  }
}
.pillar-works-group::-webkit-scrollbar {
  height: 2px;
}
.pillar-works-group::-webkit-scrollbar-track {
  background: transparent;
}
.pillar-works-group::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
.pillar-works-group:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.32);
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.pillar-works-section {
  --mini-h: 165px; /* one knob: thumb height drives every tile width */
}

.mini-work-card {
  background: transparent;
  border: none;
  padding: 0;
  cursor: default;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex: 0 0 auto;
  width: calc(var(--mini-h) * 1.6);   /* default: landscape tile */
}

.mini-work-card[data-video],
a.mini-work-card {
  cursor: pointer;
}

.mini-work-card--p { width: calc(var(--mini-h) * 0.667); }  /* 2:3 portrait posters */
.mini-work-card--n { width: calc(var(--mini-h) * 0.56); }   /* narrow vertical tile */
.mini-work-card--w { width: calc(var(--mini-h) * 2); }      /* wide R&D / platform tiles */
.mini-work-card--duo { width: calc(var(--mini-h) * 1.38); } /* two portrait shots side by side */

.mini-thumb-wrap--duo {
  display: flex;
  gap: 2px;
}

.mini-thumb-wrap--duo .mini-thumb {
  width: 50%;
}

.mini-thumb-wrap {
  position: relative;
  width: 100%;
  height: var(--mini-h);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.6rem;
  background: #000;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.mini-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: brightness(0.88);
}

.mini-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #ffffff;
  background: rgba(7, 7, 9, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.mini-work-card:hover .mini-thumb-wrap {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.mini-work-card:hover .mini-thumb {
  transform: scale(1.05);
  filter: brightness(1);
}

.mini-work-card:hover .mini-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.mini-name {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-sub {
  font-size: 0.66rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* Organic staggered entrance when a pillar's works appear */
.pillar-works-group .mini-work-card,
.pillar-works-group .mini-work-info-box {
  opacity: 0;
}

.pillar-works-group.active .mini-work-card,
.pillar-works-group.active .mini-work-info-box {
  animation: workIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pillar-works-group.active > *:nth-child(1) { animation-delay: 0.05s; }
.pillar-works-group.active > *:nth-child(2) { animation-delay: 0.11s; }
.pillar-works-group.active > *:nth-child(3) { animation-delay: 0.17s; }
.pillar-works-group.active > *:nth-child(4) { animation-delay: 0.23s; }
.pillar-works-group.active > *:nth-child(5) { animation-delay: 0.29s; }
.pillar-works-group.active > *:nth-child(6) { animation-delay: 0.35s; }
.pillar-works-group.active > *:nth-child(7) { animation-delay: 0.41s; }
.pillar-works-group.active > *:nth-child(8) { animation-delay: 0.47s; }
.pillar-works-group.active > *:nth-child(9) { animation-delay: 0.53s; }

@keyframes workIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Short viewports: shrink the carousel cards and tiles so the sticky stage
   fits 100vh. Cards, cylinder and stage share one height — no vertical
   overflow, so nothing creeps over the section title. */
@media (max-height: 1040px) {
  .section-header-row {
    margin-bottom: 1rem;
  }
  .business-sticky-wrap .section-title {
    font-size: 2.4rem;
  }
  .carousel-3d-stage,
  .carousel-3d-cylinder,
  .card-3d {
    height: 400px;
  }
  .card-3d {
    padding: 1.5rem 1.4rem;
    gap: 0.65rem;
  }
  .card-3d .b-desc {
    font-size: 0.84rem;
    line-height: 1.55;
  }
  .card-3d .tag-pill {
    font-size: 0.66rem;
    padding: 0.28rem 0.65rem;
  }
  .pillar-works-section {
    --mini-h: 96px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
  .pillar-works-header {
    margin-bottom: 0.75rem;
  }
  .pillar-works-container {
    min-height: 148px;
  }
}

.mini-tag {
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-title {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-primary);
}

.mini-work-info-box {
  flex: 0 1 480px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-grid);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crexian-card {
  background: rgba(7, 7, 9, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.crexian-card:hover {
  transform: translateY(-5px);
  background: rgba(15, 15, 20, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
}

.mini-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 200;
}

/* ==========================================
   Works Gallery
   ========================================== */
.section-subtitle-small {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 200;
  margin-top: 1rem;
}

/* ==========================================
   Press / Achievements Section
   ========================================== */
.press-timeline {
  display: flex;
  flex-direction: column;
  margin-top: 3rem;
}

.press-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-top: 1px solid var(--border-grid);
  padding: 3rem 0;
  gap: 3rem;
  transition: var(--transition-fast);
}

.press-row:last-child {
  border-bottom: 1px solid var(--border-grid);
}

.press-row:hover {
  background: rgba(255, 255, 255, 0.01);
}

.p-date {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 300;
  padding-top: 0.15rem;
}

.p-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.p-type {
  font-size: 0.65rem;
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.p-headline {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-primary);
}

.p-detail {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 200;
  max-width: 800px;
}

/* ==========================================
   Crew Section (Only 2 Co-CEOs)
   ========================================== */
.crew-founders-only {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
  margin: 4rem auto 0 auto;
  gap: 6rem;
}

.crew-grid {
  display: grid;
  margin-top: 4rem;
}

.crew-card {
  border-top: 1px solid var(--border-grid);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-name {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
}

.c-title-small {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
}

.c-bio {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 200;
}

/* ==========================================
   Crexian Network Section (4 Profiles grid)
   ========================================== */
.crexian-section {
  position: relative;
  padding: 8rem 0;
  z-index: 10;
  background: transparent;
  border-top: 1px solid var(--border-grid);
}

/* Artist stage — collapsed by default, expands smoothly via grid-template-rows */
.crexian-stage {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  scroll-margin-top: 7rem;
}

.crexian-section.viewing .crexian-stage {
  grid-template-rows: 1fr;
  opacity: 1;
}

.crexian-stage-inner {
  min-height: 0;
  overflow: hidden;
}

.crexian-stage-frame {
  position: relative;
  width: min(100%, 720px);
  margin: 3.5rem auto 0.5rem;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 240, 255, 0.07);
  transform: translateY(28px) scale(0.96);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s, opacity 0.7s ease 0.12s;
}

.crexian-section.viewing .crexian-stage-frame {
  transform: none;
  opacity: 1;
}

/* Video mode: frame keeps the reel's own 16:9 ratio instead of filling the section */
.crexian-stage.has-video .crexian-stage-frame {
  aspect-ratio: 16 / 9;
  width: min(100%, calc(58vh * 16 / 9));
}

#crexian-stage-video {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crexian-stage.has-video #crexian-stage-video {
  display: block;
}

.crexian-stage-profile {
  padding: 6rem 3rem 4rem;
  font-size: 1rem;
  line-height: 1.9;
  font-weight: 200;
  color: var(--text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.crexian-stage.has-video .crexian-stage-profile {
  display: none;
}

.crexian-stage-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}

.crexian-stage-name {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.crexian-stage-name .cr-title {
  color: rgba(255, 255, 255, 0.55);
}

.crexian-stage-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  color: #ffffff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.crexian-stage-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.crexian-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4.5rem;
}

.crexian-card {
  position: relative;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(10, 10, 12, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, padding 0.7s cubic-bezier(0.16, 1, 0.3, 1), gap 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.crexian-card:hover {
  background: rgba(20, 20, 25, 0.6);
  border-top-color: rgba(255, 255, 255, 0.3);
}

.cr-bio {
  max-height: 14rem;
  overflow: hidden;
  transition: max-height 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.crexian-card:has(.cr-site-link) .cr-name {
  padding-right: 2.8rem;
}

/* Personal-site button: a small circled arrow in the card's top-right corner (김찬영 → sanei.mov) */
.cr-site-link {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: border-color 0.35s ease, background 0.35s ease,
              opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cr-site-arrow {
  font-size: 0.8rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.35s ease;
}

.cr-site-link:hover {
  border-color: rgba(0, 240, 255, 0.6);
  background: rgba(0, 240, 255, 0.08);
}

.cr-site-link:hover .cr-site-arrow {
  transform: translate(1px, -1px);
  color: #00f0ff;
}

/* Fades out when cards minimize to chips */
.crexian-section.viewing .cr-site-link {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

/* Viewing mode: cards minimize into compact name chips, staggered */
.crexian-section.viewing .crexian-card {
  padding: 1rem 1.25rem;
  gap: 0;
  opacity: 0.45;
  animation: none !important;
}

.crexian-section.viewing .crexian-card:nth-child(2) { transition-delay: 0.04s; }
.crexian-section.viewing .crexian-card:nth-child(3) { transition-delay: 0.08s; }
.crexian-section.viewing .crexian-card:nth-child(4) { transition-delay: 0.12s; }

.crexian-section.viewing .cr-bio {
  max-height: 0;
  opacity: 0;
}

.crexian-section.viewing .crexian-card:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

.crexian-section.viewing .crexian-card.active {
  opacity: 1;
  border-top-color: #00f0ff;
  box-shadow: 0 -10px 30px rgba(0, 240, 255, 0.15);
  background: rgba(10, 10, 12, 0.7);
}

.crexian-section.viewing .cr-name {
  font-size: 1.05rem;
}

.cr-name {
  font-size: 1.15rem;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  transition: font-size 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.cr-title {
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cr-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #eeeeee;
  font-weight: 300;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.playable-3d-box {
  width: 100%;
  height: 200px;
  margin-top: 1rem;
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.play-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
  z-index: 5;
}

.hiring-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-grid);
  border-radius: 6px;
  padding: 1.75rem 2rem;
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.6s ease;
}

.hiring-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hiring-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 200;
  margin-bottom: 0.5rem;
}

.hiring-box .btn-primary {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiring-box .btn-primary::after {
  content: '→';
  font-size: 0.85rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiring-box .btn-primary:hover {
  background: #ffffff;
  color: #070709;
  border-color: #ffffff;
  transform: translateY(-2px);
}

.hiring-box .btn-primary:hover::after {
  transform: translateX(4px);
}

/* ==========================================
   Partner Network Section
   ========================================== */
.network-section {
  background: transparent;
}

.network-group {
  border-top: 1px solid var(--border-grid);
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
}

.network-group:last-child {
  border-bottom: 1px solid var(--border-grid);
}

.network-group-title {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 400;
  padding-top: 0.25rem;
}

.network-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

.network-logos span {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.network-logos span:hover {
  color: var(--text-primary);
}

/* ==========================================
   Contact Section & Footer (Minimalist)
   ========================================== */
.contact-section {
  padding: 10rem 0 4rem 0;
  background: transparent;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 6rem;
  align-items: center;
  margin-bottom: 8rem;
}

/* ---- 3D alternating emblem (MATEO ↔ CREX) ---- */
.contact-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.emblem-stage {
  width: min(320px, 75%);
  aspect-ratio: 1 / 1;
  perspective: 1400px;
  animation: emblemFloat 7s ease-in-out infinite;
}

.emblem-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: emblemSpin 10s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.emblem-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.emblem-face img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 26px rgba(140, 210, 255, 0.14));
}

.emblem-face--crex {
  transform: rotateY(180deg);
}

.emblem-ground {
  width: 45%;
  height: 16px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, transparent 70%);
  filter: blur(5px);
  animation: emblemGround 7s ease-in-out infinite;
}

.emblem-captions {
  position: relative;
  width: 100%;
  height: 3.4rem;
  margin-top: 2rem;
  text-align: center;
}

.emblem-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0;
  animation-duration: 10s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.emblem-caption em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.emblem-caption--mateo { animation-name: captionMateo; }
.emblem-caption--crex  { animation-name: captionCrex; }

/* Spin holds each face, then turns — captions crossfade on the same 10s clock */
@keyframes emblemSpin {
  0%, 38%   { transform: rotateY(0deg); }
  50%, 88%  { transform: rotateY(180deg); }
  100%      { transform: rotateY(360deg); }
}

@keyframes captionMateo {
  0%, 36%       { opacity: 1; transform: translateY(0); }
  46%, 90%      { opacity: 0; transform: translateY(8px); }
  100%          { opacity: 1; transform: translateY(0); }
}

@keyframes captionCrex {
  0%, 40%       { opacity: 0; transform: translateY(8px); }
  52%, 86%      { opacity: 1; transform: translateY(0); }
  96%, 100%     { opacity: 0; transform: translateY(8px); }
}

@keyframes emblemFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@keyframes emblemGround {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(0.82); opacity: 0.55; }
}

.contact-main {
  display: flex;
  flex-direction: column;
}

.contact-title {
  font-size: 4rem;
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.contact-desc {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 200;
  margin-bottom: 3rem;
  max-width: 500px;
}

.contact-email {
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  width: fit-content;
  padding-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.contact-email:hover {
  border-color: var(--text-primary);
  opacity: 0.8;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem 6rem;
  margin-top: 4rem;
}

.link-group h5 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.link-group a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.85rem;
  font-weight: 200;
  transition: var(--transition-fast);
}

.link-group a:hover {
  color: var(--text-primary);
}

.loc-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 200;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 3rem;
  font-weight: 200;
  letter-spacing: 0.08em; /* Slightly wider letter-spacing for luxury feel */
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 2rem;
  transition: var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--text-secondary);
}

/* ==========================================
   Video Theater Modal (Absolute Overlay)
   ========================================== */
.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: 80vw;
  max-width: 1100px;
  background: #09090c;
  border: 1px solid var(--border-grid);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  transform: translateY(30px) scale(0.98);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-size: 2.2rem;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

#modal-player {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-meta {
  padding: 2.5rem 3rem;
  background: #09090c;
  border-top: 1px solid var(--border-grid);
}

#modal-title {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

#modal-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 200;
}

/* ==========================================
   Modern Animations (Scroll Driven)
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .editorial-grid, .press-row, .crew-card, .crexian-card, .network-group, .contact-grid {
      animation: reveal-fade auto linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 30%;
    }
  }
}

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

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
  .app-header {
    padding: 0 4rem;
  }
  .hero-section {
    padding: 0 6%;
  }
  .hero-title {
    font-size: 4.8rem;
  }
  .editorial-grid, .contact-grid, .network-group, .press-row {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .press-row {
    gap: 1rem;
    padding: 2rem 0;
  }
  .crew-founders-only {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
  .crexian-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
  .contact-grid {
    text-align: center;
  }
  .contact-main {
    align-items: center;
  }
  .contact-links {
    justify-content: center;
  }
  .modal-content {
    width: 90vw;
  }
  .typography-tweak-panel {
    right: 20px;
    top: 110px;
  }
}

@media (max-width: 1200px) {
  .app-header {
    padding: 1rem 1.5rem;
  }
  .nav-links a {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .logo-container {
    width: 120px;
  }
  .logo-front, .logo-back {
    font-size: 1.1rem;
  }
}

@media (max-width: 900px) {
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
  .crew-founders-only, .crexian-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .contact-email {
    font-size: 1.6rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
  .footer-legal a {
    margin-left: 0;
    margin-right: 2rem;
  }
  .modal-meta {
    padding: 1.5rem 2rem;
  }
  
  /* Fallback carousel view on mobile since 3D perspectives get squeezed */
  .carousel-3d-stage {
    perspective: none;
    height: auto;
  }
  .carousel-3d-cylinder {
    transform-style: flat;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .card-3d {
    position: relative;
    width: 100%;
    height: auto;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .business-scroll-container {
    height: auto;
  }
  .business-sticky-wrap {
    position: relative;
    height: auto;
    padding: 5rem 0;
  }
  /* Mobile stack view: every pillar's works row shows, labeled, horizontally scrollable */
  .carousel-3d-stage {
    transform: none;
  }
  .pillar-works-section {
    --mini-h: 130px;
  }
  .pillar-works-header {
    display: none;
  }
  .pillar-works-group {
    position: relative;
    padding-top: 1.7rem;
    margin-bottom: 1.5rem;
  }
  .pillar-works-group::before {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.62rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
}

/* ===== Detail player — oliverbernotat-style immersive view ===== */
.rv-detail {
  position: fixed;
  inset: 0;
  z-index: 300; /* above the floating site header (100) and tweak panel */
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.rv-detail[aria-hidden="false"] { opacity: 1; visibility: visible; }
.rv-detail__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.rv-detail__chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.45s var(--ease-out);
}
.rv-detail__chrome > * { pointer-events: auto; }
.rv-detail.is-idle .rv-detail__chrome { opacity: 0; }
.rv-detail__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 30px) clamp(18px, 3vw, 40px);
}
.rv-detail__brand, .rv-detail__back {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: #fff;
  transition: opacity 0.25s;
  background: none;
  border: none;
  padding: 0;
}

.rv-detail__back {
  cursor: pointer;
}
.rv-detail__back:hover { opacity: 0.6; }
/* centred minimal bottom (oliverbernotat): title, then a thin scrubber line with
   the time at its left, then centred text controls. */
.rv-detail__bottom {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 48px);
  transform: translateX(-50%);
  width: min(92%, 720px);
  text-align: center;
  color: #fff;
}
.rv-detail__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
}
.rv-detail__credit {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.66);
}
.rv-detail__bar {
  width: 100%;
  margin-top: 18px;
  height: 22px;                       /* tall transparent hit area — easy to grab */
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.rv-detail__bar-track {
  position: relative;
  width: 100%;
  height: 1px;                        /* hairline — no thick bar, no circle */
  background: rgba(255, 255, 255, 0.3);
}
.rv-detail__bar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: #fff;
  will-change: width;
}
.rv-detail__bar-time {                /* running time sits IN the line at the playhead */
  position: absolute;
  right: 0; top: 50%;
  transform: translate(50%, -50%);
  padding: 0 8px;
  background: #000;                   /* masks the line so the time breaks into it */
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}
.rv-detail__controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.rv-detail__btn {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #fff;
  transition: opacity 0.25s;
  background: none;   /* plain text controls — no UA button box */
  border: none;
  padding: 0;
  cursor: pointer;
}
.rv-detail__btn:hover { opacity: 0.6; }
.rv-detail__video { cursor: pointer; } /* tap video to play/pause */
