/* Macrobase — one pager
   Palette: cream from the logo, ink, one violet accent.
   Type: Fraunces (display) + Geist (text). */

:root {
  --bg: #F8F6F0;
  --bg-2: #F0EDE5;
  --ink: #1A1A19;
  --ink-2: #67655F;
  --ink-3: #9C9991;
  --line: rgba(26, 26, 25, .12);
  --accent: #5B4FE6;
  --accent-ink: #4A3ED6;
  --accent-soft: #ECEAFB;
  --radius: 28px;
  --radius-sm: 18px;
  --nav-h: 72px;
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(96px, 12vw, 176px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px;
  font-size: .875rem; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- Display type ---------- */
.hero__title, .h2, .statement__title, .pricing__title, .closing__title, .sheet__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 40, 'WONK' 0;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

/* ---------- Mark ---------- */
.mark { display: block; width: 34px; height: auto; color: var(--ink); }
.mark--sm { width: 22px; }
.mark--big { width: clamp(88px, 11vw, 140px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  transition: background .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(248, 246, 240, .82);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--line);
}
.nav__row { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { display: block; color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font: 500 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { height: 40px; padding: 0 18px; font-size: .9375rem; }
.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-ink); }
.btn__arrow { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.lang {
  height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 500 .875rem/1 var(--font-body); letter-spacing: .04em; cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.lang:hover { border-color: var(--ink); }

.link {
  color: var(--ink); text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color .25s var(--ease), background-size .3s var(--ease);
}
.link:hover { color: var(--accent); }
.link--quiet { color: var(--ink-2); background-size: 0 1px; }
.link--quiet:hover { color: var(--ink); background-size: 100% 1px; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 22px; font: 500 .875rem/1.4 var(--font-body); color: var(--ink-2);
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--nav-h) + clamp(40px, 8vh, 88px)); }
.hero__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.hero__eyebrow { animation: rise .9s var(--ease) .05s both; }
.hero__title {
  font-size: clamp(2.9rem, 7vw, 6.25rem);
  line-height: 1;
  max-width: 11ch;
  margin-bottom: 28px;
  animation: rise 1s var(--ease) .15s both;
}
.hero__media { animation: rise 1s var(--ease) .45s both; }
.hero__title em { font-style: italic; color: var(--accent); font-variation-settings: 'opsz' 144, 'SOFT' 70, 'WONK' 1; }
.hero__sub {
  margin: 0 0 40px;
  font-size: clamp(1.125rem, 2vw, 1.5rem); color: var(--ink-2);
  animation: rise .9s var(--ease) .3s both;
}
.hero__actions {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  animation: rise .9s var(--ease) .42s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Image slots (your visuals go here) ---------- */
.slot {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius);
  background: radial-gradient(120% 90% at 25% 15%, #F4F1EA 0%, var(--bg-2) 70%);
  border: 1px solid var(--line);
  aspect-ratio: 2 / 1;
  transform: translateZ(0);
}
.slot--portrait { aspect-ratio: 4 / 5; }
.slot--case { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); }
.slot--wide { aspect-ratio: 16 / 10; }
.slot__media { position: absolute; inset: -7%; will-change: transform; }
.slot__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot::after {
  content: attr(data-label);
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 400 .8125rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink-3); letter-spacing: .02em; white-space: nowrap; pointer-events: none;
}
.slot.is-loaded::after { display: none; }
.slot.is-loaded { border-color: transparent; }

/* ---------- Statement ---------- */
.statement { padding: var(--section) 0 calc(var(--section) * .6); }
.statement__title {
  text-align: center;
  font-size: clamp(2.25rem, 6vw, 5.25rem);
  line-height: 1.08;
}
.statement__a { color: var(--ink-3); }
.statement__b { color: var(--ink); }

/* ---------- Sections ---------- */
.who, .how, .work, .pricing { padding: calc(var(--section) * .7) 0; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.h2 { font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.06; margin-bottom: 24px; max-width: 18ch; }
.lead { margin: 0; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }

.who__text { grid-column: 1 / 6; }
.who__media { grid-column: 7 / 13; }

/* Steps — a real sequence, so the numbers mean something */
.steps {
  list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px);
}
.step { border-top: 1px solid var(--ink); padding-top: 20px; }
.step__n {
  display: block; margin-bottom: 40px;
  font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 1.25rem;
  font-variation-settings: 'opsz' 48, 'SOFT' 70, 'WONK' 1;
  color: var(--accent);
}
.step__t { margin: 0 0 10px; font: 500 1.125rem/1.3 var(--font-body); }
.step__d { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }

/* Cases — each card opens a sheet with the breakdown */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); margin-top: clamp(40px, 6vw, 72px); }
.case { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.case .slot { transition: border-color .4s var(--ease); }
.case .slot__media img { transition: transform 1s var(--ease); }
.case:hover .slot { border-color: rgba(26, 26, 25, .28); }
.case:hover .slot__media img { transform: scale(1.03); }
.case__meta { padding: 20px 4px 0; }
.case__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.case__t { margin: 0 0 4px; font: 500 1.125rem/1.3 var(--font-body); }
.case__go {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink);
  display: grid; place-items: center;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.case__go svg { width: 16px; height: 16px; }
.case:hover .case__go { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateX(2px); }
.case__c { margin: 0 0 10px; font-size: .9375rem; color: var(--ink-3); }
.case__d { margin: 0; color: var(--ink-2); }

/* Sheet (case breakdown) */
.sheet {
  border: 0; padding: 0; margin: auto;
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  background: var(--bg); color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 32px 90px rgba(26, 26, 25, .22);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheetIn .5s var(--ease); }
.sheet::backdrop { background: rgba(26, 26, 25, .32); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet[open]::backdrop { animation: fadeIn .4s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet__close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(248, 246, 240, .92); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.sheet__close svg { width: 16px; height: 16px; }
.sheet__close:hover { background: var(--ink); color: var(--bg); }
.sheet__body { overflow: auto; padding: clamp(16px, 2.5vw, 24px) clamp(20px, 4vw, 44px) clamp(28px, 4vw, 44px); }
.slot--sheet { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); margin-bottom: 28px; }
.sheet__title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.08; margin-bottom: 28px; }
.sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 28px; }
.sheet__label { margin: 0 0 8px; font-size: .8125rem; font-weight: 500; color: var(--ink-3); }
.sheet__text { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }
.chips { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .8125rem; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
body.is-locked { overflow: hidden; }

/* Pricing — the one place the accent spreads */
.pricing__card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--accent-soft);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(56px, 9vw, 128px) var(--gutter);
}
.pricing__title { font-size: clamp(2.25rem, 5.5vw, 4.75rem); line-height: 1.04; margin-bottom: 20px; }
.pricing__text { margin: 0 0 36px; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 40ch; }

/* Closing */
.closing { padding: var(--section) 0; }
.closing__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing__title { font-size: clamp(2.75rem, 9vw, 8.25rem); line-height: 1; letter-spacing: -.025em; margin: 40px 0 44px; }
.closing__actions { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.closing__or { margin: 0; font-size: .9375rem; color: var(--ink-2); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer__row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.footer__copy { margin: 0 0 0 auto; font-size: .875rem; color: var(--ink-3); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* The mark draws itself: nav on load, closing on scroll */
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.draw-dot { opacity: 0; }
.in .draw { animation: draw 1.3s var(--ease) forwards; }
.in .draw--2 { animation-delay: .3s; }
.in .draw-dot { animation: fade .4s var(--ease) 1.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow, .hero__title, .hero__sub, .hero__actions { animation: none; }
  .draw { stroke-dashoffset: 0; animation: none; }
  .draw-dot { opacity: 1; animation: none; }
  .slot__media { transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .who__text, .who__media { grid-column: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: 1fr; }
  .h2 { max-width: none; }
}
@media (max-width: 560px) {
  :root { --nav-h: 64px; --radius: 20px; --radius-sm: 14px; }
  .steps { grid-template-columns: 1fr; }
  .step__n { margin-bottom: 20px; }
  .hero__actions { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero__eyebrow { font-size: .8125rem; }
  .sheet__grid { grid-template-columns: 1fr; }
  .sheet { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .footer__row { gap: 16px; }
  .footer__copy { margin-left: 0; width: 100%; }
}
