/* ============================================================
   VantageCraft Labs — main stylesheet
   Tokens live in tokens.css. No hex values in this file.
   ============================================================ */

/* ---------- Reset-lite ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

body {
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background: var(--aubergine);
  color: var(--shell);
  -webkit-font-smoothing: antialiased;
}

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

section { scroll-margin-top: 88px; }

/* ---------- Focus (visible everywhere, AA against its surface) ---------- */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.band-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--orchid); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--shell); color: var(--ink);
  font-family: var(--mono); font-size: var(--fs-label);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Bands ---------- */
.band-dark  { background: var(--aubergine); color: var(--shell); }
.band-light { background: var(--shell); color: var(--ink); }
.band { padding: var(--section-pad) 0; }
.band-light + .band-light { padding-top: 0; }

/* ---------- Type utilities ---------- */
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.band-dark .eyebrow  { color: var(--mauve); }
.band-light .eyebrow { color: var(--peach-deep); } /* the light regions' single peach element */

h1 {
  font-family: var(--disp); font-weight: 700;
  font-size: var(--fs-h1); letter-spacing: var(--track-h1);
  line-height: var(--lh-display);
}
h2 {
  font-family: var(--disp); font-weight: 700;
  font-size: var(--fs-h2); letter-spacing: var(--track-h2);
  line-height: 1.15;
}

/* Section header: title left, lede right */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-5) var(--s-8);
  align-items: end;
  margin-bottom: var(--s-8);
}
.sec-lede { font-size: var(--fs-body); max-width: 46ch; }
.band-dark .sec-lede  { color: var(--mauve); }
.band-light .sec-lede { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--body); font-weight: 600; font-size: var(--fs-small);
  padding: 14px 28px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn-primary { background: var(--peach); color: var(--darkroom); border-color: var(--peach); }
.btn-primary:hover { background: var(--peach-deep); border-color: var(--peach-deep); transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-ghost { border-color: var(--plum); color: var(--orchid); background: transparent; }
.btn-ghost:hover { border-color: var(--peach); color: var(--peach); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--aubergine);
  border-bottom: 1px solid var(--plum);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: var(--s-5);
}
.brand {
  font-family: var(--disp); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.025em; color: var(--shell); text-decoration: none;
  white-space: nowrap;
}
.brand em { font-style: normal; color: var(--peach); transition: color var(--dur-fast) var(--ease); }

.site-nav { display: flex; align-items: center; gap: var(--s-6); }
.site-nav a:not(.btn) {
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.08em; color: var(--orchid); text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--peach); }
.nav-cta { padding: 10px 20px; }

/* One peach per screen: while the hero CTA is on screen the nav CTA stays
   ghost; once it scrolls away, the accent moves up to the nav and the
   wordmark's "Labs" steps down to orchid. */
.cta-solid .nav-cta { background: var(--peach); color: var(--darkroom); border-color: var(--peach); }
.cta-solid .nav-cta:hover { background: var(--peach-deep); border-color: var(--peach-deep); }
.cta-solid .brand em { color: var(--orchid); }

/* ---------- Hero ---------- */
.hero { padding: clamp(96px, 14vw, 176px) 0 var(--section-pad); }
.hero h1 { max-width: 22ch; text-wrap: balance; }
.hero-sub {
  color: var(--mauve); font-size: 1.125rem;
  max-width: 52ch; margin: var(--s-5) 0 var(--s-6);
}

/* ---------- What we do: numbered ledger ---------- */
.svc { list-style: none; }
.svc li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--s-4) var(--s-6);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line-l);
}
.svc li:last-child { border-bottom: 1px solid var(--line-l); }
.svc .n { font-family: var(--mono); font-size: var(--fs-label); color: var(--ink-soft); padding-top: 8px; }
.svc h3 {
  font-family: var(--disp); font-weight: 600;
  font-size: var(--fs-row); letter-spacing: -0.01em; line-height: 1.2;
}
.svc p { color: var(--ink-soft); font-size: var(--fs-small); max-width: 52ch; }

.sec-next { margin-top: var(--s-7); }
.sec-next a {
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.08em; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease), text-underline-offset var(--dur-fast) var(--ease);
}
.sec-next a:hover { color: var(--peach-deep); text-underline-offset: 6px; }

/* ---------- How we work: steps + specimen report ---------- */
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--s-8);
  align-items: start;
}
.steps { list-style: none; }
.steps li {
  display: grid; grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s-4) var(--s-5);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--plum);
}
.steps li:last-child { border-bottom: 1px solid var(--plum); }
.steps .n { font-family: var(--mono); font-size: var(--fs-label); color: var(--mauve); padding-top: 6px; }
.steps h3 { font-family: var(--disp); font-weight: 600; font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.steps p { color: var(--mauve); font-size: var(--fs-small); max-width: 56ch; }

/* The signature: a monthly-report specimen with deliberately blank numbers */
.specimen { position: relative; margin-top: var(--s-4); }
.specimen-tab {
  position: absolute; top: -22px; left: var(--s-5);
  background: var(--peach); color: var(--darkroom);
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: var(--track-label); text-transform: uppercase;
  padding: 4px 12px; border-radius: 4px 4px 0 0;
}
.specimen-panel {
  background: var(--plum);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-6) var(--s-5);
}
.specimen-head {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--orchid);
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  padding-bottom: var(--s-4); border-bottom: 1px solid var(--aubergine);
}
.specimen-rows { list-style: none; }
.specimen-rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4);
  font-family: var(--mono); font-size: 0.8125rem; color: var(--shell);
  padding: var(--s-4) 0; border-bottom: 1px solid var(--aubergine);
}
.specimen-rows li:last-child { border-bottom: none; }
.specimen-rows .blank { color: var(--orchid); }
.specimen-note { margin-top: var(--s-4); font-size: 0.875rem; color: var(--mauve); max-width: 44ch; }

/* ---------- How we think: principles ---------- */
.principles { list-style: none; counter-reset: p; }
.principles li {
  display: grid; grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s-4) var(--s-6);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line-l);
}
.principles li:last-child { border-bottom: 1px solid var(--line-l); }
.principles .n { font-family: var(--mono); font-size: var(--fs-label); color: var(--ink-soft); padding-top: 8px; }
.principles h3 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(1.25rem, 0.8vw + 1.05rem, 1.5rem);
  letter-spacing: -0.01em; margin-bottom: var(--s-2);
}
.principles p { color: var(--ink-soft); font-size: var(--fs-small); max-width: 60ch; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line-l); }
.faq details:last-child { border-bottom: 1px solid var(--line-l); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4);
  font-family: var(--disp); font-weight: 600; font-size: 1.0625rem;
  padding: var(--s-5) 0; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .mark {
  font-family: var(--mono); color: var(--ink-soft); flex: none;
  transition: transform var(--dur-fast) var(--ease);
}
.faq details[open] summary .mark { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); font-size: var(--fs-small); max-width: 62ch; padding-bottom: var(--s-5); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--darkroom); color: var(--mauve);
  padding: var(--s-8) 0;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-7);
  align-items: baseline; justify-content: space-between;
}
.footer-brand {
  font-family: var(--disp); font-weight: 700; font-size: 1.125rem;
  letter-spacing: -0.025em; color: var(--shell); text-decoration: none;
}
.footer-brand em { font-style: normal; color: var(--peach); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.footer-nav a {
  font-family: var(--mono); font-size: var(--fs-label);
  color: var(--mauve); text-decoration: none;
}
.footer-nav a:hover { color: var(--orchid); }
.footer-meta {
  flex-basis: 100%;
  font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   Motion. JS adds .motion to <html> only when the user has NOT
   asked for reduced motion — so no-JS and reduced-motion users
   see the complete site with nothing hidden and nothing moving.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
  /* Hero entrance: eyebrow → headline → sub → CTA */
  .motion .hero-seq > * { animation: rise var(--dur-hero) var(--ease) both; }
  .motion .hero-seq > :nth-child(1) { animation-delay: 0ms; }
  .motion .hero-seq > :nth-child(2) { animation-delay: 80ms; }
  .motion .hero-seq > :nth-child(3) { animation-delay: 160ms; }
  .motion .hero-seq > :nth-child(4) { animation-delay: 240ms; }

  /* Scroll reveals */
  .motion .reveal {
    opacity: 0; transform: translateY(12px);
    transition: opacity var(--dur-reveal) var(--ease),
                transform var(--dur-reveal) var(--ease);
  }
  .motion .reveal.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
  .specimen { margin-top: var(--s-6); }
}

@media (max-width: 760px) {
  .sec-head { grid-template-columns: 1fr; align-items: start; }
  .svc li { grid-template-columns: 48px minmax(0, 1fr); }
  .svc p { grid-column: 2; }
  .site-nav a:not(.btn) { display: none; } /* single-page anchors; CTA stays */
}

@media (max-width: 480px) {
  .svc li, .principles li, .steps li { grid-template-columns: 1fr; }
  .svc .n, .principles .n, .steps .n { padding-top: 0; }
  .svc p { grid-column: auto; }
  .specimen-panel { padding: var(--s-5) var(--s-4); }
  .btn { width: 100%; text-align: center; }
  .nav-cta { width: auto; }
}
