/* ============================================================
   KORINNA GLADHILL — Portfolio 2026
   Neo-Swiss Editorial CSS
   ============================================================ */

/* ============================================================
   0a. REGISTERED CUSTOM PROPERTIES (enables CSS variable transitions)
   ============================================================ */
@property --bg {
  syntax: '<color>';
  inherits: true;
  initial-value: #F5F4F0;
}

@property --fg {
  syntax: '<color>';
  inherits: true;
  initial-value: #0A0A0A;
}

@property --fg-muted {
  syntax: '<color>';
  inherits: true;
  initial-value: #5A5A54;
}

@property --surface {
  syntax: '<color>';
  inherits: true;
  initial-value: #E8E7E3;
}

@property --surface-dark {
  syntax: '<color>';
  inherits: true;
  initial-value: #D0CFCA;
}

/* Shape vars — registered as <length> so they also transition */
@property --radius {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

@property --btn-radius {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

/* ============================================================
   0b. DESIGN TOKENS
   ============================================================ */
:root {
  /* Color */
  --bg: #F5F4F0;
  --fg: #0A0A0A;
  --fg-muted: #5A5A54;
  --surface: #E8E7E3;
  --surface-dark: #D0CFCA;
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'Sanchez', serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: clamp(1.5rem, 3vw, 2rem);
  --space-l: clamp(2.5rem, 6vw, 4rem);
  --space-xl: clamp(4rem, 10vw, 7rem);
  --space-2xl: clamp(5rem, 12vw, 12rem);

  /* Grid */
  --grid-cols: 12;
  --grid-gap: 1.5rem;
  --max-width: 1400px;
  --padding-x: clamp(1.5rem, 5vw, 5rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.3s;
  --duration-med: 0.6s;
  --duration-slow: 1s;

  /* Border */
  --rule: 1px solid var(--fg);
  --rule-muted: 1px solid rgba(10, 10, 10, 0.15);

  /* Shape */
  --radius: 0px;
  --btn-radius: 0px;

  /* Project theme transition — registered properties all transition here */
  transition:
    --bg 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    --fg 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    --fg-muted 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    --surface 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    --surface-dark 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    --radius 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    --btn-radius 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   0c. PROJECT THEMES
   Class applied to <html> on card hover via JS.
   ============================================================ */

/*
  GOALS THEME
  Visual DNA extracted from the Goals app screenshot:
  — Background:   #0D0D0D (near-black)
  — Cards:        #1A1A1A with 20px radius
  — Gradient:     #FFE449 → #FF45A3 → #00D9F5 (yellow→pink→cyan)
  — Accent:       #FFD43B (yellow, used on headings/titles)
  — Typography:   Plus Jakarta Sans (rounded, bold)
  — Buttons:      fully-pill shaped
  — Images:       12px radius
*/
:root.theme-goals {
  --bg: #0D0D0D;
  --fg: #FFFFFF;
  --fg-muted: rgba(255, 255, 255, 0.5);
  --surface: #1A1A1A;
  --surface-dark: #252525;
  --radius: 20px;
  --btn-radius: 999px;
}

/* ---- Typography swap ---- */
:root.theme-goals body,
:root.theme-goals p,
:root.theme-goals span,
:root.theme-goals a {
  font-family: 'Plus Jakarta Sans', 'Space Grotesk', sans-serif;
}

:root.theme-goals h1,
:root.theme-goals h2,
:root.theme-goals h3,
:root.theme-goals h4,
:root.theme-goals .hero-headline,
:root.theme-goals .nav-logo {
  font-family: 'Plus Jakarta Sans', 'Sanchez', serif;
  letter-spacing: 0.04em;
}

/* ---- Headline: Goals signature gradient text ---- */
:root.theme-goals .hero-headline {
  background: linear-gradient(115deg, #FFE449 0%, #FF45A3 50%, #00D9F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Accent yellow on structural labels and section titles ---- */
:root.theme-goals .mono-label,
:root.theme-goals .section-title,
:root.theme-goals .section-num,
:root.theme-goals .nav-logo {
  color: #FFD43B;
}

/* ---- Accent colored rules & borders ---- */
:root.theme-goals .rule-short {
  background: linear-gradient(90deg, #FFE449, #FF45A3);
}

:root.theme-goals .hero-rule,
:root.theme-goals .section-rule {
  background: linear-gradient(90deg, #FFE449 0%, #FF45A3 50%, #00D9F5 100%);
  opacity: 0.4;
}

/* ---- Nav ---- */
:root.theme-goals .nav {
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

:root.theme-goals .nav.scrolled {
  background: rgba(13, 13, 13, 0.96);
}

:root.theme-goals .nav-link {
  color: rgba(255, 255, 255, 0.55);
}

:root.theme-goals .nav-link:hover {
  color: #FFD43B;
}

:root.theme-goals .nav-link::after {
  background: #FFD43B;
}

/* ---- CTA button in nav becomes yellow pill ---- */
:root.theme-goals .nav-cta {
  background: #FFD43B;
  color: #0D0D0D;
  border-color: #FFD43B;
  font-weight: 700;
}

:root.theme-goals .nav-cta:hover {
  background: #FFE449;
  color: #0D0D0D;
}

/* ---- Primary button: yellow pill ---- */
:root.theme-goals .btn-primary {
  background: #FFD43B;
  color: #0D0D0D;
  border-color: #FFD43B;
  font-weight: 700;
}

:root.theme-goals .btn-primary:hover {
  background: transparent;
  color: #FFD43B;
  border-color: #FFD43B;
}

/* ---- Ghost button: yellow outline pill ---- */
:root.theme-goals .btn-ghost {
  color: #FFD43B;
  border-color: #FFD43B;
}

:root.theme-goals .btn-ghost:hover {
  background: #FFD43B;
  color: #0D0D0D;
}

/* ---- Cap cards get the dark surface look ---- */
:root.theme-goals .cap-card {
  background: #1A1A1A;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

:root.theme-goals .cap-card:hover {
  background: #222222;
}

:root.theme-goals .cap-num {
  color: #FFD43B;
}

:root.theme-goals .cap-link {
  color: #FFD43B;
}

/* ---- Work card overlay: no tint needed — image shows clearly ---- */
/* (The overlay bottom scrim in the base styles handles this) */

/* ---- AI section inherits dark theme naturally; adjust accent ---- */
:root.theme-goals .ai-headline {
  color: #FFD43B;
}

/* ---- Footer ---- */
:root.theme-goals .footer {
  background: #0D0D0D;
  border-top-color: rgba(255, 255, 255, 0.06);
}

:root.theme-goals .footer-name {
  color: #FFD43B;
}

/* ---- Mobile menu overlay ---- */
:root.theme-goals .mobile-menu {
  background: #0D0D0D;
}

:root.theme-goals .mobile-link {
  color: #FFD43B;
}

/* ============================================================
   0d. RADIUS SYSTEM — applied universally, driven by --radius / --btn-radius
   Default values are 0px so there's no visual change until a theme sets them.
   ============================================================ */

/* Cards & containers */
.cap-card,
.work-card-img,
.work-card-placeholder,
.ai-pillars,
.about-img,
.about-img-circle {
  border-radius: var(--radius);
}

/* Buttons — use the pill variable */
.btn-primary,
.btn-ghost,
.nav-cta {
  border-radius: var(--btn-radius);
}

/* Images & Media Responsiveness */
img, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border-radius: var(--radius);
}

/* Nav — subtle bottom rounding in themed state */
.nav {
  transition:
    background 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   0e. FULL-PAGE GRADIENT OVERLAY (project theme immersion)
   ============================================================ */
#project-theme-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/*
  Goals overlay — replicates the hero card gradient from the app.
  Top-right yellow glow, bottom-left cyan, center-left pink.
  More assertive than before so it reads on both light and dark bg.
*/
#project-theme-overlay.overlay-goals {
  background:
    radial-gradient(ellipse 65% 55% at 90% 5%, rgba(255, 228, 73, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 55% 55% at 5% 95%, rgba(0, 217, 245, 0.15) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 30% 60%, rgba(255, 69, 163, 0.12) 0%, transparent 65%);
  opacity: 1;
}


/* ============================================================
   0d. VIEW TRANSITION — circle reveal / collapse
   ────────────────────────────────────────────────────────
   --reveal-x / --reveal-y: set by JS to the card's center,
   consumed by these keyframes to anchor the circle's origin.
   html.vt-enter = hover on  (new themed snapshot expands from card)
   html.vt-leave = hover off (old themed snapshot shrinks into card)
   ============================================================ */
@keyframes vt-circle-expand {
  from {
    clip-path: circle(0px at var(--reveal-x, 50%) var(--reveal-y, 50%));
  }

  to {
    clip-path: circle(200vmax at var(--reveal-x, 50%) var(--reveal-y, 50%));
  }
}

@keyframes vt-circle-shrink {
  from {
    clip-path: circle(200vmax at var(--reveal-x, 50%) var(--reveal-y, 50%));
  }

  to {
    clip-path: circle(0px at var(--reveal-x, 50%) var(--reveal-y, 50%));
  }
}

/* Kill browser's default VT cross-fade on both layers */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ─ ENTER: new (themed) snapshot expands from the card ─ */
html.vt-enter::view-transition-new(root) {
  animation: vt-circle-expand 1.1s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* Old screenshot stays fully visible underneath (no animation needed) */
html.vt-enter::view-transition-old(root) {
  animation: none;
}

/* ─ LEAVE: old (themed) snapshot shrinks into the card ─ */
html.vt-leave::view-transition-old(root) {
  animation: vt-circle-shrink 0.9s cubic-bezier(0.5, 0, 0.75, 0) both;
}

/* New (default) screenshot stays fully visible underneath */
html.vt-leave::view-transition-new(root) {
  animation: none;
}


/* ============================================================
   1. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* Suppress native cursor on ALL interactive elements so the custom cursor is always visible */
a,
button,
input,
textarea,
select,
label,
[data-project],
[role="button"] {
  cursor: none !important;
}

body.menu-open {
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.04em;
}

/* ============================================================
   2. CURSOR
   ============================================================ */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--fg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg);
  will-change: transform, width, height;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#cursor.cursor--project {
  width: 140px;
  height: 140px;
  background: var(--fg);
  box-shadow: none;
}

#cursor-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFFFF;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

#cursor.cursor--project #cursor-label {
  opacity: 1;
}

/* ============================================================
   TARGET CURSOR CORNERS
   ============================================================ */
.target-cursor-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.target-cursor-corner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1.5px solid #fff;
  will-change: transform;
}

.corner-tl {
  transform: translate(-150%, -150%);
  border-right: none;
  border-bottom: none;
}

.corner-tr {
  transform: translate(50%, -150%);
  border-left: none;
  border-bottom: none;
}

.corner-br {
  transform: translate(50%, 50%);
  border-left: none;
  border-top: none;
}

.corner-bl {
  transform: translate(-150%, 50%);
  border-right: none;
  border-top: none;
}

body:hover .cursor {
  opacity: 1;
}

a:hover~.cursor,
button:hover~.cursor {
  width: 16px;
  height: 16px;
}

/* ============================================================
   3. TYPOGRAPHY UTILITIES
   ============================================================ */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.label-vertical {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
}

.body-text {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--fg);
  max-width: 52ch;
}

.body-text+.body-text {
  margin-top: var(--space-m);
}

.statement-large {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  max-width: 22ch;
}

.accent-outline {
  color: var(--fg-muted);
  font-style: italic;
}

em {
  font-style: italic;
  font-weight: inherit;
}

/* ============================================================
   4. DIVIDER LINES
   ============================================================ */
.rule-short {
  width: 2.5rem;
  height: 1px;
  background: var(--fg);
  display: block;
  flex-shrink: 0;
}

.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--rule-muted);
  margin-top: var(--space-xl);
}

/* ============================================================
   5. SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-l) var(--padding-x) var(--space-l);
  margin-bottom: var(--space-l);
}

.section-num {
  font-size: 0.65rem;
  color: var(--fg);
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--fg-muted);
  opacity: 0.3;
}

.section-title {
  color: var(--fg);
}

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  transition: background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn-primary:hover {
  background: transparent;
  color: var(--fg);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
  transition: background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn-ghost:hover {
  background: var(--fg);
  color: var(--bg);
}

/* ============================================================
   7. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--padding-x);
  border-bottom: var(--rule-muted);
  background: var(--bg);
  transition: background var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.nav.scrolled {
  background: rgba(245, 244, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav-logo span {
  color: var(--fg-muted);
}

.lang-toggle {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--rule-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.lang-toggle:hover {
  background: var(--fg);
  color: var(--bg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-l);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--duration-fast) ease;
  position: relative;
}

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

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--fg);
  color: var(--fg);
  transition: background var(--duration-fast) ease,
    color var(--duration-fast) ease;
}

.nav-cta:hover {
  background: var(--fg);
  color: var(--bg);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--fg);
  transition: transform var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) ease;
}

/* ============================================================
   8. MOBILE MENU
   ============================================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--fg);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-med) var(--ease-out);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  text-align: center;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--bg);
  transition: opacity var(--duration-fast) ease;
}

.mobile-link:hover {
  opacity: 0.5;
}

/* ============================================================
   9. HERO SECTION
   ============================================================ */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: 6rem;
  padding-bottom: 0;
  position: relative;
  background-color: var(--bg);
  z-index: 50;
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 3rem 1fr clamp(320px, 46vw, 680px);
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  padding: var(--space-l) 0 var(--space-l) var(--padding-x);
  gap: var(--space-m);
  position: relative;
}

.hero-label-left {
  position: absolute;
  left: calc(-3rem - var(--space-m));
  bottom: var(--space-l);
  width: 3rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-content {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: relative;
  /* Top of the grid cell is at 6rem + var(--space-l). Shift to 50svh and pull up by 50% */
  top: calc(50svh - 6rem - var(--space-l));
  transform: translateY(calc(-50% + 70px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-m);
  z-index: 2;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.hero-headline {
  font-size: clamp(2.8rem, 7vw, 8rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 300;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 40ch;
}

.hero-ctas {
  display: flex;
  gap: var(--space-m);
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: var(--space-l);
}

.hero-index {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-m);
}

/* Hero Portrait */
.hero-photo {
  grid-column: 3;
  grid-row: 1 / -1;
  position: absolute;
  top: calc(-6rem - var(--space-l));
  left: 0;
  right: 0;
  overflow: hidden;
  border-radius: 999px 0 0 999px;
  height: 120dvh;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(10, 10, 10, 0.35) 0%,
      transparent 50%);
  pointer-events: none;
}

/* ============================================================
   10. PROBLEM SECTION
   ============================================================ */
.problem {
  padding: 0 0 var(--space-2xl);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl) var(--space-xl);
  padding: var(--space-xl) var(--padding-x);
  align-items: start;
}

.problem-right {
  display: flex;
  gap: var(--space-l);
  align-items: flex-start;
}

.problem-pivot {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

/* ============================================================
   11. CAPABILITIES SECTION
   ============================================================ */
.capabilities {
  padding: 0 0 var(--space-2xl);
  border-top: var(--rule-muted);
}

.cap-headline {
  padding: var(--space-l) var(--padding-x);
}

.cap-headline h2 {
  font-size: clamp(2.5rem, 5vw, 6rem);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule-muted);
}

.cap-card {
  padding: var(--space-l) var(--padding-x) var(--space-l) var(--space-l);
  border-right: var(--rule-muted);
  border-bottom: var(--rule-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  transition: background var(--duration-fast) ease;
}

.cap-card:nth-child(3n) {
  border-right: none;
}

.cap-card:hover {
  background: var(--surface);
}

.cap-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-display);
}

.cap-title {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cap-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--fg-muted);
  flex: 1;
}

.cap-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  color: var(--fg);
  transition: letter-spacing var(--duration-fast) var(--ease-out);
}

.cap-link:hover {
  letter-spacing: 0.2em;
}

/* ============================================================
   12. AI SECTION
   ============================================================ */
.ai-section {
  padding: 0 0 var(--space-2xl);
  border-top: var(--rule-muted);
  background: var(--fg);
  color: var(--bg);
}

.ai-section .section-header {
  border-bottom-color: rgba(245, 244, 240, 0.15);
}

.ai-section .section-num,
.ai-section .section-title {
  color: var(--bg);
}

.ai-section .section-rule {
  background: var(--bg);
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  min-height: 70dvh;
}

.ai-left {
  position: relative;
  overflow: hidden;
}

.ai-arc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-arc svg {
  width: 110%;
  height: 110%;
  margin: -5%;
}

.ai-right {
  padding: var(--space-xl) var(--padding-x) var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-l);
}

.ai-headline {
  font-size: clamp(2.5rem, 4vw, 5.5rem);
  color: var(--bg);
}

.ai-section .body-text {
  color: rgba(245, 244, 240, 0.7);
}

.ai-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-m);
  border-top: 1px solid rgba(245, 244, 240, 0.2);
  padding-top: var(--space-l);
}

.ai-pillar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.ai-pillar .mono-label {
  color: rgba(245, 244, 240, 0.4);
}

.ai-pillar p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(245, 244, 240, 0.75);
}

.ai-section .btn-primary {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
  align-self: flex-start;
}

.ai-section .btn-primary:hover {
  background: transparent;
  color: var(--bg);
}

/* ============================================================
   13. WORK SECTION
   ============================================================ */
.work {
  padding: 0 0 var(--space-2xl);
  border-top: var(--rule-muted);
}

.work-headline {
  padding: var(--space-l) var(--padding-x);
}

.work-headline h2 {
  font-size: clamp(2.5rem, 5vw, 6rem);
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  padding: 0 var(--padding-x);
  margin-bottom: var(--space-l);
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--fg-muted);
  color: var(--fg-muted);
  padding: 0.5rem 1rem;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s var(--ease-out);
}

.filter-btn:hover {
  border-color: var(--fg);
  color: var(--fg);
}

.filter-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl) var(--space-m);
  padding: 0 var(--padding-x);
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.work-card-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.work-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
}



.work-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: transform var(--duration-med) var(--ease-out);
}

.work-card:hover .work-card-placeholder {
  transform: scale(1.03);
}

/* On default: subtle scrim at the bottom so the label is readable.
   The bulk of the image stays fully visible — no tint. */
.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.2) 35%,
      transparent 65%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-m);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-card:hover .work-card-overlay {
  opacity: 1;
}

/* OPEN cursor — always in site default style, never project-themed */
.cursor-follower.cursor--project {
  background: var(--fg);
  border-color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#cursor-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFFFF;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.cursor-follower.cursor--project #cursor-label {
  opacity: 1;
}

.work-card-cta {
  display: none;
}

.work-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-s);
  border-top: var(--rule-muted);
  padding-top: var(--space-s);
}

.work-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.work-card-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.work-card-type {
  color: var(--fg-muted);
}

.work-card-year {
  color: var(--fg-muted);
  flex-shrink: 0;
}

.work-footer {
  padding: var(--space-xl) var(--padding-x) 0;
  display: flex;
  justify-content: center;
}

/* ============================================================
   14. WHY / DIFFERENTIATOR SECTION
   ============================================================ */
.why {
  padding: 0 0 var(--space-2xl);
  border-top: var(--rule-muted);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--padding-x);
  align-items: start;
}

.why-statement h2 {
  font-size: clamp(2.5rem, 4.5vw, 6rem);
  position: sticky;
  top: 8rem;
}

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

.why-reason {
  padding: var(--space-l) 0;
  border-bottom: var(--rule-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.why-reason:first-child {
  border-top: var(--rule-muted);
}

.why-reason-header {
  display: flex;
  align-items: center;
  gap: var(--space-m);
}

.why-num {
  color: var(--fg);
  font-size: 0.8rem;
}

/* ============================================================
   15. MARQUEE
   ============================================================ */
.marquee-section {
  border-top: var(--rule-muted);
  border-bottom: var(--rule-muted);
  overflow: hidden;
  padding: 1.25rem 0;
  background: var(--fg);
}

.marquee-track {
  display: flex;
  overflow: hidden;
}

.marquee-inner {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.marquee-inner span {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bg);
  padding: 0 1rem;
}

.marquee-dot {
  color: rgba(245, 244, 240, 0.3) !important;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ============================================================
   16. WORK SECTION (SLIDERS)
   ============================================================ */
.work-sliders-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  padding: 0 0 var(--space-4xl) 0;
  overflow: hidden;
  background: var(--bg);
}

.slider-track {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  padding: var(--space-xs) 0;
}

.slider-content {
  display: flex;
  gap: var(--space-m);
  padding: 0 calc(var(--space-m) / 2);
  /* Half gap padding on edges to loop cleanly */
  width: max-content;
  will-change: transform;
}

/* 
   Keyframes track from 0 to -50%. 
   Because we duplicated the elements exactly inside the content flex container,
   when it reaches -50%, it perfectly snaps back to 0 without the user noticing.
*/
@keyframes slide-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes slide-right {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.slider-left .slider-content {
  animation: slide-left 45s linear infinite;
}

.slider-right .slider-content {
  animation: slide-right 45s linear infinite;
}

/* Pause the EXACT slider row being hovered */
.slider-track:hover .slider-content {
  animation-play-state: paused;
}

.slider-item {
  position: relative;
  display: block;
  /* Optimize width so 3 sliders fit gracefully on screen height */
  width: clamp(200px, 20vw, 300px);
  aspect-ratio: 1 / 1;
  /* Force square crop to keep it tidy */
  overflow: hidden;
  border: var(--rule-muted);
  background: var(--surface);
  transition: transform 0.3s ease, filter 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}

.slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Hover States */
.slider-item:hover {
  transform: scale(0.98);
  border-color: var(--fg-muted);
  z-index: 10;
}

.slider-item:hover img {
  transform: scale(1.05);
  /* Slight internal zoom */
}

/* ============================================================
   17. CTA SECTION
   ============================================================ */
.cta-section {
  position: relative;
  overflow: hidden;
  border-top: var(--rule-muted);
  background: var(--bg);
}

.cta-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60dvh;
  padding: var(--space-4xl) var(--padding-x);
  text-align: center;
  gap: var(--space-l);
  position: relative;
}

.cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-m);
  z-index: 2;
  position: relative;
}

.cta-headline {
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
}

.cta-sub {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  color: var(--fg-muted);
  max-width: 40ch;
  line-height: 1.6;
  margin: 0 auto;
}

.cta-btn-wrapper {
  margin-top: var(--space-m);
}

.cta-bg-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  user-select: none;
}

.cta-bg-watermark span {
  font-family: var(--font-display);
  font-size: 35vw;
  font-weight: 800;
  color: var(--fg);
  opacity: 0.05;
  white-space: nowrap;
}

/* ============================================================
   17. FOOTER
   ============================================================ */
.footer {
  border-top: var(--rule);
  padding: var(--space-l) var(--padding-x);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-l);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-nav {
  display: flex;
  gap: var(--space-l);
  align-items: center;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--duration-fast) ease;
}

.footer-link:hover {
  color: var(--fg);
}

.footer-right {
  text-align: right;
}

.footer-copy {
  color: var(--fg-muted);
}

/* ============================================================
  pointer-events: none;
  z-index: 10;
}

.ai-gen-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ai-gen-path {
  fill: none;
  stroke: rgba(0, 229, 255, 0.9);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.5s;
}

.ai-gen-node {
  fill: #00E5FF;
}

.ai-gen-mask-path {
  fill: none;
  stroke: white;
  stroke-width: 80px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-gen-mask-node {
  fill: white;
}

/* ============================================================
   18. REVEAL ANIMATIONS (initial state — GSAP handles entry)
   ============================================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-line {
  display: block;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  padding: 0.15em;
  margin: -0.15em;
}

/* ============================================================
   19. RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: var(--space-m) var(--padding-x);
    padding-top: var(--space-xl);
    gap: var(--space-l);
  }

  .hero-content {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    top: auto;
    transform: none;
    position: relative;
  }

  .hero-label-left,
  .hero-index {
    display: none;
  }

  .hero-photo {
    display: block;
    grid-column: 1;
    grid-row: 1;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    justify-self: center;
  }

  .hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
  }

  .hero-photo-overlay {
    display: none;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

  .cap-card:nth-child(3n) {
    border-right: var(--rule-muted);
  }

  .cap-card:nth-child(2n) {
    border-right: none;
  }

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

  .ai-left {
    display: none;
  }

  .ai-right {
    padding: var(--space-xl) var(--padding-x);
  }

  /* Removing old strict mobile card grid settings */
  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-statement h2 {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-l);
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }

  .footer-right {
    text-align: center;
  }
}

/* ============================================================
   20. RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 700px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-follower {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: var(--space-m) var(--padding-x);
    padding-top: var(--space-xl);
    gap: var(--space-l);
  }

  .hero-content {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    top: auto;
    transform: none;
    position: relative;
  }

  .hero-label-left,
  .hero-index {
    display: none;
  }

  .hero-headline {
    font-size: clamp(3rem, 15vw, 6rem);
  }

  .hero-photo {
    display: block;
    grid-column: 1;
    grid-row: 1;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    justify-self: center;
  }

  .hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
  }

  .hero-photo-overlay {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .cap-card:nth-child(n) {
    border-right: none;
  }

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

  .why-grid {
    grid-template-columns: 1fr;
    padding: var(--space-l) var(--padding-x);
  }

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

  .ai-pillars {
    grid-template-columns: 1fr;
  }

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

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-m);
  }
}

/* ============================================================
   SERVICES VAULT CONTAINER
   ============================================================ */
.vault-container {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.vault-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  will-change: transform, opacity, mask-size;
  perspective: 1200px;
}

.vault-panel:first-child {
  visibility: visible;
}

.vault-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.vault-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) ease;
}

/* Left side frosted glass */
.vault-bg-blur-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  filter: blur(25px);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 45%);
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 45%);
}

.vault-bg-blur-gradient img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Full screen intro blur wrapper */
.vault-bg-blur-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  filter: blur(30px);
}

.vault-bg-blur-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}



.vault-content {
  position: relative;
  z-index: 2;
  width: 83.333333%;
  max-width: 1200px;
  padding: var(--padding-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  /* Allows child 3D rotations */
}

.vault-meta {
  display: flex;
  gap: var(--space-m);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  opacity: 0.9;
}

.vault-title {
  font-size: clamp(2rem, 8vw, 7rem);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  overflow: hidden;
  padding-bottom: 0.1em;
}

.vault-desc {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  max-width: 45ch;
  opacity: 0.95;
}

.vault-tags {
  display: flex;
  gap: var(--space-s);
  margin-top: var(--space-m);
  flex-wrap: wrap;
}

.vault-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============================================================
   GRADUAL BLUR REVEAL — vanilla port of GradualBlur component
   All inline styles are set by JS; these rules handle structure
   and ensure isolation / fallback behaviour.
   ============================================================ */

/* Outer wrapper: fills parent, sits above content, no pointer capture */
.gb-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  isolation: isolate;
  /* creates its own stacking context for backdrop-filter */
  overflow: hidden;
}

/* Individual blur bands — each covers the full overlay area;
   the gradient mask-image applied inline restricts where blur shows */
.gb-layer {
  position: absolute;
  inset: 0;
}

/* Graceful fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .gb-layer {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
  }
}

.work-headline h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 6rem);
}