/* Whisp subscribe — production styles ported from the design prototype */

:root {
  --accent: #16C75A;
  --ink: #0e0e10;
  --ink-2: #43433f;
  --muted: #7a7a73;
  --muted-2: #9b9b94;
  --muted-3: #9ca29c;
  --hairline: #ececea;
  --hairline-2: #e3e3e0;
  --bg: #fafaf7;
  --card: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }

.whisp-page-bg { background: var(--bg); }

/* Locked-checkout state — live page renders for marketing but Subscribe is
   replaced with this notice until LIVE_CHECKOUT_ENABLED is flipped on. */
.locked-cta {
  margin-top: 18px;
  padding: 18px 16px;
  border-radius: 12px;
  background: #f5f5f1;
  border: 1px dashed #d6d6cf;
  text-align: center;
}
.locked-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.locked-cta-sub {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.locked-cta-sub a { color: var(--ink); font-weight: 600; text-decoration: underline; }

/* Test-mode banner — only renders when body[data-mode="test"]. Sticks
   across the whole site so there's no chance of confusing test with live. */
body[data-mode="test"] { padding-top: 36px; }
body[data-mode="test"]::before {
  content: "TEST MODE — no real charges. Use Stripe test cards (e.g. 4242 4242 4242 4242).";
  position: fixed;
  inset: 0 0 auto 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #FFE066 0 12px, #FFD43B 12px 24px);
  color: #3a2a00;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 1000;
  border-bottom: 1px solid #e5b400;
  pointer-events: none;
}
.whisp-root, .whisp-root * { box-sizing: border-box; }
.whisp-root .mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 56px 80px;
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink); }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: #5a5a55; }
.nav-links a:hover { color: var(--ink); }

/* grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 880px) {
  .container { padding: 28px 22px 60px; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .nav { margin-bottom: 40px; }
}

/* shared primitives */
.whisp-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}
.whisp-divider { height: 1px; background: var(--hairline); }
.mt-22 { margin-top: 22px; margin-bottom: 14px; }
.mt-12 { margin: 12px 0; }

.whisp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hairline-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.whisp-pill .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent);
}

.hero {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin: 0;
}
.lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: 18px;
  max-width: 460px;
}

/* price card */
.price-card { padding: 24px; margin-top: 28px; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-amt { font-size: 48px; font-weight: 800; letter-spacing: -1.4px; }
.price-unit { font-size: 15px; color: var(--muted); }
.price-meta { margin-left: auto; font-size: 13px; color: var(--muted); }

.value-props {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.value-props li { display: flex; align-items: flex-start; gap: 12px; }
.vp-title { font-weight: 600; font-size: 14px; }
.vp-sub { font-size: 13px; color: var(--muted); }

.whisp-iconwrap {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklch, var(--accent) 14%, white);
  color: color-mix(in oklch, var(--accent) 65%, #062513);
  flex-shrink: 0;
}
.whisp-divider + ul.value-props { padding-top: 0; }
.price-card .whisp-divider { margin: 20px 0; }

/* Apple ID badge — small square mark + bold note */
.apple-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink);
}
.apple-chip-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  flex-shrink: 0;
}
.apple-chip-mark svg { width: 12px; height: 12px; display: block; }
.apple-chip strong { font-weight: 700; letter-spacing: -0.1px; }

/* footnote (Stripe trust line) */
.footnote {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.footnote .ico { color: var(--muted); }

/* ── Right column: checkout ─────────────────────────── */
.checkout { padding: 28px; }
.checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.checkout-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin: 0; }
.by-stripe { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.stripe-mark { font-weight: 700; color: #635BFF; letter-spacing: -0.2px; font-size: 13px; }

.field { display: block; margin-bottom: 12px; }
.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.field-head > span:first-child { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field-head .hint { font-size: 11.5px; color: var(--muted-2); }

.whisp-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hairline-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.whisp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent);
}
.whisp-input::placeholder { color: var(--muted-3); }

select.whisp-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='rgba(0,0,0,.5)' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

/* Stripe Link recognized banner */
.link-banner {
  border: 1px solid color-mix(in oklch, #00D66F 35%, white);
  background: linear-gradient(180deg, #ECFDF3, #F8FFFA);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.link-banner.is-hidden { display: none; }
.link-tag {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 6px;
  background: #00D66F;
  color: #03331A;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.2px;
  flex-shrink: 0;
}
.link-info { flex: 1; min-width: 0; }
.link-title { font-size: 13.5px; font-weight: 600; }
.link-sub {
  font-size: 12px;
  color: #3a6e4f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.link-btn:hover { background: #1c1c1f; }

/* Card field (Stripe Element preview — replaced when Elements is wired) */
.card-field {
  border: 1px solid var(--hairline-2);
  border-radius: 10px;
  background: #fff;
  padding: 0 14px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .12s, box-shadow .12s;
}
.card-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent);
}
.card-field .ico { color: var(--muted); flex-shrink: 0; }
.bare {
  border: none;
  outline: none;
  background: transparent;
  height: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.2px;
  padding: 0;
}
.brands { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.brands svg { display: block; }

.row-grid {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}
@media (max-width: 480px) {
  .row-grid { grid-template-columns: 1fr; }
}

.save-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  cursor: pointer;
  margin: 4px 0 0;
}
.save-link input { width: 16px; height: 16px; accent-color: #00D66F; }
.save-link span { font-size: 13px; color: var(--ink-2); }
.save-link strong { font-weight: 700; color: #03331A; }

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 0;
}
.totals-row.total { font-size: 15px; font-weight: 700; }
.totals-fine { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }

/* CTA */
.whisp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.1px;
  cursor: pointer;
  border: none;
  background: var(--ink);
  color: #fff;
  transition: transform .08s, background .12s, box-shadow .12s;
}
.whisp-cta:hover { background: #1c1c1f; }
.whisp-cta:active { transform: translateY(1px); }
.whisp-cta.is-accent {
  background: var(--accent);
  color: #062513;
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--accent) 60%, #000 12%);
}
.whisp-cta.is-accent:hover { background: color-mix(in oklch, var(--accent) 90%, #000 6%); }
.whisp-cta.is-block { width: 100%; }
.whisp-cta[disabled] { opacity: .6; cursor: progress; }

.whisp-cta:not(.is-block) { margin-top: 18px; }
.whisp-cta.is-block { margin-top: 18px; height: 50px; }

.finer {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}
.finer a { text-decoration: underline; }

/* Success / cancel pages reuse .whisp-card via /success and /cancel */
.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 22px;
}
.status-card {
  max-width: 440px;
  width: 100%;
  padding: 36px;
  text-align: center;
}
.status-card h1 { font-size: 28px; letter-spacing: -0.6px; margin: 12px 0 6px; }
.status-card p  { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 24px; }
.status-card .ok-mark, .status-card .x-mark {
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.status-card .ok-mark { background: color-mix(in oklch, var(--accent) 18%, white); color: var(--accent); }
.status-card .x-mark  { background: #fdecec; color: #d04141; }

/* Stack of CTAs on the success page (Open Whisp + Download Whisp) */
.status-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.status-actions .whisp-cta { margin-top: 0; }

/* Light/secondary CTA — used as the "Download Whisp" pair to the green Open. */
.whisp-cta.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--hairline);
  box-shadow: none;
}
.whisp-cta.ghost:hover { background: #fafaf7; }
