/* ==========================================================================
   TwistedWave — desktop subscription / order page.
   Design tokens come from site-new.css. The .plans / .price-row / discount-
   toggle classes (.withdiscount, .withaddondiscount, .nodiscountdim,
   .nodiscount, .discount, .addon-discount) are wired to order_desktop.js:
   restyle here, do NOT restructure them.
   ========================================================================== */

/* Light page so the white cards lift (order page only — this file is page-scoped) */
.app-main { background: var(--surface-alt); }
.app-main > .container { max-width: 880px; }

/* ---- Header ------------------------------------------------------------- */
.order-head { max-width: 620px; margin: 0 auto clamp(30px, 5vw, 48px); text-align: center; }
.order-head h1 { font-size: clamp(2rem, 4.6vw, 2.95rem); letter-spacing: -.025em; margin: 0 0 .35em; }
.order-head .lead { font-size: 1.14rem; color: var(--muted); margin: 0 auto; max-width: 30em; }
.order-wave { display: block; width: min(300px, 72%); height: 26px; margin: 22px auto 0; color: var(--accent); opacity: .4; }
.order-wave path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }

/* ---- Pricing plans ------------------------------------------------------ */
.plans {
  display: flex; flex-wrap: wrap; gap: 22px; justify-content: center;
  align-items: stretch; max-width: 720px; margin: 0 auto;
}
.plan {
  flex: 1 1 300px; max-width: 348px;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 28px 26px 24px; box-shadow: var(--shadow-sm); position: relative;
}
.plan.yearly { border: 2px solid var(--accent); box-shadow: 0 28px 56px -26px rgba(19, 131, 224, .5); }
.plan.yearly::before {
  content: "Best value";
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 15px; border-radius: 999px; white-space: nowrap;
}
.planhead { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin: 0 0 16px; letter-spacing: -.01em; }

.price-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 11px 0; border-top: 1px solid var(--border);
}
.planhead + .price-row { border-top: 0; padding-top: 2px; }
.desc { color: var(--muted); font-size: .92rem; line-height: 1.3; }
.price { text-align: right; white-space: nowrap; }
.gross { font-weight: 700; color: var(--ink); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.planhead + .price-row .gross { font-size: 2.35rem; letter-spacing: -.02em; line-height: 1.05; }
.vat { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px; }
.addon-discount .desc { line-height: 1.25; }

.bottom { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.buy-button { width: 100%; }

/* discount toggling — logic preserved from the original */
.withdiscount .nodiscount { display: none; }
.withdiscount .nodiscountdim { opacity: .35; }
.addon-discount { display: none; }
.withaddondiscount .addon-discount { display: flex; }
.withaddondiscount .nodiscountdim { display: none; }
.discount { display: none; }
.withdiscount .discount { display: unset; }

/* With a discount, the per-year rate is what the customer actually pays, so
   make it the headline and shrink the (dimmed) first-year rate. The per-year
   row is the one prog-discount row that isn't dimmed. */
.withdiscount .yearly .planhead + .price-row .gross { font-size: 1.1rem; letter-spacing: 0; line-height: 1.2; }
.withdiscount .yearly .price-row.prog-discount:not(.nodiscountdim) .gross { font-size: 2.35rem; letter-spacing: -.02em; line-height: 1.05; }

.plans-note { max-width: 580px; margin: 24px auto 0; text-align: center; font-size: .92rem; color: var(--muted); }

/* ---- Reusable section --------------------------------------------------- */
.order-section { max-width: 760px; margin: clamp(48px, 7vw, 78px) auto 0; }
.order-section > h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-align: center; margin: 0 0 .35em; letter-spacing: -.01em; }
.order-section > .lead { text-align: center; color: var(--muted); margin: 0 auto clamp(22px, 3vw, 30px); max-width: 36em; }

/* Video & Speech add-ons */
.vands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.vands-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 20px; }
.vands-card h3 { margin: 0 0 .35em; font-size: 1.1rem; }
.vands-card p { margin: 0; color: var(--body); font-size: .95rem; }
.vands-ico {
  display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(19, 131, 224, .1); color: var(--accent); margin-bottom: 14px;
}
.vands-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vands-actions { text-align: center; margin-top: 24px; }

/* Upgrade callout */
.upgrade {
  max-width: 600px; margin: clamp(48px, 7vw, 78px) auto 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(26px, 4vw, 36px);
}
.upgrade > h2 { font-size: 1.4rem; margin: 0 0 .35em; text-align: left; }
.upgrade > .lead { text-align: left; max-width: none; color: var(--muted); margin: 0 0 18px; }
.upgrade__field { display: flex; align-items: center; gap: 12px; }
#serial-input {
  flex: 1 1 auto; min-width: 0;
  font: 1rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-alt); color: var(--ink);
}
#serial-input::placeholder { color: var(--muted); }
#serial-input:focus { outline: 3px solid var(--accent-bright); outline-offset: 1px; border-color: var(--accent); background: #fff; }
.upgrade .alert { margin: 16px 0 0; }

/* Fallback */
.fallback ul { max-width: 640px; margin: 0 auto; padding-left: 1.2em; }
.fallback li { margin: .5em 0; color: var(--body); }
