/* ========================================
   RESET & BASE
   ======================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #1e2148;
  --color-surface: #252a54;
  --color-border: #333860;
  --color-text: #e8e6e3;
  --color-text-muted: #8a8a8d;
  --color-text-subtle: #5a5a5d;
  --color-accent: #c4b5a0;
  --color-accent-dim: rgba(196, 181, 160, 0.1);
  --color-cursor-ring: rgba(196, 181, 160, 0.4);
  --color-accent-border: rgba(196, 181, 160, 0.15);
  --color-accent-hover: rgba(196, 181, 160, 0.15);
  --color-accent-border-strong: rgba(196, 181, 160, 0.3);
  --color-nav-blur: rgba(30, 33, 72, 0.85);
  --color-list-border: rgba(51, 56, 96, 0.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --showcase-media-max: min(96vw, 1680px);
  --showcase-media-gutter: clamp(var(--space-sm), 3vw, var(--space-xl));
}

[data-theme="light"] {
  --color-bg: #f8f6f1;
  --color-surface: #efece5;
  --color-border: #d8d4cb;
  --color-text: #1e1e2e;
  --color-text-muted: #5c5c6c;
  --color-text-subtle: #9494a4;
  --color-accent: #7a6a52;
  --color-accent-dim: rgba(122, 106, 82, 0.08);
  --color-cursor-ring: rgba(122, 106, 82, 0.35);
  --color-accent-border: rgba(122, 106, 82, 0.18);
  --color-accent-hover: rgba(122, 106, 82, 0.12);
  --color-accent-border-strong: rgba(122, 106, 82, 0.3);
  --color-nav-blur: rgba(248, 246, 241, 0.85);
  --color-list-border: rgba(216, 212, 203, 0.6);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

em {
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--color-accent);
}

strong {
  font-weight: 500;
  color: var(--color-text);
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ========================================
   CUSTOM CURSOR
   ======================================== */

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s var(--ease-out-expo);
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-cursor-ring);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.15s var(--ease-out-expo),
              width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo),
              border-color 0.3s ease;
}

.cursor-ring.hovering {
  width: 56px;
  height: 56px;
  border-color: var(--color-accent);
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
  body {
    cursor: auto;
  }
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: var(--color-nav-blur);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  transition: opacity 0.3s ease;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after {
  width: 100%;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ========================================
   HERO
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
}

.hero-content {
  max-width: 1650px;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-title .line {
  display: block;
}

.hero-description {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: scrollLine 2s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}

/* ========================================
   PHILOSOPHY
   ======================================== */

.philosophy {
  padding: var(--space-2xl) 0;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
}

.philosophy-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  position: sticky;
  top: 120px;
  align-self: start;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-accent);
  letter-spacing: 0;
  text-transform: none;
}

.philosophy-lead {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.philosophy-body {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  max-width: 600px;
}

.philosophy-qualities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.quality {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.2rem;
  background: var(--color-accent-dim);
  border: 1px solid var(--color-accent-border);
  border-radius: 4px;
  color: var(--color-accent);
  transition: transform 0.3s var(--ease-out-expo), background 0.3s ease;
}

.quality:hover {
  transform: translateY(-3px);
  background: var(--color-accent-hover);
}

.philosophy-coda {
  font-size: 1.2rem;
  font-weight: 400;
  margin-top: var(--space-md);
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ========================================
   PORTFOLIO
   ======================================== */

.portfolio {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
}

.portfolio--case-study {
  padding-top: 0;
  border-top: none;
}

.portfolio .section-header {
  margin-bottom: var(--space-lg);
}

/* Home — work teaser */
.work-teaser {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
}

.work-teaser .section-header {
  margin-bottom: var(--space-md);
}

.work-teaser-lede {
  max-width: 42ch;
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.05rem, 1.4vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.work-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(200px, 0.9fr);
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.4s ease, transform 0.45s var(--ease-out-expo), box-shadow 0.45s ease;
}

.work-feature:hover {
  border-color: var(--color-accent-border-strong);
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.work-feature-media {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.work-feature-media img {
  display: block;
  width: 100%;
  height: auto;
}

.work-feature-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-xs);
}

.work-feature-title {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.work-feature-desc {
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.work-feature-cta {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.work-feature:hover .work-feature-cta {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.work-feature-media--hmi {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background:
    linear-gradient(165deg, #3a4049 0%, #1a1d22 45%, #0e1014 100%);
  border-color: rgba(54, 124, 43, 0.25);
}

.work-feature-media--bella {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background:
    linear-gradient(165deg, #ffffff 0%, #f7f6f3 45%, #f0efec 100%);
  border-color: rgba(37, 99, 235, 0.18);
}

.work-feature-hmi-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.work-feature-bella-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(26, 25, 23, 0.45);
}

.work-teaser .work-feature + .work-feature {
  margin-top: var(--space-md);
}

.work-more {
  padding: var(--space-xl) var(--space-md) 0;
  border-top: 1px solid var(--color-border);
}

.work-more-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.work-feature--compact {
  margin-bottom: var(--space-lg);
}

/* Native cursor over live HMI embeds */
body.cursor-native .cursor-dot,
body.cursor-native .cursor-ring {
  opacity: 0;
}

.page-case-study .hmi-panel,
.page-case-study .demo-embed,
.page-case-study iframe {
  cursor: auto;
}

/* Work detail page */
.page-work {
  padding-top: 72px;
}

.work-page-header {
  padding: var(--space-lg) var(--space-md) var(--space-md);
}

.work-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color 0.3s ease;
}

.work-back svg {
  width: 18px;
  height: 18px;
}

.work-back:hover {
  color: var(--color-accent);
}

.work-page-title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: var(--space-xs) 0 var(--space-sm);
}

.work-page-lede {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 48ch;
}

.showcase-intro--case {
  padding-top: var(--space-md);
  padding-bottom: var(--space-sm);
}

.showcase-intro--case .showcase-product {
  display: none;
}

.showcase-intro--case .showcase-subhead {
  display: none;
}

.work-page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.work-back--footer {
  margin-bottom: 0;
}

.nav-link--active {
  color: var(--color-text);
}

.nav-link--active::after {
  width: 100%;
}

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

/* Product intro — Apple-style centered headline */
.showcase-intro {
  text-align: center;
  padding: var(--space-md) 0 var(--space-lg);
  max-width: 720px;
}

.showcase-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.showcase-product {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.showcase-subhead {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.showcase-lede {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* Cinematic hero — near full-bleed */
.showcase-hero {
  margin: 0 auto;
  padding: 0 var(--showcase-media-gutter);
  width: 100%;
  max-width: var(--showcase-media-max);
}

.showcase-frame {
  border-radius: 14px;
  overflow: hidden;
  background: #0c0e1a;
  border: 1px solid var(--color-border);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 48px 120px -24px rgba(0, 0, 0, 0.65);
  transform: scale(0.96);
  opacity: 0.55;
  transition:
    transform 1.1s var(--ease-out-expo),
    opacity 1s var(--ease-out-expo);
  will-change: transform, opacity;
}

.showcase-frame.in-view {
  transform: scale(1);
  opacity: 1;
}

.showcase-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.showcase-hero:not(.showcase-hero--angled) .showcase-frame {
  transform: scale(0.98);
}

.showcase-hero:not(.showcase-hero--angled) .showcase-frame.in-view {
  transform: scale(1);
}

/* Portfolio hero — angled perspective, ease-in on load */
.showcase-hero--angled {
  max-width: var(--showcase-media-max);
  overflow: visible;
  margin-bottom: var(--space-md);
}

.showcase-hero-stage {
  position: relative;
  width: 100%;
  padding: var(--space-sm) 0 var(--space-lg);
  perspective: clamp(900px, 120vw, 1600px);
  perspective-origin: 50% 55%;
  overflow: visible;
}

.showcase-hero-tilt {
  position: relative;
  transform-origin: 50% 50%;
  transform: rotateX(10deg) translateY(24px);
  opacity: 0;
  transition:
    transform 1.15s var(--ease-out-expo),
    opacity 0.9s var(--ease-out-expo);
  will-change: transform, opacity;
}

.showcase-hero-tilt.is-visible {
  transform: rotateX(var(--hero-tilt, 8deg)) translateY(0);
  opacity: 1;
}

.showcase-hero-tilt.is-visible.is-scroll-driven {
  transition:
    transform 0.12s linear,
    opacity 0.9s var(--ease-out-expo);
}

.showcase-hero--angled .showcase-frame {
  transform: none;
  opacity: 1;
  transition: none;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 72px 160px -24px rgba(0, 0, 0, 0.8);
}

/* Centered statement interstitial */
.showcase-statement {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.showcase-statement-text {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.showcase-statement-muted {
  color: var(--color-text-muted);
  font-weight: 300;
}

/* Feature chapters — copy + product shot (grid) */
.showcase-chapter {
  padding: var(--space-xl) 0;
}

.showcase-chapter .container.showcase-chapter-inner,
.showcase-chapter--spotlight > .container {
  max-width: var(--showcase-media-max);
  width: 100%;
  padding-left: var(--showcase-media-gutter);
  padding-right: var(--showcase-media-gutter);
}

.showcase-chapter-inner {
  display: grid;
  grid-template-columns: minmax(200px, 0.34fr) minmax(0, 1.66fr);
  gap: clamp(var(--space-md), 4vw, var(--space-xl));
  align-items: center;
}

.showcase-chapter--reverse .showcase-chapter-inner {
  grid-template-columns: minmax(0, 1.66fr) minmax(200px, 0.34fr);
}

.showcase-chapter--reverse .chapter-copy {
  order: 2;
}

.showcase-chapter--reverse .chapter-media {
  order: 1;
}

.chapter-copy {
  padding: var(--space-sm) 0;
}

.chapter-copy--center {
  text-align: center;
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  padding: 0;
}

.chapter-kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.chapter-title {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.chapter-desc {
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 36ch;
}

.chapter-copy--center .chapter-desc {
  max-width: 42ch;
  margin: 0 auto;
}

.chapter-media {
  margin: 0;
  width: 100%;
  align-self: stretch;
}

.chapter-media .showcase-frame {
  width: 100%;
}

/* Spotlight finale — dock */
.showcase-chapter--spotlight {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}

.chapter-media--spotlight {
  width: 100%;
}

.chapter-media--spotlight .showcase-frame {
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Specs footer — Apple fine-print row */
.showcase-footer {
  padding: var(--space-xl) 0 0;
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.showcase-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  padding: 0;
}

.showcase-spec {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.showcase-spec dt {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.showcase-spec dd {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .showcase-frame {
    transform: none;
    opacity: 1;
    transition: none;
  }

  .showcase-hero-tilt,
  .showcase-hero-tilt.is-visible {
    transform: none;
    opacity: 1;
    transition: none;
  }
}

.project-tag {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.project-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ========================================
   SERVICES
   ======================================== */

.services {
  padding: var(--space-2xl) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-lg);
  transition: border-color 0.4s ease, transform 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  border-color: var(--color-accent-border-strong);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.service-description {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.service-list li {
  font-size: 0.88rem;
  color: var(--color-text-subtle);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-list-border);
  transition: color 0.3s ease, padding-left 0.3s var(--ease-out-expo);
}

.service-card:hover .service-list li {
  color: var(--color-text-muted);
}

.service-list li:hover {
  color: var(--color-text);
  padding-left: 0.5rem;
}

.service-list li:last-child {
  border-bottom: none;
}

.service-note {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-accent);
  font-family: var(--font-mono);
}

/* ========================================
   PROCESS
   ======================================== */

.process {
  padding: var(--space-2xl) 0;
}

.process .section-header {
  margin-bottom: var(--space-lg);
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.4s ease;
  position: relative;
}

.process-step:first-child {
  border-top: none;
}

.process-step::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.6s var(--ease-out-expo);
}

.process-step:hover::after {
  width: 100%;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-text-subtle);
  line-height: 1;
  transition: color 0.4s ease;
}

.process-step:hover .step-number {
  color: var(--color-accent);
}

.step-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.step-description {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 560px;
}

/* ========================================
   APPROACH
   ======================================== */

.approach {
  padding: var(--space-2xl) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.approach-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.approach-quote p {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
}

.approach-quote p:first-child {
  color: var(--color-text);
}

.approach-statement {
  margin-top: var(--space-lg);
  font-size: 1.1rem;
  font-weight: 400;
}

/* ========================================
   CAPABILITIES
   ======================================== */

.capabilities {
  padding: var(--space-2xl) 0;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.capability-heading {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.capability-list li {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
  transition: color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.capability-list li:hover {
  color: var(--color-text);
  transform: translateX(4px);
}

/* ========================================
   CLIENTS
   ======================================== */

.clients {
  padding: var(--space-2xl) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.clients-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.clients-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.clients-description {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.clients-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
}

.value-tag {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  transition: all 0.3s var(--ease-out-expo);
}

.value-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  padding: var(--space-2xl) 0 var(--space-md);
}

.footer-content {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.footer-statement {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

.footer-coda {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.footer-cta {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border: 1px solid var(--color-accent);
  border-radius: 100px;
  color: var(--color-accent);
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-out-expo);
}

.footer-cta:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  transform: scale(1.02);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-subtle);
  letter-spacing: 0.02em;
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

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

/* Stagger children */
.services-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.process-steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.process-steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.process-steps .reveal:nth-child(4) { transition-delay: 0.24s; }

.capabilities-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.capabilities-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ========================================
   MAGNETIC ELEMENTS
   ======================================== */

.magnetic {
  transition: transform 0.3s var(--ease-out-expo);
}

/* ========================================
   THEME TOGGLE
   ======================================== */

.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  color: var(--color-text-muted);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.4s var(--ease-out-expo);
}

.theme-toggle:hover svg {
  transform: rotate(30deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme]) .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ========================================
   RESPONSIVE
   ======================================== */

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

  .philosophy-label {
    position: static;
    flex-direction: row;
    gap: var(--space-sm);
  }

  .showcase-chapter-inner,
  .showcase-chapter--reverse .showcase-chapter-inner {
    grid-template-columns: 1fr;
  }

  .showcase-chapter--reverse .chapter-copy,
  .showcase-chapter--reverse .chapter-media {
    order: unset;
  }

  .chapter-desc {
    max-width: none;
  }

  .showcase-specs {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .work-feature {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 5rem;
    --space-2xl: 7rem;
  }

  .nav-links {
    display: none;
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .process-step {
    grid-template-columns: 60px 1fr;
  }

  .step-number {
    font-size: 1.8rem;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .hero-scroll-indicator {
    display: none;
  }

}

@media (max-width: 480px) {
  .hero {
    padding: var(--space-lg) var(--space-sm);
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .service-card {
    padding: var(--space-md);
  }
}
