/* ========================================================================
   GRIN VISUALS — Design System
   Hand-crafted. Not templated.
   ======================================================================== */

/* --- Design Tokens --- */
:root {
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --nav-h: 72px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --col-bg: #08090A;
  --col-surface: #111214;
  --col-border: #1e1f22;
  --col-text: #e8e8e8;
  --col-muted: #666;
  --col-dim: #444;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
@supports (padding: env(safe-area-inset-left)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
img { max-width: 100%; height: auto; display: block; }
img[loading="lazy"] { content-visibility: auto; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; }

body {
  font-family: var(--font-body);
  background: var(--col-bg);
  color: var(--col-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: #fff; color: #000; }

/* --- Film Grain Overlay --- */
/* NOTE: Switched from SVG feTurbulence (very expensive) to a pre-baked
   base64 PNG noise tile. Removed mix-blend-mode (forces per-pixel
   compositing every frame) — opacity alone gives the same subtle look
   without killing GPU performance. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/png;base64,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");
  background-repeat: repeat;
  background-size: 128px 128px;
  /* Isolate layer to avoid compositing with every element below */
  isolation: isolate;
  contain: strict;
}

/* --- Lenis --- */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* --- Scrollbar --- */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* --- GPU Hints --- */
.hero-bg, .hero-bg-img, .modal, .modal-backdrop, .modal-content, #cursor,
.grid-item, .nav { transform: translateZ(0); backface-visibility: hidden; }

/* ========================================================================
   CURSOR
   ======================================================================== */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 16px; height: 16px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  /* Removed mix-blend-mode: difference — it forces per-pixel compositing
     every frame and is a major lag source. Using semi-transparent white
     instead for a similar visual effect with much better performance. */
  pointer-events: none;
  z-index: 9998;
  transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo),
              opacity 0.3s ease;
  will-change: transform;
  contain: layout style;
}
#cursor.cursor-grow {
  width: 48px; height: 48px;
}
#cursor.cursor-hide { opacity: 0; }

@media (max-width: 768px), (hover: none) { #cursor { display: none !important; } }

/* ========================================================================
   NAVIGATION
   ======================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 clamp(20px, 4vw, 48px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: transform 500ms var(--ease-out-expo), background 400ms ease;
}
.nav.is-scrolled {
  background: rgba(8,9,10,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav.is-hidden { transform: translateY(-110%); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
  transition: opacity 0.3s ease;
}
.nav-brand:hover { opacity: 0.7; }
.nav-brand span {
  opacity: 0.4;
  margin-left: 0.15em;
  transition: opacity 0.3s ease;
}
.nav-brand:hover span { opacity: 0.25; }

/* Desktop links */
.nav-links {
  display: none;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
@media (min-width: 769px) {
  .nav-links { display: flex; }
}
.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: rgba(255,255,255,0.85);
}
.nav-link.active {
  color: #fff;
}

/* Nav contact email (desktop only) */
.nav-contact {
  display: none;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease;
}
.nav-contact:hover { color: rgba(255,255,255,0.8); }
@media (min-width: 769px) {
  .nav-contact { display: block; }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #fff;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.25s ease;
  transform-origin: center;
}
.hamburger.is-active span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}
.hamburger.is-active span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* Mobile button */
.nav-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: #fff;
}
@media (min-width: 769px) { .nav-mobile-btn { display: none; } }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100vh; height: 100dvh;
  width: 100%;
  background: var(--col-bg);
  z-index: 200;
  padding: clamp(20px, 4vw, 48px);
  transform: translateX(100%);
  transition: transform 450ms var(--ease-out-expo);
  display: flex;
  flex-direction: column;
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-menu-close {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
  flex: 1;
}
.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: rgba(255,255,255,0.25);
  padding: 8px 0;
  transition: color 0.3s ease;
}
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
}

.mobile-menu-footer {
  display: flex;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu-footer a {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease;
}
.mobile-menu-footer a:hover { color: #fff; }

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.mobile-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================================================
   HERO
   ======================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
/* Show still image on mobile, hide video */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  display: none;
}
@media (max-width: 768px) {
  .hero-bg { display: none; }
  .hero-bg-img { display: block; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(8,9,10,0.3) 0%, rgba(8,9,10,0.1) 40%, rgba(8,9,10,0.6) 85%, var(--col-bg) 100%),
    rgba(0,0,0,0.35);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(24px, 6vw, 80px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 24px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero-line {
  font-family: var(--font-display);
  font-size: clamp(56px, 12vw, 160px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: #fff;
}
.hero-line--indent {
  margin-left: clamp(40px, 8vw, 120px);
  color: rgba(255,255,255,0.6);
}

.hero-rule {
  width: clamp(60px, 12vw, 160px);
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: clamp(20px, 3vw, 40px) 0;
  transform-origin: left;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.hero-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 0 clamp(24px, 6vw, 80px) clamp(24px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-info span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.hero-scroll {
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease, transform 0.3s var(--ease-out-expo);
  cursor: pointer;
}
.hero-scroll:hover {
  color: rgba(255,255,255,0.7);
  transform: translateY(4px);
}

/* ========================================================================
   MARQUEE
   ======================================================================== */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: clamp(14px, 2vw, 20px) 0;
  background: var(--col-bg);
  position: relative;
  z-index: 3;
}
.marquee-track {
  display: inline-flex;
  gap: 0;
  animation: marquee-scroll 30s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.15);
  padding: 0 clamp(12px, 2vw, 24px);
  flex-shrink: 0;
}
.marquee-sep {
  color: rgba(255,255,255,0.06) !important;
  font-weight: 300 !important;
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ========================================================================
   SECTIONS
   ======================================================================== */
.section {
  padding: clamp(48px, 8vw, 100px) clamp(20px, 4vw, 48px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}
.section + .section { padding-top: 0; }
.section--tight { padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 48px); }
.section--tight + .section--tight { padding-top: clamp(24px, 3vw, 40px); }

#work, #about { scroll-margin-top: calc(var(--nav-h) + 24px); }

.section-header {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 32px);
  margin-bottom: clamp(32px, 5vw, 56px);
  flex-wrap: wrap;
}

.section-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
  padding-top: 6px;
  min-width: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.section-sub {
  font-size: 14px;
  color: var(--col-muted);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 20px;
  border-radius: 999px;
  transition: all 0.35s var(--ease-out-expo);
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}
.section-link:hover {
  color: #000;
  background: #fff;
  border-color: #fff;
}
.section-link i, .section-link svg { width: 14px; height: 14px; }

/* ========================================================================
   SERVICES GRID
   ======================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  padding: clamp(24px, 3vw, 40px);
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.5s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.03), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  background: rgba(255,255,255,0.025);
  border-color: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}

.service-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 20px;
}

.service-card-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
}

.service-card-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
}

/* ========================================================================
   WORK GRID
   ======================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
@media (max-width: 1024px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } }

/* Featured sizing: first item spans 2 cols with 16:9 ratio */
.work-grid .grid-item:first-child {
  grid-column: span 2;
}
@media (max-width: 1024px) {
  .work-grid .grid-item:first-child { grid-column: span 2; }
}
@media (max-width: 640px) {
  .work-grid .grid-item:first-child { grid-column: span 1; }
}

/* ========================================================================
   GRID ITEMS
   ======================================================================== */
.grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--col-surface);
  cursor: pointer;
}
.grid-item:first-child { aspect-ratio: 16/9; }
@media (max-width: 640px) { .grid-item:first-child { aspect-ratio: 4/3; } }

.grid-item img, .grid-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo), filter 0.7s ease;
  content-visibility: auto;
}

@media (hover: hover) {
  .grid-item { cursor: none; }
  .grid-item:hover img,
  .grid-item:hover video { transform: scale(1.05); filter: brightness(1.05); }
}

/* Info overlay */
.grid-item-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (hover: hover) {
  .grid-item:hover .grid-item-info { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
  .grid-item-info {
    opacity: 1;
    transform: none;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  }
}

.grid-item-info .cat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.grid-item-info h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
}
.grid-item-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Video play icon */
.grid-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.grid-play-icon > div {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease-out-expo), background 0.4s ease;
}
@media (hover: hover) {
  .grid-item:hover .grid-play-icon > div {
    transform: scale(1.1);
    background: rgba(0,0,0,0.55);
  }
}
.grid-play-icon i, .grid-play-icon svg { width: 20px; height: 20px; color: #fff; }

/* Card transitions for filtering */
.grid-item {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: opacity 280ms var(--ease-out-quint), transform 280ms var(--ease-out-quint);
}
.grid-item.card-fade-out { opacity: 0; transform: scale(0.97) translateY(6px); }
.grid-item.card-fade-in { opacity: 1; transform: scale(1) translateY(0); }

/* ========================================================================
   FILTERS
   ======================================================================== */
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
  background: transparent;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}
.filter-btn:hover {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.15);
}
.filter-btn.active {
  color: #000;
  background: #fff;
  border-color: #fff;
}

/* ========================================================================
   MODAL
   ======================================================================== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.active { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out-quint);
  backdrop-filter: blur(12px);
}
.modal.active .modal-backdrop { opacity: 1; }

.modal-content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 92vh;
  padding: 18px;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.4s var(--ease-out-quint), opacity 0.4s ease;
}
.modal.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-media {
  opacity: 0;
  transform: scale(0.98);
}
.modal.media-visible .modal-media {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s var(--ease-out-quint), transform 0.4s var(--ease-out-quint);
}

.modal-media img,
.modal-media video {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.modal-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.02em;
}

/* Modal close button */
.modal-close-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.modal-close-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.1);
}
@media (max-width: 768px) {
  .modal-close-btn {
    top: -14px;
    right: -4px;
  }
}

/* ========================================================================
   CTA BLOCK
   ======================================================================== */
.cta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.015);
  transition: border-color 0.5s ease, background 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.025), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.cta-block:hover::before { opacity: 1; }
.cta-block:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.025);
}

@media (max-width: 768px) {
  .cta-block { flex-direction: column; text-align: center; }
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.cta-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 8px;
  display: block;
}
.cta-text {
  font-size: 15px;
  color: var(--col-muted);
  margin-top: 8px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
@media (max-width: 768px) { .cta-actions { flex-direction: column; width: 100%; } }

/* Legacy gv-shop-bottom alias */
.gv-shop-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.015);
  transition: border-color 0.4s ease;
}
.gv-shop-bottom:hover { border-color: rgba(255,255,255,0.1); }
@media (max-width: 768px) {
  .gv-shop-bottom { flex-direction: column; text-align: center; }
}

/* ========================================================================
   BUTTONS
   ======================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.35s var(--ease-out-expo);
  cursor: pointer;
  white-space: nowrap;
}
.btn i, .btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.btn-primary:hover {
  background: transparent;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.12);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* Legacy gv-shop-bottom buttons */
.gv-shop-bottom-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.gv-shop-bottom-icon { flex-shrink: 0; }
.gv-shop-bottom-content { flex: 1; min-width: 200px; }
.gv-shop-bottom-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.gv-shop-bottom-text {
  font-size: 14px;
  color: var(--col-muted);
  margin-top: 6px;
  line-height: 1.5;
}
.gv-shop-bottom-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .gv-shop-bottom-inner { flex-direction: column; text-align: center; }
  .gv-shop-bottom-actions { width: 100%; flex-direction: column; }
}
.gv-shop-bottom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 999px;
  transition: all 0.35s var(--ease-out-expo);
  cursor: pointer;
  white-space: nowrap;
}
.gv-shop-bottom-btn i, .gv-shop-bottom-btn svg { width: 16px; height: 16px; }
.gv-shop-bottom-btn-primary {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}
.gv-shop-bottom-btn-primary:hover { background: transparent; color: #fff; }
.gv-shop-bottom-btn-secondary {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.12);
}
.gv-shop-bottom-btn-secondary:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* ========================================================================
   FOOTER
   ======================================================================== */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 4vw, 48px) clamp(24px, 4vw, 40px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  user-select: none;
  margin-bottom: clamp(24px, 4vw, 40px);
  transition: color 0.6s var(--ease-out-expo), letter-spacing 0.6s var(--ease-out-expo);
  overflow: hidden;
}
.footer:hover .footer-brand {
  color: rgba(255,255,255,0.08);
  letter-spacing: -0.02em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}
.footer-links a {
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease;
}
.footer-links a:hover { color: #fff; }

.footer-credit {
  color: rgba(255,255,255,0.2);
}

/* powered by legacy */
.powered-by {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}
.powered-by a {
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.powered-by a:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ========================================================================
   ABOUT PAGE — STUDIO LAYOUT
   ======================================================================== */

/* Intro */
.studio-intro {
  padding-bottom: clamp(8px, 1.5vw, 16px);
}

/* Lead intro */
.studio-lead {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.45);
  max-width: 620px;
  margin-bottom: clamp(20px, 2.5vw, 28px);
}
.studio-lead strong {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.studio-lead--sub {
  font-size: clamp(14px, 1.6vw, 18px);
  color: rgba(255,255,255,0.35);
  margin-bottom: clamp(32px, 4vw, 48px);
}

/* Fact row */
.studio-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.studio-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  background: var(--col-bg);
}
.studio-fact-val {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.studio-fact-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}
.studio-fact-avail {
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .studio-facts { grid-template-columns: repeat(2, 1fr); }
}

/* Section title (shared) */
.studio-section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: clamp(20px, 3vw, 32px);
}

/* Services + Process split */
.studio-work-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 64px);
}
@media (min-width: 960px) {
  .studio-work-split {
    grid-template-columns: 1fr 300px;
    gap: 48px;
  }
}

.studio-work-main { min-width: 0; }
.studio-work-aside { min-width: 0; }

/* Services grid */
.services-grid--about {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .services-grid--about { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .services-grid--about { grid-template-columns: 1fr; }
}

/* Process steps (sidebar) */
.studio-steps {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.studio-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.studio-step-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.18);
  flex-shrink: 0;
  padding-top: 2px;
}
.studio-step h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  margin-bottom: 4px;
}
.studio-step p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
}

/* ========================================================================
   FAQ — 2-COLUMN
   ======================================================================== */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 clamp(32px, 4vw, 48px);
  margin-bottom: clamp(32px, 4vw, 48px);
}
@media (min-width: 768px) {
  .faq-grid { grid-template-columns: 1fr 1fr; }
}

.faq-col {
  border-top: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 767px) {
  .faq-col:not(:first-child) { border-top: none; }
}

.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.faq-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  text-align: left;
  cursor: pointer;
}
.faq-trigger span {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: color 0.3s ease;
}
.faq-trigger svg {
  flex-shrink: 0;
  color: rgba(255,255,255,0.25);
  transition: transform 0.4s var(--ease-out-quint), color 0.3s ease;
}
.faq-item:hover .faq-trigger span { color: #fff; }
.faq-item:hover .faq-trigger svg { color: rgba(255,255,255,0.5); }

.faq-item.is-open .faq-trigger span { color: #fff; }
.faq-item.is-open .faq-trigger svg {
  transform: rotate(45deg);
  color: rgba(255,255,255,0.6);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out-quint);
}
.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}
.faq-answer p {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
  padding: 0 0 16px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.faq-item.is-open .faq-answer p {
  opacity: 1;
  transform: translateY(0);
}

/* Contact strip */
.contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
}
.contact-strip p {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 500;
  color: rgba(255,255,255,0.8);
}
.contact-strip-links {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .contact-strip { flex-direction: column; text-align: center; }
  .contact-strip-links { width: 100%; flex-direction: column; }
}

/* ---- Inline links ---- */
.inline-link {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.25);
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}
.inline-link:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.6);
}

/* ---- Branches / Grin Media Collective ---- */
.branches {
  margin-top: clamp(32px, 4vw, 48px);
}
.branches-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}
.branches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.branch-card {
  position: relative;
  padding: clamp(20px, 2.5vw, 28px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.015);
  transition: border-color 0.35s ease, background 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.branch-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}
.branch-card--active {
  border-color: rgba(255,255,255,0.12);
}
.branch-card--link {
  cursor: pointer;
}
.branch-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
}
.branch-icon svg {
  width: 18px;
  height: 18px;
}
.branch-name {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin: 0;
}
.branch-desc {
  font-size: clamp(12px, 1.2vw, 13px);
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  margin: 0;
}
.branch-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-top: auto;
  padding-top: 8px;
}
.branch-card--active .branch-tag {
  color: rgba(255,255,255,0.5);
}
.branch-card--link .branch-tag {
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.branch-card--link:hover .branch-tag {
  color: rgba(255,255,255,0.7);
}
.branches-footer {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  margin-top: 12px;
  text-align: center;
}
@media (max-width: 768px) {
  .branches-grid { grid-template-columns: 1fr; }
}

/* ========================================================================
   TEXT REVEAL (for GSAP)
   ======================================================================== */
.gv-text-reveal { display: inline-block; overflow: hidden; vertical-align: bottom; }
.gv-text-reveal-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  will-change: transform, opacity;
}
@media (hover: none), (pointer: coarse) {
  .gv-text-reveal-inner { transform: none !important; opacity: 1 !important; }
}

/* ========================================================================
   AI CHAT (hidden but functional)
   ======================================================================== */
#ai-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#ai-panel {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s var(--ease-out-expo);
}

/* ========================================================================
   WORK PAGE HERO (sub-page variant)
   ======================================================================== */
.hero--sub {
  min-height: 40vh;
}
@media (min-width: 769px) { .hero--sub { min-height: 50vh; } }

.hero-content--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding-top: 20px;
}
.hero-content--center .hero-rule {
  margin-left: auto;
  margin-right: auto;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 768px) {
  .hero-footer { flex-direction: column; gap: 16px; align-items: flex-start; }
  .hero-line { font-size: clamp(42px, 14vw, 72px); }
  .hero-line--indent { margin-left: clamp(24px, 8vw, 48px); }
  .section-header { flex-direction: column; }
  .section-link { margin-left: 0; }
}

@media (hover: none) and (pointer: coarse) {
  .grid-item img { transition: none !important; transform: none !important; }
  .grid-item-info { transition: none !important; }
  .nav-link, .btn { transition-duration: 0.15s !important; }
}

/* ========================================================================
   REDUCED MOTION
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
  .gv-text-reveal-inner { transform: none !important; opacity: 1 !important; }
  .marquee-track { animation: none !important; }
}

/* ========================================================================
   LEGACY COMPAT
   ======================================================================== */
.sidebar, .side-nav, .left-nav, .dock, .gv-side, .gv-sidebar { display: none !important; }
.gv-hidden-filters { display: none !important; }
.gv-anim-card, .gv-anim-block { will-change: auto; }

.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  pointer-events: none;
}
@media (max-width: 768px) { .hero-video { display: none; } }

.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(8,9,10,0.3) 0%, rgba(8,9,10,0.1) 40%, rgba(8,9,10,0.6) 85%, var(--col-bg) 100%),
    rgba(0,0,0,0.35);
}

/* Page-specific hero sizing */
[data-page="work"] header,
[data-page="about"] header,
[data-page="contact"] header { min-height: 40vh; }

/* ========================================================================
   CONTACT PAGE
   ======================================================================== */
.contact-section {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(64px, 8vw, 120px);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: clamp(40px, 5vw, 56px);
  }
}

/* ---- Info Column ---- */
.contact-info-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.contact-info-text {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  margin-bottom: clamp(32px, 4vw, 48px);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: padding-left 0.35s var(--ease-out-expo), background 0.35s ease;
  border-radius: 8px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}
.contact-detail:first-child {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.contact-detail:hover {
  padding-left: 20px;
  background: rgba(255,255,255,0.02);
}

.contact-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease-out-expo);
}
.contact-detail:hover .contact-detail-icon {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  transform: scale(1.08);
}
.contact-detail-icon i,
.contact-detail-icon svg {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s ease;
}
.contact-detail:hover .contact-detail-icon i,
.contact-detail:hover .contact-detail-icon svg {
  color: rgba(255,255,255,0.8);
}

.contact-detail-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 2px;
}

.contact-detail-value {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
a.contact-detail-value:hover {
  color: #fff;
}

/* Availability dot */
.contact-detail-value .studio-dot {
  width: 7px;
  height: 7px;
}

/* ---- Form Column ---- */
.contact-form-wrap {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  transition: border-color 0.4s ease;
}
.contact-form-wrap:focus-within {
  border-color: rgba(255,255,255,0.1);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Side-by-side rows on desktop */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s ease;
}
.form-group:focus-within .form-label {
  color: rgba(255,255,255,0.7);
}
.form-label-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255,255,255,0.2);
  font-size: 11px;
}

/* Label + char count row */
.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.form-char-count {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  transition: color 0.3s ease;
  font-variant-numeric: tabular-nums;
}
.form-char-count.is-near { color: rgba(255,180,50,0.6); }
.form-char-count.is-over { color: rgba(255,80,80,0.7); }

.form-input {
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  width: 100%;
}
.form-input::placeholder {
  color: rgba(255,255,255,0.2);
  transition: color 0.3s ease;
}
.form-input:hover {
  border-color: rgba(255,255,255,0.15);
}
.form-input:focus {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.form-input:focus::placeholder {
  color: rgba(255,255,255,0.12);
}

/* Validation states */
.form-group.has-error .form-input {
  border-color: rgba(255,80,80,0.5);
  background: rgba(255,40,40,0.04);
}
.form-group.has-error .form-input:focus {
  box-shadow: 0 0 0 3px rgba(255,80,80,0.08);
}
.form-group.has-valid .form-input {
  border-color: rgba(80,255,120,0.25);
}
.form-group.has-error .form-label {
  color: rgba(255,120,100,0.7);
}

.form-error {
  font-size: 12px;
  color: rgba(255,100,80,0.8);
  min-height: 0;
  overflow: hidden;
  transition: min-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  line-height: 1.4;
}
.form-group.has-error .form-error {
  min-height: 18px;
  opacity: 1;
}

.form-hint {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.35);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s var(--ease-out-expo), opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}
.form-hint.is-visible {
  max-height: 60px;
  opacity: 1;
  margin-top: 4px;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}
.form-select option {
  background: var(--col-surface);
  color: #fff;
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* Form footer */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.form-disclaimer {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.01em;
}

/* Submit button */
.btn-submit {
  min-width: 180px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.btn-submit .btn-loader,
.btn-submit .btn-check {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo);
}
.btn-submit .btn-loader svg {
  animation: spin 1s linear infinite;
}

.btn-submit.is-sending .btn-text,
.btn-submit.is-sending [data-lucide] { opacity: 0; }
.btn-submit.is-sending .btn-loader { opacity: 1; transform: scale(1); }

.btn-submit.is-sent .btn-text { opacity: 0; }
.btn-submit.is-sent [data-lucide] { opacity: 0; }
.btn-submit.is-sent .btn-check { opacity: 1; transform: scale(1); }
.btn-submit.is-sent {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  pointer-events: none;
}
.btn-submit.is-sending {
  pointer-events: none;
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .btn-submit { width: 100%; }
  .form-footer { flex-direction: column; align-items: stretch; text-align: center; }
  .form-disclaimer { order: 1; }
}

/* ---- Success State ---- */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(40px, 5vw, 64px) 20px;
  gap: 16px;
}
.form-success.is-visible {
  display: flex;
  animation: successFadeIn 0.5s var(--ease-out-expo) both;
}

.form-success-icon {
  color: #22c55e;
  margin-bottom: 8px;
  animation: successPop 0.6s var(--ease-spring) 0.15s both;
}

.form-success-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.form-success-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
  max-width: 360px;
}

@keyframes successFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes successPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ========================================================================
   MOBILE OPTIMIZATIONS
   ======================================================================== */

/* Increase hero-info text for readability on mobile */
@media (max-width: 768px) {
  .hero-info span {
    font-size: 12px;
  }

  /* Make hero-scroll button meet 44px touch target minimum */
  .hero-scroll {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Reduce heavy animations on mobile for performance */
  .grain {
    opacity: 0.015;
  }

  /* Stack section headers vertically */
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  /* Better modal sizing on mobile */
  .modal-content {
    max-width: 96vw;
    padding: 12px;
  }
  .modal-media img,
  .modal-media video {
    max-width: 96vw;
    max-height: 78vh;
  }

  /* Footer compact on mobile */
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .hero-line {
    font-size: clamp(36px, 11vw, 56px) !important;
  }

  .hero-content {
    padding: 0 16px;
  }

  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .grid-item-info h3 {
    font-size: 14px;
  }
  .grid-item-info p {
    font-size: 12px;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none !important; }
  .grain { display: none; }
}
