/* ==========================================================
   TOKENS — the whole brand lives here. Every section reads these.
   Written by scripts/new_theme.py, then hand-tuned per design.
   ========================================================== */
/* TOKENS:START */
:root {
  --mv-accent: #DABD90;
  --mv-accent-soft: #E9D7B8;
  --mv-accent-glow: rgba(218, 189, 144, 0.32);
  --mv-bg: #050505;
  --mv-bg-2: #0C0C0C;
  --mv-surface: #141414;
  --mv-surface-2: #1C1C1C;
  --mv-line: rgba(243, 242, 239, 0.10);
  --mv-line-strong: rgba(243, 242, 239, 0.22);
  --mv-text: #F3F2EF;
  --mv-text-2: #B4B3AF;
  --mv-muted: #7A7976;
  --mv-on-accent: #0A0A0A;
  --mv-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mv-font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mv-font-accent: "Instrument Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --mv-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
/* White mode — toggled from the hero (saved per visitor) */
html[data-theme="light"] {
  --mv-accent: #A8844F;
  --mv-accent-soft: #C2A06C;
  --mv-accent-glow: rgba(168, 132, 79, 0.28);
  --mv-bg: #F4F0E8;
  --mv-bg-2: #EBE4D7;
  --mv-surface: #E3DBCB;
  --mv-surface-2: #D8CEBB;
  --mv-line: rgba(10, 10, 10, 0.10);
  --mv-line-strong: rgba(10, 10, 10, 0.22);
  --mv-text: #0A0A0A;
  --mv-text-2: #4A453C;
  --mv-muted: #7D766A;
  --mv-on-accent: #FFFFFF;
  color-scheme: light;
}
/* TOKENS:END */

:root {
  --mv-container: 1240px;
  --mv-gutter: clamp(20px, 4vw, 48px);
  --mv-section: clamp(88px, 11vw, 160px);
  --mv-r-sm: 10px;
  --mv-r-md: 16px;
  --mv-r-lg: 24px;
  --mv-r-xl: 36px;
  --mv-ease: cubic-bezier(.22, 1, .36, 1);
  --mv-header-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--mv-header-h); }
/* Lenis 1.3.27 recommended CSS (verbatim) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--mv-bg);
  color: var(--mv-text);
  font-family: var(--mv-font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
::selection { background: var(--mv-accent); color: var(--mv-on-accent); }

:focus-visible { outline: 2px solid var(--mv-accent-soft); outline-offset: 3px; border-radius: 6px; }

.mv-skip {
  position: fixed; left: 16px; top: -60px; z-index: 1000;
  background: var(--mv-accent); color: var(--mv-on-accent); padding: 10px 16px; border-radius: 8px;
  transition: top .2s;
}
.mv-skip:focus { top: 16px; }

/* ---------- layout ---------- */
.mv-container {
  width: 100%;
  max-width: calc(var(--mv-container) + var(--mv-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--mv-gutter);
}
.mv-main { position: relative; }

/* ---------- type ---------- */
h1, h2, h3, h4, .mv-h2 { font-family: var(--mv-font-display); }
.mv-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .64rem/1.4 var(--mv-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--mv-text-2);
}
.mv-eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--mv-accent); transform: rotate(45deg); }
.mv-h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.25rem);
  line-height: .98; font-weight: 700; letter-spacing: -.032em; text-transform: uppercase;
}
.mv-lead { color: var(--mv-text-2); font-size: .95rem; line-height: 1.65; max-width: 46ch; }

/* line masks created by SplitText — extra room so descenders (g, y, p) aren't clipped */
[data-lines] > div, .mv-hero__title > div { padding-bottom: .14em; margin-bottom: -.14em; }

/* ---------- buttons ---------- */
/* Buttons — "viewfinder": square, fill wipes up, focus brackets snap in, label rolls, arrow shoots out */
.mv-btn {
  --b-bg: var(--mv-accent); --b-fg: var(--mv-on-accent); --b-bd: var(--mv-accent);
  --b-fill: var(--mv-text); --b-fill-fg: var(--mv-bg);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 50px; padding: 0 12px 0 22px;
  border: 1px solid var(--b-bd); border-radius: 2px;
  background: var(--b-bg); color: var(--b-fg);
  font-family: var(--mv-font-display); font-size: .74rem; font-weight: 600; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase;
  transition: color .55s var(--mv-ease), border-color .55s var(--mv-ease);
}
.mv-btn:not(:has(.mv-btn__icon)) { padding: 0 24px; justify-content: center; }
/* fill */
.mv-btn::after {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: var(--b-fill);
  clip-path: inset(100% 0 0 0);
  transition: clip-path .6s var(--mv-ease);
}
/* viewfinder brackets */
.mv-btn::before {
  --c: currentColor; --l: 7px;
  content: ""; position: absolute; inset: 4px; pointer-events: none; z-index: 1;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1px, linear-gradient(var(--c), var(--c)) top left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1px, linear-gradient(var(--c), var(--c)) top right / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1px, linear-gradient(var(--c), var(--c)) bottom left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1px, linear-gradient(var(--c), var(--c)) bottom right / 1px var(--l);
  background-repeat: no-repeat;
  opacity: 0; transform: scale(1.14);
  transition: opacity .3s, transform .6s var(--mv-ease);
}
.mv-btn__label { position: relative; display: inline-block; text-shadow: 0 3.2em 0 currentColor; transition: transform .6s var(--mv-ease); }
.mv-btn__icon {
  flex: none; display: grid; place-items: center; overflow: hidden;
  width: 34px; height: 34px; border-radius: 1px;
  background: var(--b-fg); color: var(--b-bg);
  transition: background-color .55s var(--mv-ease), color .55s var(--mv-ease);
}
.mv-btn__icon svg { width: 14px; height: 14px; filter: drop-shadow(-24px 24px 0 currentColor); transition: transform .6s var(--mv-ease); }

.mv-btn:hover, .mv-btn:focus-visible { color: var(--b-fill-fg); border-color: var(--b-fill); }
.mv-btn:hover::after, .mv-btn:focus-visible::after { clip-path: inset(0 0 0 0); }
.mv-btn:hover::before, .mv-btn:focus-visible::before { opacity: .75; transform: none; transition-delay: .12s, .12s; }
.mv-btn:hover .mv-btn__label, .mv-btn:focus-visible .mv-btn__label { transform: translateY(-3.2em); }
.mv-btn:hover .mv-btn__icon, .mv-btn:focus-visible .mv-btn__icon { background: var(--b-fill-fg); color: var(--b-fill); }
.mv-btn:hover .mv-btn__icon svg, .mv-btn:focus-visible .mv-btn__icon svg { transform: translate(24px, -24px); }
.mv-btn:active { transform: translateY(1px); }

.mv-btn--ghost { --b-bg: transparent; --b-fg: var(--mv-text); --b-bd: var(--mv-line-strong); --b-fill: var(--mv-accent); --b-fill-fg: var(--mv-on-accent); }
.mv-btn--ghost .mv-btn__icon { background: var(--mv-text); color: var(--mv-bg); }
.mv-btn--sm { min-height: 42px; padding: 0 10px 0 16px; gap: 14px; font-size: .68rem; }
.mv-btn--sm .mv-btn__icon { width: 26px; height: 26px; }
@media (prefers-reduced-motion: reduce) {
  .mv-btn__label, .mv-btn__icon svg { transition: none; }
}

/* ---------- placeholder images ---------- */
img[data-placeholder] { object-fit: cover; background: var(--mv-bg-2); }

/* ---------- generic pages ---------- */
.mv-page { padding-top: calc(var(--mv-header-h) + 80px); padding-bottom: var(--mv-section); min-height: 70vh; }
.mv-content { padding-block: clamp(56px, 7vw, 100px) var(--mv-section); }
.mv-page__title { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; font-weight: 500; letter-spacing: -.02em; margin-bottom: 40px; }
.mv-page__img { border-radius: var(--mv-r-lg); margin-bottom: 48px; }
.mv-page--404 p { color: var(--mv-text-2); margin-bottom: 32px; }
.mv-prose { max-width: 70ch; color: var(--mv-text-2); }
.mv-prose > * + * { margin-top: 1.2em; }
.mv-prose h2, .mv-prose h3 { color: var(--mv-text); font-weight: 500; line-height: 1.2; }
.mv-prose a { color: var(--mv-accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.mv-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.mv-post__img { border-radius: var(--mv-r-md); margin-bottom: 18px; aspect-ratio: 4/3; object-fit: cover; }
.mv-post__title { font-size: 1.25rem; font-weight: 500; margin-bottom: 8px; }
.mv-post__excerpt { color: var(--mv-muted); font-size: .92rem; }

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


body { transition: background-color .6s var(--mv-ease), color .6s var(--mv-ease); }

/* ---------- Mavit section scaffolding ---------- */
.mv-sec { position: relative; padding-block: var(--mv-section); }
.mv-sec--line { border-top: 1px solid var(--mv-line); }
.mv-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 72px); }
.mv-head--center { justify-items: center; text-align: center; }
.mv-head__title { max-width: 16ch; }
.mv-head__text { max-width: 46ch; color: var(--mv-text-2); font-size: 1.05rem; line-height: 1.6; }
.mv-w { display: inline-block; }
.mv-hl { color: var(--mv-accent); }
/* Gold highlights inside headings switch to the italic serif — the romantic counterpoint to Sora. */
h1 .mv-hl:not(.mv-hl--caps), h2 .mv-hl:not(.mv-hl--caps), h3 .mv-hl:not(.mv-hl--caps), .mv-hero__title .mv-hl:not(.mv-hl--caps) {
  font-family: var(--mv-font-accent); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: -.01em; font-size: 1.14em; line-height: .8;
}
.mv-hl .mv-w, .mv-hero__ch.mv-hl { padding-right: .03em; }
.mv-mono { font: 500 .62rem/1.4 var(--mv-mono); letter-spacing: .16em; text-transform: uppercase; }
html.js [data-focus], html.js [data-focus-lines] { visibility: hidden; }

/* ---------- White mode: warm paper, film grain, rhythm and depth (not a flat white page) ---------- */
html[data-theme="light"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 9990; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="light"] body {
  background: radial-gradient(120% 60% at 50% 0%, #FBF8F2 0%, var(--mv-bg) 55%) fixed, var(--mv-bg);
}
/* alternating deeper paper so sections read as chapters */
html[data-theme="light"] .mv-portfolio,
html[data-theme="light"] .mv-process,
html[data-theme="light"] .mv-faq { background: var(--mv-bg-2); }
html[data-theme="light"] .mv-strip { background: var(--mv-bg); box-shadow: 0 24px 50px -30px rgba(60,45,20,.35); }
/* real shadows on things that sit on the page */
html[data-theme="light"] .mv-contact__panel,
html[data-theme="light"] .mv-modal__panel { box-shadow: 0 40px 80px -40px rgba(60,45,20,.45), 0 1px 0 rgba(255,255,255,.7) inset; }
html[data-theme="light"] .mv-svc, html[data-theme="light"] .mv-frame__btn { box-shadow: 0 26px 50px -30px rgba(40,30,15,.55); }
html[data-theme="light"] .mv-about__small img { box-shadow: 0 30px 60px -26px rgba(60,45,20,.55); }
html[data-theme="light"] .mv-about__iris { box-shadow: 0 50px 90px -50px rgba(60,45,20,.6); }
html[data-theme="light"] .mv-header.is-scrolled { background: color-mix(in srgb, var(--mv-bg) 82%, transparent); }
/* the footer stays dark in white mode — a strong anchor at the end of the page */
html[data-theme="light"] .mv-footer {
  --mv-bg: #070707; --mv-bg-2: #0E0E0E; --mv-text: #F3F2EF; --mv-text-2: #B4B3AF; --mv-muted: #7A7976;
  --mv-line: rgba(243,242,239,.10); --mv-line-strong: rgba(243,242,239,.22); --mv-accent: #DABD90; --mv-on-accent: #0A0A0A;
  color: var(--mv-text);
}
