:root {
  --bg: #fbfaf7;
  --tint: #f3f1ec;
  --ink: #16181d;
  --muted: #5d616b;
  --line: #e4e1da;
  --accent: #3b3fb6;      /* indigo: links, buttons, second ring */
  --accent-ink: #2e318f;
  --saffron: #f0a03c;     /* the "infusion" overlap */
  --radius: 14px;
  --wrap: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, 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: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

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

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

.eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.link-arrow {
  font-weight: 500; text-decoration: none; display: inline-flex; gap: 6px; align-items: center;
  padding: 12px 4px;
}
.link-arrow span { transition: transform .25s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 32px; height: 32px; }
.brand__mark circle { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.brand__mark .lens { fill: var(--saffron); }
.brand__word { font-weight: 600; font-size: 20px; letter-spacing: -0.03em; }
.nav__links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; color: var(--muted); font-size: 15px; position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 48px;
  padding: clamp(56px, 10vw, 120px) 0 clamp(64px, 10vw, 128px);
}
.hero__title { font-size: clamp(40px, 6vw, 72px); max-width: 13ch; }
.hero__title em { color: var(--accent); }
.hero__lede { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 46ch; }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }

.hero__art { margin: 0; }
.hero__art svg { width: 100%; height: auto; overflow: visible; }
.art__ring { fill: none; stroke-width: 1.6; }
.art__ring--a { stroke: var(--ink); }
.art__ring--b { stroke: var(--accent); }
.art__lens { fill: var(--saffron); }
.art__label { font: 500 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); }

/* Hero choreography: two circles drift together, then the overlap fills in */
.js .art { animation: float 7s ease-in-out 2.4s infinite; }
.js .art__ring--a { animation: drift-a 1.6s var(--ease) .3s both; }
.js .art__ring--b { animation: drift-b 1.6s var(--ease) .3s both; }
.js .art__lens { transform-origin: 200px 150px; animation: lens-in .9s var(--ease) 1.5s both; }
.js .art__label { animation: fade-in .8s ease .6s both; }
@keyframes drift-a { from { transform: translateX(-70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drift-b { from { transform: translateX(70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes lens-in { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { scroll-margin-top: 64px; padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--tint); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(30px, 4vw, 46px); }
.section__sub { margin-top: 14px; color: var(--muted); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.step { padding: 8px 32px 8px 0; border-left: 1px solid var(--line); padding-left: 28px; }
.step:first-child { border-left: 0; padding-left: 0; }
.step__num { display: block; font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--accent); margin-bottom: 20px; }
.step h3 { font-size: 22px; margin-bottom: 12px; }
.step p { color: var(--muted); }
.note { margin-top: 56px; padding-top: 24px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 15px; }

/* Two sides */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.side {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.side:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(22, 24, 29, .25); }
.side h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 14px; }
.side p:last-child { color: var(--muted); }

/* Work ledger */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.row {
  display: grid; grid-template-columns: 220px 260px 1fr; gap: 24px; align-items: baseline;
  padding: 26px 8px; border-bottom: 1px solid var(--line);
  position: relative; transition: padding-left .35s var(--ease);
}
.row::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--saffron); transform: scale(0); transition: transform .35s var(--ease);
}
.row:hover { padding-left: 28px; }
.row:hover::before { transform: scale(1); }
.row__sector { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row__fig { font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; letter-spacing: -0.02em; }
.row__fig small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.row__text { color: var(--muted); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.faq .section__head { margin-bottom: 0; }
.faq__list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 19px; font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
summary::after, summary::before {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 1.6px; background: var(--ink);
  transition: transform .3s var(--ease);
}
summary::before { transform: rotate(90deg); }
details[open] summary::before { transform: rotate(0); }
.faq__body { padding: 0 40px 24px 0; color: var(--muted); }
details[open] .faq__body { animation: slide-down .35s var(--ease); }
@keyframes slide-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Contact */
.contact { text-align: center; }
.contact .eyebrow { margin-bottom: 20px; }
.contact__title { font-size: clamp(32px, 5vw, 56px); max-width: 18ch; margin-inline: auto; }
.contact__row { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 20px; }
.contact__email {
  font-size: clamp(20px, 3vw, 30px); font-weight: 500; text-decoration: none; color: var(--accent-ink);
  background: linear-gradient(var(--saffron), var(--saffron)) left bottom / 0 3px no-repeat;
  padding-bottom: 4px; transition: background-size .4s var(--ease);
  overflow-wrap: anywhere;
}
.contact__email:hover { background-size: 100% 3px; }
.contact__hint { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Email chooser */
.mailer {
  width: min(100% - 32px, 380px); padding: 28px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(22, 24, 29, .45);
}
.mailer[open] { animation: pop .35s var(--ease); }
.mailer::backdrop { background: rgba(22, 24, 29, .35); backdrop-filter: blur(3px); }
.mailer[open]::backdrop { animation: fade-in .3s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.mailer h2 { font-size: 24px; }
.mailer__to { margin-top: 6px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.mailer__close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.mailer__close {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.mailer__close:hover { background: var(--tint); color: var(--ink); }
.mailer__options { margin-top: 22px; display: grid; gap: 8px; }
.mailer__opt {
  display: flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 500 16px var(--sans); text-decoration: none; text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.mailer__opt::after { content: "→"; margin-left: auto; color: var(--muted); transition: transform .25s var(--ease); }
.mailer__opt:hover { border-color: var(--ink); background: var(--tint); }
.mailer__opt:hover::after { transform: translateX(3px); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 15px;
  width: max-content; max-width: calc(100% - 32px); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Scroll reveal (only when JS is running, so content is never hidden without it) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row__text { grid-column: 1 / -1; }
  .faq { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 820px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .hero__art { order: -1; max-width: min(300px, 80vw); width: 100%; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .step, .step:first-child { border-left: 0; padding: 0 0 0 0; }
  .sides { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav__inner { height: 64px; }
  .brand__word { font-size: 18px; }
  .row { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .row:hover { padding-left: 0; }
  .row::before { display: none; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .contact__row .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
