:root {
  --accent: #4F46E5;
  --accent-deep: #3730A3;
  --paper: #F8FAFC;
  --paper-2: #F1F5F9;
  --ink: #0F172A;
  --muted: #64748B;
  --rule: #E2E8F0;
  --sans: "Outfit", system-ui, sans-serif;
  --page-max: 640px;
  --stage-max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; color-scheme: light; }

::selection {
  background: var(--accent);
  color: var(--paper);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-180%);
  background: var(--accent);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
  text-decoration: none;
}

.skip:focus,
.skip:focus-visible {
  transform: none;
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

/* —— Nav —— */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 max(16px, calc((100% - var(--stage-max)) / 2 + 16px));
  background: #F8FAFC;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}

.app-nav nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}

.nav-price,
.price-chip {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-word {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.house-mark {
  display: block;
  width: 18px;
  height: auto;
  aspect-ratio: 64 / 68;
  flex-shrink: 0;
  object-fit: contain;
}

.pay-btn:focus-visible,
.sim-btn:focus-visible,
.btn-ghost:focus-visible,
.brand:focus-visible,
.store-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#top, #proof, #close, #craft, h1 {
  scroll-margin-top: 68px;
}

/* —— Hero fold: copy then large Safari stage —— */
.hero-fold {
  position: relative;
  z-index: 1;
  width: min(var(--stage-max), calc(100% - 32px));
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-copy {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 14px 6px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-copy h1 {
  font-weight: 700;
  font-size: clamp(2.35rem, 5.5vw, 3.75rem);
  letter-spacing: -0.048em;
  line-height: 0.98;
  margin: 0 0 14px;
  text-wrap: balance;
  color: var(--ink);
  max-width: 16ch;
}

.lede {
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  max-width: 44ch;
  margin: 0;
  letter-spacing: -0.012em;
}


.pain {
  margin-top: 20px;
  width: 100%;
  max-width: 44ch;
}

.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  background: #fff;
}

.pain-list li {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.pain-list li:last-child {
  border-bottom: 0;
}

.pain-list strong {
  font-weight: 600;
  color: var(--accent);
}

.solution {
  margin-top: 18px;
  max-width: 46ch;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--rule));
  border-radius: 10px;
}

.solution-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.solution-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.solution-body strong {
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.cta-hint {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  max-width: 42ch;
}

.cta-hint strong {
  font-weight: 600;
  color: var(--ink);
}

.cta-hint--on-accent {
  color: color-mix(in srgb, var(--paper) 78%, transparent);
  margin-top: 4px;
}

.cta-hint--on-accent strong {
  color: var(--paper);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  touch-action: manipulation;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--paper-2) 70%, white);
  border-color: color-mix(in srgb, var(--ink) 18%, var(--rule));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 6%, transparent);
}

.hero-cta .pay-btn {
  width: auto;
  min-width: 0;
  padding-inline: 22px;
  height: 44px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent),
    0 8px 24px color-mix(in srgb, var(--accent) 26%, transparent);
}

/* —— Product stage / Safari —— */
.product-stage {
  width: 100%;
  min-width: 0;
}

.safari {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: min(72vh, 720px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 24px 56px color-mix(in srgb, var(--ink) 10%, transparent),
    0 0 0 1px color-mix(in srgb, var(--rule) 60%, white);
}

.safari-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}

.safari-dots {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}

.safari-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 35%, var(--rule));
}

.safari-dots i:nth-child(1) { background: #E8A598; }
.safari-dots i:nth-child(2) { background: #E8C598; }
.safari-dots i:nth-child(3) { background: #98C898; }

.safari-url {
  flex: 1;
  max-width: none;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

#preview {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--paper);
  min-height: 560px;
}

/* —— Steps (not marketing bento) —— */
.steps {
  position: relative;
  z-index: 1;
  width: min(var(--stage-max), calc(100% - 32px));
  margin: 36px auto 0;
}

.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  background: #fff;
  overflow: hidden;
}

.steps-list li {
  padding: 22px 24px;
  border-right: 1px solid var(--rule);
  min-width: 0;
}

.steps-list li:last-child {
  border-right: 0;
}

.steps-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.steps-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

/* —— Close band —— */
.close-band {
  margin-top: 56px;
  padding: 64px 24px;
  background: var(--accent);
  text-align: center;
}

.close-inner {
  width: min(var(--page-max), 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.close-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

.close-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.close-band .pay-btn {
  min-width: 220px;
  margin-top: 8px;
  background: var(--paper);
  color: var(--accent);
  border-color: var(--paper);
  border-radius: 999px;
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--ink) 14%, transparent),
    0 6px 20px color-mix(in srgb, var(--ink) 12%, transparent);
}

.close-band .pay-btn:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
}

.close-band .pay-btn:active:not(:disabled) {
  background: var(--paper-2);
  border-color: var(--paper-2);
}

.close-band .pay-btn:focus-visible {
  outline-color: var(--paper);
}

.close-band .pay-btn:disabled {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid color-mix(in srgb, var(--paper) 55%, transparent);
  box-shadow: none;
  opacity: 1;
}

.status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 42ch;
}

.close-band .status {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}

.close-band .sim-btn {
  color: var(--paper);
  border-color: color-mix(in srgb, var(--paper) 45%, transparent);
}

.close-band .sim-btn:focus-visible {
  outline-color: var(--paper);
}

#dev-pay { margin-top: 4px; }

.close-band .err {
  color: #F2C4C4;
}

/* —— Footer —— */
.store-footer {
  padding: 28px 24px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.store-footer a {
  color: var(--accent);
  text-decoration: none;
}

.store-footer a:hover {
  text-decoration: underline;
}

/* —— Intake form —— */
#intake {
  position: relative;
  z-index: 1;
  background: transparent;
  margin-top: 40px;
}

.craft {
  width: min(var(--page-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 36px) 48px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.craft-head {
  margin-bottom: 28px;
}

.craft-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.craft-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

fieldset {
  border: 0;
  margin: 0 0 32px;
  padding: 0;
}

legend {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
}

label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid var(--rule);
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  border-radius: 8px;
}

input:focus,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.opt {
  font-weight: 400;
  color: var(--muted);
  text-transform: lowercase;
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.err {
  display: block;
  min-height: 0;
  font-size: 12px;
  font-weight: 400;
  color: #8B2E2E;
  margin-top: 4px;
}

.swatch-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.swatch-row input[type="text"] { margin-top: 0; }

input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

.pay-btn, .sim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  height: 44px;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
}

.pay-btn {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--accent) 88%, white),
    var(--accent)
  );
  color: var(--paper);
  border: 1px solid var(--accent-deep);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.pay-btn:hover:not(:disabled) {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--accent-deep) 88%, white),
    var(--accent-deep)
  );
  border-color: var(--accent-deep);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--ink) 14%, transparent);
}

.pay-btn:disabled {
  background: color-mix(in srgb, var(--accent) 35%, var(--paper-2));
  color: color-mix(in srgb, var(--paper) 70%, var(--muted));
  border-color: var(--rule);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.sim-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule);
}

.sim-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-ghost,
  .pay-btn { transition: none; }
}

@media (max-width: 800px) {
  .hero-fold {
    width: calc(100% - 24px);
    margin-top: 16px;
    gap: 22px;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
    max-width: none;
  }

  .hero-badge { align-self: center; }

  .hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .lede {
    max-width: 38ch;
  }

  .hero-cta {
    justify-content: center;
    width: 100%;
  }

  .cta-hint {
    text-align: center;
    max-width: 36ch;
  }

  .pain,
  .solution {
    max-width: 40ch;
    text-align: left;
    align-self: center;
  }

  .safari {
    min-height: min(62vh, 580px);
    border-radius: 10px;
  }

  #preview {
    min-height: 420px;
  }

  .steps {
    width: calc(100% - 24px);
    margin-top: 28px;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .steps-list li {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .steps-list li:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .app-nav {
    padding: 0 14px;
  }

  .hero-fold { width: calc(100% - 16px); }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn-ghost,
  .hero-cta .pay-btn {
    width: 100%;
    justify-content: center;
  }

  .steps { width: calc(100% - 16px); }
  .craft { width: calc(100% - 16px); padding: 28px 18px 36px; }
  .close-band { padding: 48px 18px; margin-top: 40px; }

  .safari,
  #preview {
    min-height: min(52vh, 460px);
  }
}
