/* ==========================================================================
   Wollvo Design — Dark theme design system
   Derived from the logo: Deep Plum #250043 + Electric Violet #7D00E3
   These tokens map 1:1 to Framer Color Styles / Text Styles.
   ========================================================================== */

:root {
  /* Surfaces (plum-tinted blacks built from #250043) */
  --bg: #08040e;          /* Night        — page background            */
  --bg-2: #0f0819;        /* Night 2      — alternate section          */
  --surface: #160c25;     /* Surface      — cards                      */
  --surface-2: #1f1036;   /* Surface 2    — hover / raised             */
  --deep: #250043;        /* Deep Plum    — logo primary               */

  /* Brand */
  --brand: #7d00e3;       /* Electric Violet — logo accent, buttons    */
  --brand-hi: #9a3cff;    /* Violet Glow  — hover, glows               */
  --brand-soft: #c9a2ff;  /* Lilac        — accent text on dark        */

  /* Text */
  --ink: #f4effb;         /* Ink          — headings, body             */
  --ink-2: #b9aecb;       /* Ink Muted    — secondary text             */
  --ink-3: #9387a8;       /* Ink Subtle   — captions, meta (≥4.5:1 on all surfaces) */

  /* Lines */
  --line: rgba(201, 162, 255, 0.12);
  --line-2: rgba(201, 162, 255, 0.24);

  /* Type — contrast pairing against the heavy geometric logo:
     an elegant serif for headlines (never bold), a neutral grotesk for reading,
     a mono for labels, and a handwritten face only for margin notes. */
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-hand: "Caveat", "Segoe Print", cursive;

  /* Fluid type scale — ~1.25 ratio on mobile, ~1.333 on desktop */
  --fs-caption: 12px;
  --fs-small: 15px;
  --fs-body: clamp(16px, 0.25vw + 15.2px, 18px);
  --fs-lead: clamp(19px, 0.6vw + 17px, 23px);
  --fs-h4: clamp(24px, 0.6vw + 22px, 30px);
  --fs-h3: clamp(30px, 1.4vw + 25px, 44px);
  --fs-h2: clamp(40px, 2.8vw + 30px, 72px);
  --fs-h1: clamp(52px, 4.6vw + 36px, 104px);
  --fs-display-l: clamp(60px, 7.2vw + 34px, 148px);
  --fs-display-xl: clamp(68px, 10vw + 32px, 196px);

  /* Layout */
  --max: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 20px;
  --radius-lg: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
h1, h2, h3, h4, h5, h6, p, li, dd, blockquote { overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; }
.case__meta > * { min-width: 0; }
.grid-2 > *, .grid-3 > *, .work-grid > *, .work-list > *, .contact-grid > *, .svc > *, .cs-chapter > * { min-width: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--brand); color: #fff; }

/* Grain overlay for depth */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type scale (Framer Text Styles) ---------- */
/* Rules: serif headlines are always weight 400 (emphasis = italic, never bold).
   Body max weight 600. Labels in mono. Measure capped at ~65ch. */
.display-xl, .display-l, .h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}
.display-xl { font-size: var(--fs-display-xl); letter-spacing: -0.035em; line-height: 0.86; }
.display-l  { font-size: var(--fs-display-l); letter-spacing: -0.03em; line-height: 0.9; }
.h1 { font-size: var(--fs-h1); line-height: 0.95; }
.h2 { font-size: var(--fs-h2); line-height: 1; }
.h3 { font-size: var(--fs-h3); line-height: 1.08; letter-spacing: -0.01em; }
.h4 { font-size: var(--fs-h4); line-height: 1.15; letter-spacing: -0.005em; }
.display-xl em, .display-l em, .h1 em, .h2 em, .h3 em, .h4 em, .accent-i { font-style: italic; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.body-s { font-size: var(--fs-small); color: var(--ink-2); }
p { text-wrap: pretty; }
.eyebrow, .mono {
  font-family: var(--font-mono);
  font-size: var(--fs-caption); font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.eyebrow {
  color: var(--brand-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.hand { font-family: var(--font-hand); font-weight: 500; letter-spacing: 0; text-transform: none; }
.eyebrow::before {
  content: ""; width: 8px; height: 8px;
  background: var(--brand);
  transform: rotate(45deg);
  box-shadow: 0 0 16px var(--brand-hi);
}
.accent { color: var(--brand-soft); }
.serif-i { font-style: italic; font-weight: 400; }
.muted { color: var(--ink-2); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(96px, 14vw, 200px) 0; position: relative; }
.section--tight { padding: clamp(64px, 9vw, 120px) 0; }
.section--alt { background: var(--bg-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stack-s > * + * { margin-top: 12px; }
.stack-m > * + * { margin-top: 24px; }
.stack-l > * + * { margin-top: 40px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 28px;
  border-radius: 999px;
  font-weight: 500; font-size: 16px; letter-spacing: -0.005em;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px) rotate(-45deg); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 0 0 0 rgba(154, 60, 255, 0); }
.btn--primary:hover { background: var(--brand-hi); box-shadow: 0 10px 40px -8px rgba(154, 60, 255, .7); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand-soft); background: rgba(125, 0, 227, .08); }
.btn--light { background: var(--ink); color: var(--bg); }
.btn--light:hover { background: #fff; }

.link-underline {
  position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform-origin: right; transform: scaleX(0);
  transition: transform .5s var(--ease);
}
.link-underline:hover::after { transform-origin: left; transform: scaleX(1); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: transform .5s var(--ease), background .4s var(--ease), backdrop-filter .4s;
}
.site-header.is-scrolled {
  background: rgba(8, 4, 14, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav {
  height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__logo svg { height: 34px; width: auto; }
.nav__links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 10px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: color .3s, background .3s;
}
.nav__links a:hover { color: var(--ink); background: rgba(201, 162, 255, .06); }
.nav__links a[aria-current="page"] { color: var(--ink); background: rgba(125, 0, 227, .18); }
.nav__cta { height: 46px; padding: 0 22px; font-size: 15px; }
.nav__burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); align-items: center; justify-content: center; }
.nav__burger span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: transform .4s var(--ease); }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }
.menu-open .nav__burger span { background: transparent; }
.menu-open .nav__burger span::before { top: 0; transform: rotate(45deg); }
.menu-open .nav__burger span::after { top: 0; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 49; background: var(--bg);
  padding: 120px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0% at calc(100% - 40px) 42px);
  transition: clip-path .8s var(--ease);
  pointer-events: none;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 40px) 42px); pointer-events: auto; }
.mobile-menu a { font-family: var(--font-display); font-size: 52px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; display: block; padding: 4px 0; }

@media (max-width: 980px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: inline-flex; }
  .nav { height: 72px; }
  .nav__logo svg { height: 28px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 96px 0 32px; position: relative; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer__col .footer__h { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; font-weight: 400; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li + li { margin-top: 10px; }
.footer__col a:not(.btn) { color: var(--ink-2); transition: color .3s; display: inline-block; padding: 4px 0; }
.footer__col a:not(.btn):hover { color: var(--ink); }
.footer__col li + li { margin-top: 4px; }
.footer__wordmark { margin-top: 96px; color: var(--ink); opacity: .9; }
.footer__wordmark svg { width: 100%; height: auto; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

/* ---------- Generic components ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
  /* Never transition `transform` on elements GSAP animates — it fights the tween */
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--surface-2); }

.pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}

.page-hero { padding: clamp(160px, 20vw, 240px) 0 clamp(64px, 8vw, 112px); position: relative; overflow: hidden; }
.page-hero .lead { max-width: 640px; }
.glow {
  position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px);
  background: radial-gradient(circle, rgba(125, 0, 227, .55), rgba(37, 0, 67, 0) 70%);
}

/* Placeholder brand artwork (swap for real project imagery in Framer) */
.art {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--surface); aspect-ratio: 4 / 3;
}
.art__inner { position: absolute; inset: -12% 0; }
.art--a .art__inner { background: radial-gradient(120% 90% at 20% 20%, #7d00e3 0%, #250043 55%, #08040e 100%); }
.art--b .art__inner { background: linear-gradient(135deg, #f4effb 0%, #c9a2ff 45%, #7d00e3 100%); }
.art--c .art__inner { background: radial-gradient(90% 120% at 80% 80%, #9a3cff 0%, #250043 60%, #0f0819 100%); }
.art--d .art__inner { background: conic-gradient(from 210deg at 60% 40%, #250043, #7d00e3, #c9a2ff, #250043); }
.art__mark { position: absolute; inset: 0; display: grid; place-items: center; }
.art__mark span {
  font-family: var(--font-body); font-weight: 600; letter-spacing: -0.06em;
  font-size: clamp(64px, 10vw, 160px); color: rgba(244, 239, 251, .92); mix-blend-mode: overlay;
}
.art--b .art__mark span { color: #250043; mix-blend-mode: normal; }

/* ---------- Reveal animation primitives (Framer: "Appear" effects) ---------- */
.reveal { opacity: 0; transform: translateY(40px); }
.split-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-line > span { display: inline-block; transform: translateY(110%); }
.no-js .reveal, .reduced .reveal { opacity: 1; transform: none; }
.no-js .split-line > span, .reduced .split-line > span { transform: none; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; position: relative; overflow: hidden; }
.cta-band .glow { width: 900px; height: 900px; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .7; }
.cta-band .display-l { position: relative; }
.cta-band .actions { position: relative; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 48px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select { width: 100%; min-width: 0; }
.chip { position: relative; }
.chip input { width: 1px; height: 1px; left: 0; top: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand-hi); box-shadow: 0 0 0 4px rgba(125, 0, 227, .2);
}
.field__err { font-size: 14px; color: #ff9fb6; min-height: 0; }
.field__err:empty { display: none; }
[aria-invalid="true"] { border-color: #ff6b8e !important; }
.form-status { font-family: var(--font-hand); font-size: 24px; color: var(--brand-soft); min-height: 1.2em; margin: 0; }
.btn[disabled] { opacity: .6; cursor: progress; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; height: 44px; align-items: center; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: all .3s var(--ease);
}
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 162, 255, .5); }

:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 500; transition: top .3s var(--ease); }
.skip-link:focus { top: 16px; }

/* Hand-made touches shared across pages */
.hand-note { font-family: var(--font-hand); font-size: 24px; line-height: 1.1; color: var(--ink-3); display: inline-block; transform: rotate(-3deg); }
.footer__sign { font-family: var(--font-hand); font-size: 22px; color: var(--ink-3); transform: rotate(-2deg); display: inline-block; }
.heading-accent em, .display-l .accent, .display-xl .accent, .h1 .accent, .h2 .accent { font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
