/* ————— Marveil v3 — cinematic tower ————— */
:root {
  --bg: #0D0D0D;
  --panel: #141311;
  --ivory: #F7F6F4;
  --muted: rgba(247, 246, 244, 0.62);
  --faint: rgba(247, 246, 244, 0.34);
  --gold: #C9A24A;
  --gold-hi: #E4C87F;
  --gold-deep: #8F6E2B;
  --line: rgba(201, 162, 74, 0.22);
  --line-soft: rgba(247, 246, 244, 0.09);
  --err: #D98A7C;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: #0D0D0D; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
fieldset { border: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.wrap.narrow { max-width: 880px; }

/* Grain */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 80;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* Progress hairline */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; }
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ————— Nav ————— */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.05rem var(--pad);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.nav.scrolled {
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav-brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.nav-mark { width: 22px; height: auto; flex: none; }
.nav-word {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.34em;
  font-size: 0.82rem;
  translate: 0 1px;
}
.nav-links { display: flex; align-items: center; gap: clamp(0.6rem, 1.8vw, 1.6rem); }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0.5rem;
  transition: color 0.25s ease;
}
.nav-link:hover, .nav-item.open .nav-link { color: var(--ivory); }
.nav-caret { width: 9px; transition: transform 0.25s ease; opacity: 0.6; }
.nav-item.open .nav-caret { transform: rotate(180deg); }
.nav-cta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0D0D0D;
  background: var(--gold);
  padding: 0.65rem 1.3rem;
  margin-left: 0.4rem;
  transition: background 0.25s ease;
}
.nav-cta:hover { background: var(--gold-hi); }

/* Dropdown menus — cinematic panels */
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  translate: -50% 0;
  min-width: 300px;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
}
.nav-item.open .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.nav-menu a {
  display: block;
  padding: 0.8rem 1rem;
  transition: background 0.2s ease;
}
.nav-menu a:hover { background: rgba(201, 162, 74, 0.08); }
.menu-k {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ivory);
}
.menu-d {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 7px;
}
.nav-toggle span {
  display: block; width: 26px; height: 1.5px;
  background: var(--ivory);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ————— Hero ————— */
.hero { position: relative; }
.hero-stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.52) 0%, rgba(13,13,13,0.10) 32%, rgba(13,13,13,0.12) 60%, rgba(13,13,13,0.72) 100%);
}
.hero-copy {
  position: relative;
  grid-area: 1 / 1;
  z-index: 2;
  text-align: center;
  padding-inline: var(--pad);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.hero-word {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.2rem, 12vw, 10.5rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: center;
}
.hero-word span { display: inline-block; }
.hero-tag {
  margin-top: 1.6rem;
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  color: var(--muted);
}
.hero-copy-2, .hero-copy-3 { opacity: 0; }
.hero-line {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.8rem, 4.6vw, 3.6rem);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(13, 13, 13, 0.6);
}
.hero-cue {
  position: absolute;
  bottom: 2.2rem; left: 50%;
  translate: -50% 0;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.cue-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}
.cue-line {
  width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.hero-loading {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; z-index: 3;
}
.hero-loading span {
  display: block; height: 100%;
  background: var(--gold-deep);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

/* ————— Shared sections ————— */
.section { position: relative; padding-block: clamp(6rem, 14vh, 10rem); }
.display {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: 0.005em;
  max-width: 22ch;
  margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}
.display-lg { font-size: clamp(2.4rem, 6vw, 4.8rem); max-width: 18ch; }
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--muted);
  max-width: 58ch;
}

/* ————— Quiz ————— */
.quiz { background: var(--bg); }
.quiz-lede { margin-bottom: clamp(2rem, 5vh, 3rem); }
.quiz-shell {
  border: 1px solid var(--line-soft);
  border-top: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(201, 162, 74, 0.05), transparent 40%);
  padding: clamp(1.6rem, 4vw, 3rem);
  position: relative;
}
.quiz-progress {
  position: absolute; top: -2px; left: 0; right: 0;
  height: 2px;
  background: transparent;
}
.quiz-progress-bar {
  display: block; height: 100%;
  width: 100%;
  background: var(--gold-hi);
  transform-origin: 0 50%;
  transform: scaleX(0.1667);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.quiz-step-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--faint);
  margin-bottom: 1.6rem;
}
.quiz-q {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1.6rem;
}
.quiz-textarea, .field input {
  width: 100%;
  background: rgba(247, 246, 244, 0.03);
  border: 1px solid var(--line-soft);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0;
  transition: border-color 0.3s ease;
}
.quiz-textarea { resize: vertical; min-height: 7rem; }
.quiz-textarea:focus, .field input:focus { border-color: var(--gold); outline: none; }
.quiz-chips { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip { position: relative; }
.chip input {
  position: absolute; inset: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.3rem;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
  min-height: 44px;
  display: inline-flex; align-items: center;
}
.chip:hover span { border-color: var(--line); color: var(--ivory); }
.chip input:checked + span {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: rgba(201, 162, 74, 0.08);
}
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.quiz-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.quiz-field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.quiz-err { min-height: 1.3em; margin-top: 0.8rem; font-size: 0.85rem; color: var(--err); }
.quiz-nav {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 0.6rem;
}
.quiz-back {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.9rem 0.6rem;
  transition: color 0.25s ease;
  min-height: 48px;
}
.quiz-back:hover { color: var(--ivory); }
.quiz-next, .quiz-submit {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #0D0D0D;
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.95rem 2.2rem;
  min-height: 48px;
  transition: background 0.25s ease;
}
.quiz-next:hover, .quiz-submit:hover { background: var(--gold-hi); }
.quiz-next:disabled, .quiz-submit:disabled { opacity: 0.6; cursor: default; }
.form-status { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }
.form-status.error { color: var(--err); }
.quiz-done {
  border: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.done-mark { width: 44px; margin: 0 auto 1.3rem; }
.quiz-done h3 { font-family: var(--display); font-weight: 300; font-size: 2rem; margin-bottom: 0.5rem; }
.quiz-done p { color: var(--muted); }

/* ————— Studio ————— */
.studio { background: var(--panel); }
.studio-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 62rem;
}
.studio-facts {
  list-style: none;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}
.studio-facts li {
  background: var(--panel);
  padding: 1.6rem 1.4rem;
  display: grid;
  gap: 0.5rem;
}
.fact-k {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.fact-v { font-size: 0.94rem; color: var(--muted); }

/* ————— Process (scrub) ————— */
.process { position: relative; }
.process-stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.process-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.process-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,13,13,0.82) 0%, rgba(13,13,13,0.35) 45%, rgba(13,13,13,0.15) 100%);
}
.process-copy {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: var(--pad);
  max-width: calc(var(--wrap) + 2 * var(--pad));
  margin: 0 auto;
  width: 100%;
}
.process-steps { position: relative; height: 12rem; }
.process-step {
  position: absolute; inset: 0;
  max-width: 460px;
  opacity: 0;
}
.process-step .step-n {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}
.process-step h3 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0.4rem 0 0.8rem;
}
.process-step p { color: var(--muted); max-width: 40ch; }

/* ————— Work ————— */
.work { background: var(--bg); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.6rem, 3.5vw, 2.6rem);
}
.browser-frame {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.8),
    0 8px 20px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, border-color 0.4s ease;
}
.work-card:hover .browser-frame {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow:
    0 34px 80px -24px rgba(0, 0, 0, 0.9),
    0 0 40px -18px rgba(201, 162, 74, 0.35);
}
.browser-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
.b-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(247, 246, 244, 0.18);
}
.b-url {
  margin-left: 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.browser-body { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.browser-body img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.frame-pending {
  display: none;
  position: absolute; inset: 0;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(201, 162, 74, 0.07), transparent 70%),
    var(--panel);
}
.frame-pending span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.browser-frame.pending img { display: none; }
.browser-frame.pending .frame-pending { display: grid; }
.work-meta-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem;
  margin-top: 1.2rem;
}
.work-name { font-family: var(--display); font-weight: 300; font-size: 1.7rem; }
.work-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.work-desc { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; max-width: 52ch; }

/* ————— Pricing — asymmetric split, single divider ————— */
.pricing { background: var(--panel); }
.price-split {
  display: grid;
  grid-template-columns: 1.25fr auto 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.price-divider {
  width: 1px;
  height: 100%;
  min-height: 260px;
  background: linear-gradient(180deg, var(--gold), transparent 85%);
}
.price-tier {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.price-amount {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1;
  margin-bottom: 1.6rem;
}
.price-premium .price-amount { font-size: clamp(2.2rem, 4vw, 3rem); }
.price-from, .price-cur {
  font-size: 0.42em;
  color: var(--muted);
  font-family: var(--body);
}
.price-list { list-style: none; display: grid; gap: 0.65rem; }
.price-list li {
  color: var(--muted);
  font-size: 0.97rem;
  padding-left: 1.3rem;
  position: relative;
}
.price-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 0.55rem; height: 1px;
  background: var(--gold);
}
.price-note {
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* ————— Footer ————— */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
  padding-block: clamp(4rem, 10vh, 7rem) clamp(2.5rem, 6vh, 4rem);
}
.footer-cta {
  display: grid;
  gap: 1.8rem;
  justify-items: start;
  padding-bottom: clamp(3rem, 8vh, 5rem);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.footer-cta .display { margin-bottom: 0; }
.footer-btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #0D0D0D;
  background: var(--gold);
  padding: 1.1rem 2.6rem;
  transition: background 0.25s ease;
}
.footer-btn:hover { background: var(--gold-hi); }
.footer-base { display: grid; gap: 0.9rem; justify-items: start; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--mono);
  letter-spacing: 0.34em;
  font-size: 0.82rem;
}
.footer-line { color: var(--muted); font-size: 0.92rem; }
.footer-links { font-size: 0.92rem; color: var(--muted); display: flex; gap: 0.7rem; }
.footer-links a { color: var(--gold); }
.footer-links a:hover { color: var(--gold-hi); }
.footer-copy { color: var(--faint); font-size: 0.8rem; margin-top: 1rem; }

/* ————— Mobile ————— */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 0;
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(18px);
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding-inline: 2rem;
    gap: 0.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: -1;
  }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; }
  .nav.open .nav-toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; font-size: 1rem; padding: 0.9rem 0; }
  .nav-menu {
    position: static;
    translate: none;
    transform: none;
    min-width: 0;
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    backdrop-filter: none;
    padding: 0 0 0.6rem 1rem;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-item.open .nav-menu { display: block; }
  .nav-cta { margin: 1.4rem 0 0; text-align: center; padding: 1rem; }
  .studio-cols { grid-template-columns: 1fr; }
  .studio-facts { grid-template-columns: 1fr; }
  .quiz-contact-grid { grid-template-columns: 1fr; }
  .process-shade {
    background: linear-gradient(180deg, rgba(13,13,13,0.75) 0%, rgba(13,13,13,0.35) 55%, rgba(13,13,13,0.65) 100%);
  }
  .price-split { grid-template-columns: 1fr; }
  .price-divider { width: 100%; height: 1px; min-height: 0; background: linear-gradient(90deg, var(--gold), transparent 85%); }
}

/* ————— Reduced motion ————— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-cue .cue-line { display: none; }
}
