@import url("tokens.css");

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--metal-ink);
  background: var(--metal);
  font-family: var(--font-body);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus { left: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Bar */

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--metal-line);
}

.wordmark {
  color: var(--metal-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bar-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.bar-link { color: var(--metal-muted); }

.bar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* Hero: copy on the left, the working sample desk on the right. */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 72px;
}

@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.hero h1 {
  margin: 0;
  color: var(--metal-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 4.6vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  max-width: 30em;
  margin: 22px 0 0;
  color: var(--metal-muted);
  font-size: 1.125rem;
  line-height: 1.5;
}

.hero-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 32px;
}

.offer-price {
  margin: 0;
  color: var(--metal-muted);
  font-size: 1rem;
}

.offer-price b {
  color: var(--metal-ink);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
}

a.primary,
button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: var(--touch);
  padding: 0 18px;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary:disabled { opacity: 0.6; cursor: progress; }

.fine {
  margin: 14px 0 0;
  color: var(--metal-muted);
  font-size: var(--text-ui);
  line-height: 1.45;
}

/* The sample desk. Same chrome and marks as the real desk. */

.stage {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 18px 36px var(--shadow);
}

.stage-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--metal-panel);
  color: var(--metal-ink);
  border-bottom: 1px solid var(--metal-line);
  border-radius: var(--radius) var(--radius) 0 0;
}

.stage-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stage-search {
  flex: 1;
  max-width: 260px;
  margin: 0 auto;
  padding: 4px 10px;
  color: var(--metal-muted);
  border: 1px solid var(--metal-line);
  border-radius: 999px;
  font-size: var(--text-meta);
}

.stage-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--metal);
  border: 1px solid var(--metal-line);
  border-radius: 50%;
  font-size: 11px;
}

.stage-rail {
  display: flex;
  padding: 0 8px;
  overflow-x: auto;
  background: var(--paper-strong);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.stage-rail::-webkit-scrollbar { display: none; }

.stage-rail > span {
  position: relative;
  flex: 1 0 auto;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.stage-rail > .on {
  color: var(--ink);
  font-weight: 600;
}

.stage-rail > .on::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: 0;
  left: 18%;
  height: 3px;
  background: var(--orange);
}

.stage-body { padding: 24px 28px 22px; }

.stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.stage-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.stage-count {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-ui);
}

.stage-count b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.stage-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-card);
}

.stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 76px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.stage-row:first-child { border-top: 0; }

.stage-row.is-next { box-shadow: inset 3px 0 var(--orange); }

.row-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.row-window {
  color: var(--muted);
  font-size: var(--text-meta);
}

.row-text b {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.row-hint {
  color: var(--ink-soft);
  font-size: 13px;
}

.row-hint:empty { display: none; }

.row-action {
  min-width: 124px;
  min-height: var(--touch);
  padding: 0 14px;
  color: var(--action-text);
  background: var(--action-fill);
  border: 1px solid var(--action-fill);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--text-ui);
  font-weight: 700;
  cursor: pointer;
}

.row-action:hover { background: var(--action-hover); }

.stage-row:not(.is-next) .row-action {
  color: var(--ink);
  background: var(--paper-strong);
  border-color: var(--line-dark);
}

.stage-row:not(.is-next) .row-action:hover { background: var(--paper-hover); }

.stage-row.is-done { grid-template-columns: minmax(0, 1fr) auto; }

.stage-row.is-done .row-text b {
  color: var(--muted);
  font-weight: 400;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--orange-dark);
  background: var(--orange-wash);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.chip-plain {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
}

.chip-done {
  color: var(--green);
  background: var(--green-wash);
  border: 1px solid var(--pass-line);
}

.stage figcaption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--text-ui);
  line-height: 1.45;
}

.stage figcaption a { color: var(--ink); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .stage-row { transition: background-color 240ms ease; }
  .stage-row.just-done { background: var(--green-wash); }
}

/* Window glyphs: the same five the desk draws. One-off icons, no new tokens. */
.icon { position: relative; width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.icon::before, .icon::after { content: ""; position: absolute; }
.icon-users::before { top: 3px; left: 3px; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-users::after { right: 2px; bottom: 3px; width: 12px; height: 8px; border: 1.5px solid currentColor; border-radius: 8px 8px 2px 2px; }
.icon-megaphone::before { top: 5px; left: 3px; width: 11px; height: 9px; border: 1.5px solid currentColor; transform: skewY(-18deg); }
.icon-megaphone::after { right: 2px; bottom: 2px; width: 5px; height: 1.5px; background: currentColor; transform: rotate(68deg); }
.icon-chart::before { bottom: 3px; left: 3px; width: 14px; height: 11px; border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; }
.icon-chart::after { bottom: 7px; left: 6px; width: 10px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: skewY(-32deg); }
.icon-radar::before { top: 3px; left: 3px; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-radar::after { top: 4px; left: 10px; width: 1.5px; height: 13px; background: currentColor; transform: rotate(45deg); transform-origin: center; }
.icon-bank::before { top: 4px; left: 2px; width: 16px; height: 8px; border: 1.5px solid currentColor; transform: perspective(25px) rotateX(25deg); }
.icon-bank::after { bottom: 3px; left: 3px; width: 14px; height: 1.5px; background: currentColor; box-shadow: 3px -5px 0 -0.2px currentColor, 7px -5px 0 -0.2px currentColor, 11px -5px 0 -0.2px currentColor; }

/* Sections alternate paper and metal. */

.inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 28px 72px;
}

.paper {
  background: var(--paper);
  color: var(--ink);
}

main h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

main h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.section-lede {
  max-width: 36em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

/* How it works: a real sequence, so it is numbered. */

.steps {
  display: grid;
  gap: 0;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
}

.steps p {
  max-width: 24em;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}

/* Five windows */

.windows ul {
  display: grid;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.windows li {
  padding: 20px 0;
  border-top: 1px solid var(--metal-line);
}

.windows h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.windows p {
  margin: 8px 0 0;
  color: var(--metal-muted);
  line-height: 1.45;
}

@media (min-width: 900px) {
  .windows ul { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  .windows li {
    padding: 22px 18px 26px;
    border-left: 1px solid var(--metal-line);
  }

  .windows li:first-child { border-left: 0; padding-left: 0; }

  .windows h3 { font-size: 1.15rem; }
}

/* Where gtmdesk fits */

.table-wrap {
  margin-top: 32px;
  overflow-x: auto;
}

.fit table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--text-body);
}

.fit th,
.fit td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.fit thead th {
  color: var(--muted);
  font-size: var(--text-ui);
  font-weight: 600;
}

.fit tbody th { font-weight: 400; }

.fit td { color: var(--ink-soft); }

.fit .us {
  color: var(--ink);
  background: var(--paper-strong);
  font-weight: 700;
}

.fit thead .us {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* Plans */

.plan-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.plan-note {
  margin: 12px 0 0;
  color: var(--metal-muted);
}

.toggle button {
  min-height: var(--touch);
  padding: 0 14px;
  background: transparent;
  color: var(--metal-muted);
  border: 1px solid var(--metal-line);
  font: inherit;
  cursor: pointer;
}

.toggle button.on {
  background: var(--paper);
  color: var(--ink);
}

.cards {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 800px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  position: relative;
  display: block;
  padding: 20px;
  border: 1px solid var(--metal-line);
  background: var(--metal-panel);
  cursor: pointer;
}

.card:has(input:checked) { outline: 2px solid var(--orange); }

.card:has(input:focus-visible) { outline: 2px solid var(--focus); }

.card:hover { border-color: var(--metal-border); }

.card input { position: absolute; opacity: 0; }

.card p {
  margin: 10px 0 0;
  color: var(--metal-muted);
  line-height: 1.45;
}

.card .price { color: var(--metal-ink); }

.price b {
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.checkout {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--metal-line);
  background: var(--metal-panel);
}

.checkout label { display: grid; gap: 6px; }

.checkout input {
  min-height: var(--touch);
  padding: 0 12px;
  background: var(--metal);
  color: var(--metal-ink);
  border: 1px solid var(--metal-line);
  font: inherit;
}

.checkout .primary { justify-self: start; }

.checkout-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--paper);
  border-left: 3px solid var(--orange);
}

.checkout-note[hidden] { display: none; }

/* Questions */

.faq dl {
  display: grid;
  gap: 0 48px;
  margin: 32px 0 0;
}

.faq dl > div {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.faq dt {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.faq dd {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

@media (min-width: 900px) {
  .faq dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px;
}

.foot nav {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--metal-muted);
}

/* Sign in, terms, privacy */

.signin {
  max-width: 440px;
  margin: 0;
  padding: 48px 40px 72px;
}

.signin h1 {
  margin: 0 0 28px;
  color: var(--metal-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 4.2vw, 3.7rem);
  line-height: 0.98;
}

.signin a { color: var(--metal-ink); }

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 28px 80px;
  line-height: 1.6;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1;
}

.doc h2 {
  margin: 36px 0 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.doc p,
.doc li { color: var(--metal-muted); }

.doc a { color: var(--metal-ink); }

@media (max-width: 800px) {
  .bar { padding: 0 20px; }

  .bar-nav { gap: 14px; }

  .bar-nav .bar-link[href^="#"] { display: none; }

  .bar-cta { padding: 0 12px; }

  .hero { gap: 36px; padding: 40px 20px 48px; }

  .hero h1 { font-size: 2.65rem; }

  .stage-body { padding: 16px; }

  .stage-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .stage-row .row-action { grid-column: 1 / -1; width: 100%; }

  .inner { padding: 44px 20px 52px; }

  .signin { padding: 36px 20px 56px; }
}
