/*
 * First Digital Product Sprint Funnel — Build Desk design system
 * Warm paper, black ink, Build Red action color, restrained field notes,
 * and a practical one-task-at-a-time checkout experience.
 */
:root {
  --paper: #f6f1e8;
  --paper-deep: #ede5d8;
  --ink: #171717;
  --ink-soft: #4f4c46;
  --line: rgba(23, 23, 23, 0.18);
  --red: #e65a3e;
  --red-dark: #bd432d;
  --olive: #667059;
  --gold: #d3a550;
  --cream: #fffdf8;
  --shadow: 0 18px 40px rgba(42, 35, 26, 0.13);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.funnel-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.95);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 37px; height: 37px; object-fit: contain; }
.brand span { font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700; line-height: 1.02; letter-spacing: -0.06em; }
.header-lock, .header-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.header-back { color: var(--ink); border-bottom: 1px solid var(--ink); }

.page-wrap { position: relative; z-index: 1; }
.progress-strip { border-bottom: 1px solid var(--line); background: var(--cream); }
.progress-inner { display: flex; width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.progress-step {
  position: relative;
  flex: 1;
  padding: 14px 0 13px;
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.progress-step::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; content: ""; background: transparent; }
.progress-step.is-current { color: var(--ink); }
.progress-step.is-current::after { background: var(--red); }
.progress-step.is-done { color: var(--olive); }

.checkout-layout, .upsell-layout {
  display: grid;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  gap: clamp(38px, 7vw, 94px);
}
.checkout-layout { grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr); padding: clamp(42px, 7vw, 88px) 0 88px; align-items: start; }
.upsell-layout { grid-template-columns: minmax(0, 0.92fr) minmax(310px, 0.75fr); padding: clamp(54px, 9vw, 110px) 0 80px; align-items: center; }

.work-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px 6px;
  background: var(--ink);
  color: var(--cream);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tab-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--red); }
.eyebrow { margin: 22px 0 13px; color: var(--olive); font-family: "DM Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.eyebrow span { color: var(--red); }
.checkout-copy h1, .upsell-copy h1 { max-width: 690px; margin: 0 0 20px; font-size: clamp(3rem, 5.3vw, 5.7rem); font-weight: 790; line-height: 0.92; letter-spacing: -0.078em; }
.checkout-copy h1 em, .upsell-copy h1 em { position: relative; z-index: 1; font-family: "Source Serif 4", Georgia, serif; font-weight: 500; }
.checkout-copy h1 em::after, .upsell-copy h1 em::after { position: absolute; z-index: -1; right: -2px; bottom: -5px; left: 2px; height: 8px; content: ""; background: var(--red); transform: rotate(-1deg); }
.lede { max-width: 590px; margin: 0; color: var(--ink-soft); font-size: clamp(1.04rem, 1.5vw, 1.21rem); line-height: 1.52; }

.field-note {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  max-width: 600px;
  margin-top: 37px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.note-mark { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--olive); border-radius: 999px; color: var(--olive); font-family: "DM Mono", monospace; font-size: 11px; font-weight: 700; }
.field-note p { margin: 2px 0 0; color: var(--ink-soft); font-family: "Source Serif 4", Georgia, serif; font-size: 16px; font-style: italic; line-height: 1.35; }

.checkout-panel, .upsell-card {
  border: 1px solid var(--ink);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--red);
}
.checkout-panel { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--ink); background: var(--paper-deep); }
.panel-head strong { font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: 0.02em; }
.panel-head span { color: var(--olive); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; }
.order-line { display: grid; grid-template-columns: 1fr auto; gap: 15px; padding: 21px 20px 19px; border-bottom: 1px solid var(--line); }
.order-line h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.04em; }
.order-line p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.38; }
.price { align-self: start; font-family: "DM Mono", monospace; font-size: 20px; font-weight: 700; white-space: nowrap; }

.checkout-form { padding: 23px 20px 20px; }
.checkout-form h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.045em; }
.form-help { margin: 0 0 17px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 7px; }
.field.is-full { grid-column: 1 / -1; }
.field label { font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.03em; }
.field input { width: 100%; min-height: 46px; padding: 12px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font-size: 14px; }
.field input::placeholder { color: #98928a; }
.field input:focus { border-color: var(--ink); }

.bump-section { margin-top: 22px; border-top: 1px solid var(--ink); }
.bump-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 0 12px; }
.bump-heading h3 { margin: 0; font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.bump-heading span { color: var(--olive); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; }
.bump-card { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.bump-card input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.bump-copy strong { display: block; margin-bottom: 4px; font-size: 14px; line-height: 1.15; letter-spacing: -0.025em; }
.bump-copy p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.37; }
.bump-price { padding-top: 2px; color: var(--red); font-family: "DM Mono", monospace; font-size: 13px; font-weight: 700; white-space: nowrap; }

.total-block { display: grid; gap: 8px; margin-top: 19px; padding-top: 17px; border-top: 2px solid var(--ink); }
.total-row { display: flex; justify-content: space-between; gap: 18px; color: var(--ink-soft); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700; }
.total-row.total { margin-top: 3px; color: var(--ink); font-size: 13px; }
.total-row.total strong { font-size: 19px; }
.primary-button, .secondary-button, .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.primary-button { width: 100%; margin-top: 21px; background: var(--red); border-color: var(--red); color: var(--cream); }
.primary-button:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.primary-button:active, .secondary-button:active { transform: scale(0.97); }
.secondary-button { width: 100%; margin-top: 12px; background: transparent; color: var(--ink); }
.secondary-button:hover { background: var(--paper-deep); }
.text-link { min-height: auto; padding: 8px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); }
.text-link:hover { color: var(--red); border-color: var(--red); }
.form-footnote { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.38; }
.form-footnote b { color: var(--olive); }
.demo-notice { margin-top: 16px; padding: 11px 12px; border-left: 3px solid var(--gold); background: rgba(211, 165, 80, 0.13); color: var(--ink-soft); font-size: 11px; line-height: 1.42; }
.demo-notice strong { color: var(--ink); }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); width: min(1120px, calc(100% - 48px)); margin: 0 auto 76px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-item { min-height: 85px; padding: 21px 18px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; margin-bottom: 4px; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.04em; }
.trust-item p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.35; }

.upsell-art { position: relative; padding: 0 20px 0 0; }
.upsell-art::before { position: absolute; top: 8%; right: -20vw; bottom: -10%; left: 12%; z-index: 0; content: ""; background: var(--paper-deep); }
.upsell-art figure { position: relative; z-index: 1; margin: 0; transform: rotate(-2.4deg); box-shadow: var(--shadow); }
.upsell-art img { display: block; width: 100%; border: 10px solid var(--cream); aspect-ratio: 1.02/1; object-fit: cover; }
.upsell-note { position: absolute; z-index: 2; top: -15px; right: -2px; max-width: 150px; padding: 10px 11px; background: var(--gold); box-shadow: 4px 5px 0 var(--ink); color: var(--ink); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; line-height: 1.32; transform: rotate(5deg); }
.upsell-card { padding: 25px; }
.upsell-card .price-ribbon { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.price-ribbon span { font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.price-ribbon strong { color: var(--red); font-family: "DM Mono", monospace; font-size: 28px; }
.upsell-card h2 { margin: 0 0 12px; font-size: 27px; line-height: 0.98; letter-spacing: -0.055em; }
.upsell-card > p { margin: 0 0 19px; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.blueprint-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.blueprint-list li { display: grid; grid-template-columns: 25px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; line-height: 1.35; }
.blueprint-list b { color: var(--olive); font-family: "DM Mono", monospace; font-size: 11px; }
.decline-line { display: block; margin: 18px auto 0; color: var(--ink-soft); font-family: "DM Mono", monospace; font-size: 10px; text-align: center; }
.decline-line a { text-decoration-color: var(--ink-soft); }
.decline-line a:hover { color: var(--red); }

.footer { position: relative; z-index: 1; display: grid; justify-items: center; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 25px 0; border-top: 1px solid var(--line); gap: 7px; text-align: center; }
.footer p, .footer a { margin: 0; color: var(--ink-soft); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.02em; }
.footer .footer-product-title { color: var(--ink); font-size: 10px; text-transform: uppercase; }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--red); }

.message-box { display: none; margin: 17px 0 0; padding: 12px; border: 1px solid var(--olive); background: rgba(102, 112, 89, 0.1); color: var(--ink); font-size: 12px; line-height: 1.45; }
.message-box.is-visible { display: block; }

@media (max-width: 820px) {
  .checkout-layout, .upsell-layout { grid-template-columns: 1fr; padding-top: 44px; }
  .checkout-copy { max-width: 620px; }
  .checkout-panel { max-width: 600px; }
  .upsell-art { max-width: 600px; padding-right: 12px; }
  .upsell-card { max-width: 600px; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-item:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .header-inner, .progress-inner, .checkout-layout, .upsell-layout, .trust-strip, .footer { width: min(100% - 32px, 1120px); }
  .header-inner { min-height: 67px; }
  .header-lock { display: none; }
  .brand img { width: 33px; height: 33px; }
  .brand span { font-size: 9px; }
  .progress-step { padding: 12px 2px 11px; font-size: 8px; }
  .checkout-copy h1, .upsell-copy h1 { font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .field-grid { grid-template-columns: 1fr; }
  .field.is-full { grid-column: auto; }
  .checkout-panel, .upsell-card { box-shadow: 5px 5px 0 var(--red); }
  .panel-head, .order-line, .checkout-form, .upsell-card { padding-right: 16px; padding-left: 16px; }
  .bump-card { grid-template-columns: 25px 1fr auto; }
  .footer { justify-items: start; text-align: left; }
  .upsell-art img { border-width: 7px; }
  .upsell-note { right: -6px; }
}

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