/* LYV checkout design system — mirrors the Founders VSL page.
   Theme tokens live in :root; restyling the checkout means editing this block. */
:root {
  --ink: #171b23;
  --slate: #232833;
  --bone: #f4f5f7;
  --bone2: #e9ecf0;
  --paper: #ffffff;
  --text: #171b23;
  --muted: #5b606b;
  --line: #d9dde3;
  --text-inv: #f4f5f7;
  --muted-inv: #a9aeb8;
  --line-inv: rgba(255, 255, 255, 0.12);
  --blue: #1372d3;
  --blue-hover: #0f5fb0;
  --blue2: #3b85ff;
  --pale: #b3ccff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-line: #fecdca;
  --ok: #067647;
  --r: 6px;
  --r-card: 10px;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
.num { font-variant-numeric: tabular-nums; }

/* Header + wordmark */
.hdr {
  position: sticky; top: 0; z-index: 20; height: 60px;
  background: rgba(23, 27, 35, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-inv);
}
.hdr .in {
  height: 100%; width: min(1120px, 100% - 2.5rem); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.wm { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; color: #fff; }
.wm .l { font-family: var(--body); font-weight: 300; font-size: 1.4rem; letter-spacing: 0.32em; display: inline-flex; }
.wm .y { position: relative; }
.wm .y::before { content: ""; position: absolute; left: 0.06em; right: 0.38em; top: -0.16em; height: 0.08em; background: currentColor; }
.wm .s { font-size: 0.48rem; letter-spacing: 0.28em; font-weight: 500; margin-top: 0.35em; color: var(--muted-inv); white-space: nowrap; }
.hdr .secure { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted-inv); font-size: 0.8rem; }
.hdr .secure svg { width: 14px; height: 14px; }

/* Type */
.eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--blue); margin: 0 0 0.6rem; }
.on-dark .eyebrow { color: var(--pale); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 em, h2 em { color: var(--blue); font-style: italic; }
.on-dark h1 em, .on-dark h2 em { color: var(--pale); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.4rem; border-radius: var(--r); border: 1px solid transparent;
  font: 600 0.98rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--pale); outline-offset: 2px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); }
.btn-primary[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Checkout layout: order summary (ink) + form (bone) */
.checkout { display: grid; min-height: calc(100vh - 60px); }
@media (min-width: 960px) {
  .checkout { grid-template-columns: minmax(380px, 44%) 1fr; }
}
.summary { background: var(--ink); color: var(--text-inv); padding: 2rem 1.25rem; }
.summary .in { max-width: 30rem; margin-inline: auto; }
@media (min-width: 960px) {
  .summary { padding: 4rem 3rem; }
  .summary .in { position: sticky; top: calc(60px + 4rem); margin: 0 0 0 auto; }
}
.summary .tier { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--pale); }
.summary .price { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.2rem); letter-spacing: -0.02em; line-height: 1; margin: 0.6rem 0 0.2rem; }
.summary .price small { font-family: var(--body); font-size: 0.95rem; color: var(--muted-inv); letter-spacing: 0; }
.summary .credit { background: rgba(255,255,255,.06); border: 1px solid var(--line-inv); border-radius: var(--r); padding: 0.75rem 0.9rem; font-weight: 600; font-size: 0.95rem; margin: 1.25rem 0; }
.summary ul.feat { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: 0.6rem; }
.summary ul.feat li { position: relative; padding-left: 1.2rem; color: #d6dae2; font-size: 0.95rem; }
.summary ul.feat li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue2); }
.rows { border-top: 1px solid var(--line-inv); }
.rows .row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line-inv); font-size: 0.95rem; }
.rows .row span:first-child { color: var(--muted-inv); }
.rows .row span:last-child { color: #fff; font-weight: 600; }
.rows .row.total span:first-child { color: #fff; font-weight: 600; }
.rows .row.total span:last-child { font-family: var(--display); font-weight: 500; font-size: 1.45rem; color: var(--pale); }
.summary .fine { color: var(--muted-inv); font-size: 0.82rem; margin: 1rem 0 0; }

/* Mobile: collapsible summary */
.sum-toggle { display: none; }
@media (max-width: 959px) {
  .summary { padding: 0; }
  .sum-toggle {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--ink); color: #fff; border: 0; padding: 1rem 1.25rem; font: 500 0.95rem var(--body); cursor: pointer;
    border-bottom: 1px solid var(--line-inv);
  }
  .sum-toggle .chev { display: inline-block; transition: transform 0.2s ease; color: var(--pale); }
  .sum-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .sum-body { display: none; padding: 1.5rem 1.25rem 2rem; }
  .sum-body.open { display: block; }
}

/* Form side */
.pane { padding: 2rem 1.25rem 4rem; }
@media (min-width: 960px) { .pane { padding: 4rem 3rem 5rem; } }
.pane .in { max-width: 34rem; }
@media (max-width: 959px) { .pane .in { margin-inline: auto; } }
.pane h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 0.4rem; }
.pane .lead { color: var(--muted); margin: 0 0 1.5rem; }

.steps { display: flex; gap: 0.5rem; align-items: center; margin: 0 0 1.75rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.steps .on { color: var(--ink); }
.steps .dot { width: 18px; height: 1px; background: var(--line); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.25rem, 3vw, 1.75rem); }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--ink); margin-bottom: 0.85rem; padding: 0; }
.grid { display: grid; gap: 0.85rem; }
.g2 { grid-template-columns: 1fr 1fr; }
.g-addr { grid-template-columns: 1fr 5.5rem 7rem; }
@media (max-width: 520px) {
  .g2 { grid-template-columns: 1fr; }
  .g2.keep { grid-template-columns: 1fr 1fr; }
  .g-addr { grid-template-columns: 1fr 1fr; }
  .g-addr .city { grid-column: 1 / -1; }
}
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; color: var(--text); }
.field input, .field select {
  width: 100%; font: 400 1rem/1.3 var(--body); color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 0.8rem 0.85rem; transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b606b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2rem; }
.field input::placeholder { color: #9aa0aa; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19, 114, 211, 0.15); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field.invalid input:focus, .field.invalid select:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }
.field .msg { display: none; color: var(--danger); font-size: 0.8rem; margin-top: 0.3rem; }
.field.invalid .msg { display: block; }
.hint { color: var(--muted); font-size: 0.8rem; margin: 0.45rem 0 0; }

.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 0.55rem 1.1rem; font-size: 0.92rem; font-weight: 500; cursor: pointer; transition: all 0.15s ease;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--pale); outline-offset: 2px; }
.field.invalid .chip span { border-color: var(--danger); }

.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; color: var(--muted); cursor: pointer; margin-top: 0.85rem; }
.check input { width: 18px; height: 18px; margin: 0.15rem 0 0; accent-color: var(--blue); flex: none; }
.check.invalid { color: var(--danger); }
.check a { font-weight: 500; }

.alert { border-radius: var(--r); padding: 0.9rem 1rem; font-size: 0.92rem; margin: 0 0 1.25rem; display: none; }
.alert.show { display: block; }
.alert-error { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger); }
.alert strong { display: block; margin-bottom: 0.15rem; }

.cta { margin-top: 1.5rem; }
.assure { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--muted); font-size: 0.82rem; margin-top: 1rem; }
.assure svg { flex: none; width: 15px; height: 15px; margin-top: 0.15rem; color: var(--ink); }
.cards { display: flex; gap: 0.4rem; margin-top: 0.75rem; opacity: 0.75; }
.cards span { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; border: 1px solid var(--line); border-radius: 4px; padding: 0.2rem 0.4rem; color: var(--muted); background: var(--paper); }

/* Handoff overlay */
.handoff { position: fixed; inset: 0; z-index: 50; background: rgba(23, 27, 35, 0.92); color: #fff; display: none; place-items: center; text-align: center; padding: 1.5rem; }
.handoff.show { display: grid; }
.handoff .spinner { display: block; width: 28px; height: 28px; margin: 0 auto 1rem; border-width: 3px; }
.handoff p { color: var(--muted-inv); margin: 0.4rem 0 0; font-size: 0.95rem; }

/* Agreement modal */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(23, 27, 35, 0.6); display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal.show { display: flex; }
.modal .box { background: var(--paper); border-radius: var(--r-card); width: min(760px, 100%); height: min(86vh, 900px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal .bar { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal .bar button { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0.2rem 0.4rem; }
.modal iframe { flex: 1; border: 0; width: 100%; }
.modal .foot { padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

/* Simple centered pages (welcome, not completed, agreement) */
.page { width: min(720px, 100% - 2.5rem); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) 0 4rem; }
.page h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-bottom: 0.75rem; }
.page .lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 2rem; }
.panel { background: var(--ink); color: var(--text-inv); border-radius: var(--r-card); padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.next { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: 1rem; }
.next li { counter-increment: n; display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; align-items: start; }
.next li::before { content: counter(n); font-family: var(--display); font-size: 1.1rem; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); background: var(--paper); }
.next li strong { display: block; }
.next li span { color: var(--muted); font-size: 0.95rem; }

.legal h2 { font-family: var(--body); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin: 1.75rem 0 0.4rem; }
.legal p, .legal li { color: #3a3f49; font-size: 0.97rem; }
.legal ul { padding-left: 1.2rem; }
.embed .hdr { display: none; }
.embed .page { padding-top: 1.5rem; }

.foot-note { color: var(--muted); font-size: 0.8rem; text-align: center; padding: 0 1.25rem 2rem; }

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