/* Stackshift — site styles. Tokens from the Stackshift design system (dark theme). */

:root {
  --ground: #0e0e0c;
  --surface-raised: #1a1a17;
  --surface-sunken: #070706;
  --line: #2e2d28;
  --line-strong: #6b685d;
  --ink: #f4f2ea;
  --ink-muted: #a8a598;
  --signal: #ffd400;
  --on-signal: #0e0e0c;
  --signal-ink: #ffd400;
  --cut: #ff7a66;

  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius-sm: 2px;
  --radius-md: 4px;
  --container: 1200px;
  --gutter: 32px;
  --section-y: 96px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: var(--signal-ink); }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--signal); color: var(--on-signal);
  padding: 12px 16px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container { max-width: var(--container); margin: 0 auto; }
.section { padding: var(--section-y) var(--gutter); }
.section--sunken { background: var(--surface-sunken); }
.section--raised { background: var(--surface-raised); border-block: 1px solid var(--line); }

/* ---------- Type ---------- */
.eyebrow {
  margin-bottom: 8px;
  font-size: 13px; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted);
}
.display-xl {
  font-size: clamp(52px, 6.2vw, 88px); line-height: 0.95;
  font-weight: 800; letter-spacing: -0.03em; max-width: 12ch;
}
.display {
  font-size: clamp(40px, 5.5vw, 64px); line-height: 1;
  font-weight: 700; letter-spacing: -0.025em;
}
.h1 {
  font-size: clamp(36px, 4.5vw, 44px); line-height: 1.05;
  font-weight: 700; letter-spacing: -0.02em;
}
.h3 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: 20px; line-height: 1.5; color: var(--ink-muted); max-width: 34em; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.mono { font-family: var(--mono); font-size: 15px; }
.cut { color: var(--cut); }
.struck { color: var(--cut); text-decoration: line-through; }
.measure-14 { max-width: 14ch; }
.measure-16 { max-width: 16ch; }
.measure-30 { max-width: 30em; }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__word { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.mark { display: flex; flex-direction: column; gap: 3px; width: 30px; }
.mark span { display: block; width: 22px; height: 6px; background: var(--ink); }
.mark span:first-child { background: var(--signal); margin-left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 28px;
  border-radius: var(--radius-sm);
  font: 600 17px/1.2 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--sm { min-height: 44px; padding: 12px 20px; font-size: 15px; }
.btn--primary { background: var(--signal); color: var(--on-signal); border: 1px solid var(--signal); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--on-signal); }
.btn--secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 12, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--container); margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav__link { color: var(--ink-muted); text-decoration: none; }
.nav__link:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { padding: 128px var(--gutter) 96px; }
.hero__grid { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.hero__copy { flex: 1 1 560px; min-width: 0; }
.hero__copy .eyebrow { margin-bottom: 24px; }
.hero__copy .lead { margin-top: 32px; }
.hero__copy .btn-row { margin-top: 48px; }

.stack {
  flex: 0 1 420px; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 15px;
}
.stack__owned {
  margin-left: 56px; margin-bottom: 18px; height: 72px; padding: 0 20px;
  background: var(--ink); color: var(--on-signal);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.stack__owned-label { font: 700 18px/1 var(--sans); letter-spacing: -0.01em; }
.stack__owned-price { font-size: 17px; font-weight: 500; }
.stack__row {
  height: 52px; padding: 0 20px;
  background: var(--surface-raised); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.stack__row > span:first-child { color: var(--ink-muted); }
.stack__total { margin-top: 10px; padding: 0 20px; display: flex; justify-content: space-between; gap: 16px; }
.stack__total .eyebrow { margin: 0; }
.stack__note { margin-top: 8px; padding: 0 20px; font-family: var(--sans); }

/* Animate the owned bar sliding in on load */
@media (prefers-reduced-motion: no-preference) {
  .stack__owned { animation: shift-in .7s cubic-bezier(.2,.7,.2,1) .2s both; }
  .stack__row { animation: fade-up .5s ease both; }
  .stack__row:nth-child(2) { animation-delay: .30s; }
  .stack__row:nth-child(3) { animation-delay: .36s; }
  .stack__row:nth-child(4) { animation-delay: .42s; }
  .stack__row:nth-child(5) { animation-delay: .48s; }
  .stack__row:nth-child(6) { animation-delay: .54s; }
}
@keyframes shift-in { from { transform: translateX(-56px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Shift band ---------- */
.shift-band { overflow: hidden; padding-bottom: 8px; }
.shift-band div { height: 28px; }
.shift-band div:nth-child(1) { background: var(--signal); margin-left: 18%; }
.shift-band div:nth-child(2) { background: var(--ink); margin-top: 6px; margin-right: 8%; }
.shift-band div:nth-child(3) { background: var(--surface-raised); margin-top: 6px; margin-right: 8%; }

/* ---------- Grids & cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.card {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 24px;
}
.card__num { margin-bottom: 12px; color: var(--ink-muted); }
.card .h3 { margin-bottom: 8px; }

/* ---------- Receipt ---------- */
.split { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.split__a { flex: 1 1 400px; min-width: 0; }
.split__b { flex: 1 1 440px; min-width: 0; }
.split__a .muted { margin-top: 16px; }
.split__a h2 + .muted { margin-top: 24px; }

.receipt {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 32px;
  font-family: var(--mono); font-size: 15px; line-height: 1.6;
}
.receipt__block { padding: 16px 0; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.receipt__head { padding: 0 0 16px; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; }
.receipt__head .eyebrow { margin: 0; font-family: var(--sans); }
.line { display: flex; justify-content: space-between; gap: 16px; }
.line > span:first-child { min-width: 0; }
.receipt__foot { padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-end; }
.receipt__foot .eyebrow { font-family: var(--sans); }
.figure { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; color: var(--signal-ink); }
.figure-sm { font-size: 22px; line-height: 1.2; font-weight: 500; }
.text-right { text-align: right; }

/* ---------- Steps ---------- */
.step { border-top: 6px solid var(--line); padding-top: 24px; }
.step--1 { border-top-color: var(--signal); }
.step--2 { border-top-color: var(--ink); }
.step__num { margin-bottom: 8px; color: var(--ink-muted); }
.step .h3 { margin-bottom: 12px; }

/* ---------- Rules ---------- */
.rule__num { margin-bottom: 16px; color: var(--ink-muted); }
.rule__title { font-size: clamp(28px, 3vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
.rule p.muted { margin-top: 16px; }

/* ---------- Who it's for ---------- */
.spec { display: flex; flex-direction: column; }
.spec__row { display: flex; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.spec__row:last-child { border-bottom: 1px solid var(--line); }
.spec__key { font-family: var(--mono); font-size: 15px; color: var(--ink-muted); min-width: 120px; flex-shrink: 0; padding-top: 2px; }

/* ---------- Pricing ---------- */
.tier { display: flex; flex-direction: column; gap: 12px; transition: box-shadow .15s, border-color .15s; }
.tier:hover { box-shadow: 0 0 0 1px var(--line); border-color: var(--line-strong); }
.tier .eyebrow { margin: 0; }
.tier__retire { font-size: 15px; color: var(--ink-muted); }
.tier__keep { margin-top: 8px; font-family: var(--mono); font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.tier__lines { margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 15px; }
.tier__lines .line > span:first-child { color: var(--ink-muted); }

.pricing-notes { padding-top: 48px; }
.note { padding: 20px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.note .eyebrow { margin: 0; }
.pricing-fine { margin-top: 24px; }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; margin: 0 auto; }
.faq .h1 { margin-bottom: 48px; }
.faq details { border-top: 1px solid var(--line); padding: 24px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 44px;
  font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--signal-ink); }
.faq__plus { font-family: var(--mono); color: var(--ink-muted); transition: transform .15s; flex-shrink: 0; }
.faq details[open] .faq__plus { transform: rotate(45deg); }
.faq details p { margin-top: 16px; color: var(--ink-muted); max-width: 36em; }

/* ---------- Final CTA ---------- */
.cta { padding: 128px var(--gutter); background: var(--surface-sunken); position: relative; overflow: hidden; }
.cta__inner { position: relative; }
.cta .eyebrow { margin-bottom: 16px; }
.cta .display { max-width: 12ch; }
.cta .lead { margin-top: 24px; max-width: 30em; }
.cta__inner { align-items: flex-start; }
.cta__alt { margin-top: 32px; font-size: 15px; color: var(--ink-muted); }

/* ---------- Form ---------- */
.form {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-top: 6px solid var(--signal);
  border-radius: var(--radius-md); padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.form > .eyebrow { margin: 0; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field__opt { font-weight: 400; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--ground); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 400 16px/1.4 var(--sans);
}
.field textarea { resize: vertical; min-height: 112px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a598' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 2px; border-color: var(--ink);
}
.field.is-invalid input { border-color: var(--cut); }
.field__error { font-size: 14px; color: var(--cut); }
.form__submit { align-self: flex-start; }
.form__submit[disabled] { opacity: .6; cursor: wait; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--cut); }
.form__done { display: flex; flex-direction: column; gap: 12px; }
.form__done .h3 { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-sunken); padding: 40px var(--gutter); }
.site-footer__inner { max-width: var(--container); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.site-footer .brand__word { font-size: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; min-height: 44px; }
  .nav .btn { margin-top: 16px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --section-y: 64px; }
  .hero { padding: 72px var(--gutter) 64px; }
  .cta { padding: 96px var(--gutter); }
  .hero__grid, .split { gap: 48px; }
  .stack__owned { margin-left: 24px; }
  .receipt { padding: 20px; font-size: 14px; }
  .spec__row { flex-direction: column; gap: 4px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .figure { font-size: 40px; }
  .btn-row .btn { flex: 1 1 auto; }
  .form { padding: 24px 20px; }
  .form__submit { align-self: stretch; }
}
