/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --white: #ffffff;
  --off-white: #f7f7f7;
  --black: #0a0a0a;
  --gray-900: #171717;
  --gray-700: #454545;
  --gray-600: #565656;
  --gray-400: #a3a3a3;
  --gray-300: #d4d4d4;
  --gray-150: #e8e8e8;
  --gray-100: #f0f0f0;
  --border: rgba(10, 10, 10, 0.14);
  --border-dark: rgba(255, 255, 255, 0.18);

  /* semantic — flipped inside .section-dark */
  --bg: var(--white);
  --fg: var(--black);
  --fg-muted: var(--gray-600);
  --line: var(--border);
  --accent: var(--fg);

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "VT323", "Courier New", monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius: 0px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  text-wrap: balance; line-height: 1.02; letter-spacing: -0.015em;
  font-family: var(--sans); font-weight: 500;
}
ul { list-style: none; padding: 0; }
::selection { background: var(--black); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
::view-transition-old(root) { animation-name: fadeOutUp; }
::view-transition-new(root) { animation-name: fadeInUp; }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: 0.6rem 1rem; background: var(--black); color: var(--white);
  z-index: 9999; font-weight: 500;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 1.05rem; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted);
}
.kicker::before {
  content: ""; width: 1.5rem; height: 1px; background: var(--fg-muted);
}

.section-dark {
  --bg: var(--black);
  --fg: var(--white);
  --fg-muted: var(--gray-400);
  --line: var(--border-dark);
  background: var(--bg);
  color: var(--fg);
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow { font-family: var(--mono); font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }
.display-1 { font-size: clamp(2.6rem, 6.2vw, 6.4rem); line-height: 0.98; letter-spacing: -0.025em; font-weight: 500; }
.display-2 { font-size: clamp(2rem, 4.2vw, 3.8rem); line-height: 1.02; font-weight: 500; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--fg-muted); max-width: 46ch; font-weight: 400; }
.pull-quote {
  font-family: var(--sans); font-style: normal; font-weight: 300;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem); line-height: 1.25; letter-spacing: -0.01em;
  max-width: 32ch; position: relative; padding-left: 1.5rem; border-left: 1px solid var(--fg);
}
.body-text { max-width: 62ch; color: var(--fg-muted); font-size: 1.05rem; line-height: 1.75; font-weight: 400; }
.body-text + .body-text { margin-top: 1.25rem; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.8rem; font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.02em; border-radius: var(--radius);
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  cursor: pointer;
}
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--gray-700); transform: translateY(-2px); }
.section-dark .btn-primary { background: var(--white); color: var(--black); }
.section-dark .btn-primary:hover { background: var(--gray-300); }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); transform: translateY(-2px); }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.82rem; }

.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 8px 24px rgba(10, 10, 10, 0.06); }
@supports not (backdrop-filter: blur(1px)) {
  .nav { background: var(--white); }
}
.nav-inner {
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; font-size: 1.05rem; white-space: nowrap; }
.nav-brand img { width: 38px; height: 38px; flex-shrink: 0; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-link { font-size: 0.9rem; font-weight: 400; position: relative; padding-block: 0.3rem; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--black);
  transition: right 0.3s var(--ease-out);
}
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.nav-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; align-items: center; flex-shrink: 0;
}
.nav-burger span { width: 18px; height: 1.5px; background: var(--black); transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out); }
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 76px 0 0 0; background: var(--white); z-index: 99;
  display: flex; flex-direction: column; padding: var(--space-4) var(--gutter);
  gap: var(--space-2); transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.nav-mobile.is-open { opacity: 1; transform: none; pointer-events: auto; }
.nav-mobile-link { font-size: 1.5rem; font-weight: 400; padding-block: 0.4rem; border-bottom: 1px solid var(--border); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-3); transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.card:hover { border-color: var(--fg); transform: translateY(-4px); }

.stat {
  display: flex; flex-direction: column; gap: 0.3rem;
}
.stat-value {
  font-family: var(--mono); font-size: clamp(2.8rem, 5.6vw, 4.6rem); line-height: 1; color: var(--fg);
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.stat-label { font-size: 0.85rem; color: var(--fg-muted); max-width: 22ch; }

.tag {
  display: inline-block; font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border: 1px solid var(--line); color: var(--fg-muted);
}

.field {
  display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--space-3);
}
.field label { font-size: 0.85rem; font-weight: 500; }
.field input, .field textarea {
  font: inherit; padding: 0.85rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: transparent; color: var(--fg);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--fg); }
.field .hint { font-size: 0.8rem; color: var(--fg-muted); }

/* =============================================================
   6. Sections
   ============================================================= */
.hero-title { margin-block: var(--space-3) var(--space-3); }
.accent { font-family: var(--mono); font-style: normal; font-weight: 400; letter-spacing: 0.01em; }
.hero-title .accent { font-size: 1.24em; }

.hero-scroll { position: relative; height: 250vh; height: 250svh; }
.hero-scroll-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; display: flex; align-items: center;
}
.hero-scroll-bg {
  position: absolute; inset: 0;
  background-position: center; background-repeat: no-repeat; background-size: cover;
  clip-path: none;
}
.hero-scroll-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.hero-scroll-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(190deg, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.4) 45%, rgba(10,10,10,0.75) 100%);
}
.hero-scroll-content { position: relative; z-index: 2; color: var(--white); padding-block: var(--space-5); }
.hero-scroll-content .kicker { color: rgba(255,255,255,0.78); }
.hero-scroll-content .kicker::before { background: rgba(255,255,255,0.78); }
.hero-scroll-content .hero-title { color: var(--white); max-width: 20ch; }
.hero-scroll-content .lede { color: rgba(255,255,255,0.82); max-width: 46ch; margin-top: var(--space-3); }
.hero-scroll-content .btn-ghost { border-color: rgba(255,255,255,0.5); color: var(--white); }
.hero-scroll-content .btn-ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3); margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.section { padding-block: var(--space-6); }
.section-head { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }

.services-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.service-item { background: var(--bg); padding: var(--space-4); display: flex; flex-direction: column; gap: 0.75rem; }
.service-index { font-family: var(--mono); font-size: 1.4rem; color: var(--fg-muted); }
.service-name { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 500; }
.service-summary { color: var(--fg-muted); font-weight: 400; }
.service-detail { color: var(--fg-muted); font-size: 0.92rem; line-height: 1.7; font-weight: 400; }

.case-spread { display: grid; gap: var(--space-4); }
.case-media {
  aspect-ratio: 4 / 5; border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255,255,255,0.10), transparent 55%),
    linear-gradient(155deg, #050505 0%, #3a3a3a 55%, #b8b8b8 145%);
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
}
.case-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.case-media::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.75) 100%);
  pointer-events: none;
}
.case-media-label { position: relative; z-index: 1; color: var(--white); font-size: 1.3rem; font-weight: 500; padding: var(--space-3); }
.case-stats { display: flex; gap: var(--space-4); margin-top: var(--space-4); flex-wrap: wrap; }


.about-lede { margin-top: var(--space-2); }
.about-copy { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-5); max-width: 68ch; }

.about-grid { display: grid; gap: var(--space-5); }
.about-float-media { order: -1; }
.about-float-media img {
  width: 100%; border-radius: 10px;
  filter: drop-shadow(0 18px 34px rgba(10, 10, 10, 0.22));
  animation: mentorFloat 6.5s ease-in-out infinite;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
  .about-float-media { order: 0; margin-top: var(--space-6); }
}

.cta-banner {
  padding-block: var(--space-6); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
}
.cta-banner .display-2 { max-width: 20ch; }
.cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: var(--space-2); }

.contact-grid { display: grid; gap: var(--space-5); }
.contact-links { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.contact-link {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: var(--space-2); border-bottom: 1px solid var(--border);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem); font-weight: 400;
}
.contact-link .arrow { transition: transform 0.3s var(--ease-out); color: var(--fg); }
.contact-link:hover .arrow { transform: translateX(6px); }

.footer { padding-block: var(--space-5) var(--space-4); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; font-weight: 500; }
.footer-brand img { width: 40px; height: 40px; }
.footer-nav { display: flex; gap: 2rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; color: var(--fg-muted); }
.footer-nav a:hover { color: var(--fg); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: var(--space-3); font-size: 0.8rem; color: var(--fg-muted); }

.page-hero { padding-block: var(--space-5) var(--space-4); border-bottom: 1px solid var(--border); }

/* =============================================================
   7. Effects
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9998; background: var(--black);
  display: flex; align-items: center; justify-content: center;
  animation: splashSafety 0.01s 4.2s forwards;
}
.splash-inner img { width: 52px; height: 52px; opacity: 0.92; }
.splash.is-out { opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease-out); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }

[data-tilt] { transition: transform 0.4s var(--ease-out); }

.marquee { overflow: hidden; border-block: 1px solid var(--border); padding-block: var(--space-2); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 26s linear infinite; }
.marquee-track span { font-family: var(--mono); font-size: 1.3rem; color: var(--fg-muted); white-space: nowrap; letter-spacing: 0.03em; text-transform: uppercase; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.carousel3d-scene {
  height: 300px; display: flex; align-items: center; justify-content: center;
  perspective: 1300px; margin-top: var(--space-4);
}
.carousel3d-track {
  position: relative; width: 200px; height: 250px; transform-style: preserve-3d;
  cursor: grab; touch-action: pan-y;
}
.carousel3d-track:active { cursor: grabbing; }
.carousel3d-card {
  position: absolute; inset: 0; border: 1px solid var(--border);
  display: flex; align-items: flex-end; overflow: hidden;
  background: linear-gradient(160deg, #0a0a0a 0%, #4d4d4d 60%, #cfcfcf 150%);
  backface-visibility: hidden;
}
.carousel3d-card img, .carousel3d-card video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.carousel3d-card::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.75) 100%);
  pointer-events: none;
}
.carousel3d-card-label {
  position: relative; z-index: 1; padding: var(--space-2);
  color: var(--white); font-family: var(--mono); font-size: 1.05rem;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.carousel3d-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: var(--space-3); }
.carousel3d-btn {
  width: 44px; height: 44px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s var(--ease-out);
}
.carousel3d-btn:hover { border-color: var(--fg); }
.carousel3d-hint { font-size: 0.8rem; color: var(--fg-muted); }

/* =============================================================
   8. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .case-stats { flex-wrap: nowrap; }
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .case-spread { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .carousel3d-scene { height: 380px; }
  .carousel3d-track { width: 260px; height: 320px; }
}

@media (min-width: 960px) {
  .footer-top { align-items: center; }
}

@media (min-width: 1280px) {
  .display-1 { max-width: 20ch; }
}

.mentors-float {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--space-4); margin-top: var(--space-5); padding-block: var(--space-4);
}
.mentor-circle {
  width: 130px; height: 130px; flex-shrink: 0;
  animation: mentorFloat 5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
.mentor-circle img {
  width: 100%; height: 100%; object-fit: cover;
  filter: drop-shadow(0 10px 24px rgba(10, 10, 10, 0.3));
}
@keyframes mentorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (min-width: 720px) {
  .mentor-circle { width: 170px; height: 170px; }
}

/* =============================================================
   9. Reduced motion — only INTRUSIVE effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .splash { display: none; }
  .mentor-circle { animation: none; }
  .about-float-media img { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  /* Do NOT disable: reveal fades, hover states, tilts, count-ups */
}
