:root {
  color-scheme: light;

  --stage-dark: #0F0F12;
  --stage-dark-elevated: #1A1A1F;
  --canvas: #FAF8F4;
  --surface-1: #FFFFFF;
  --surface-2: #F1EFE9;

  --accent: #F5A60A;
  --accent-hover: #DC9000;
  --accent-soft: #FEF5DC;
  --accent-border: #E5A00D;

  --ink: #121215;
  --ink-secondary: #52525B;
  --ink-muted: #71717A;
  --ink-on-dark: #F7F6F2;

  --border-subtle: #E5E2DA;
  --border-strong: #C8C3B8;

  --success: #15803D;
  --success-soft: #DCFCE7;
  --error: #B91C1C;
  --error-soft: #FEE2E2;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-full: 9999px;

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Split-Screen Layout */
.split-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

@media (min-width: 900px) {
  .split-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100dvh;
  }
}

/* Left Panel: Video / VideoAsk Stage */
.video-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--stage-dark);
  color: var(--ink-on-dark);
  overflow: hidden;
  height: clamp(220px, 34dvh, 300px);
}

.video-stage.is-videoask-mode {
  height: clamp(320px, 48dvh, 420px);
}

@media (min-width: 900px) {
  .video-stage,
  .video-stage.is-videoask-mode {
    position: sticky;
    top: 0;
    height: 100dvh;
  }
}

.video-topbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  pointer-events: none;
}

.video-topbar > * {
  pointer-events: auto;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  background-color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.brand-pill img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.video-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.stage-ctrl-btn {
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(15, 15, 18, 0.72);
  color: var(--ink-on-dark);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.stage-ctrl-btn:hover {
  border-color: var(--accent);
}

.video-mount {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.videoask-frame,
.native-video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.video-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.16);
  z-index: 5;
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--accent);
  transition: width 150ms linear;
}

/* Studio Placeholder State */
.placeholder-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 42%, #1E1D19 0%, #0F0F12 72%);
}

.placeholder-aura {
  position: absolute;
  width: min(72vw, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 10, 0.16) 0%, rgba(245, 166, 10, 0) 70%);
  pointer-events: none;
}

.placeholder-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

.placeholder-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 0.26rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 166, 10, 0.35);
  background-color: rgba(245, 166, 10, 0.08);
}

.play-orb-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-on-dark);
  cursor: pointer;
  font-family: var(--font-body);
}

.play-orb-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--stage-dark-elevated);
  border: 2px solid var(--accent);
  color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease-out, color 180ms ease-out;
}

.play-orb-circle svg {
  margin-left: 3px;
}

.play-orb-btn:hover .play-orb-circle {
  transform: scale(1.06);
  background-color: var(--accent);
  color: var(--ink);
}

.play-orb-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-on-dark);
  font-variant-numeric: tabular-nums;
}

.placeholder-hint {
  font-size: 0.84rem;
  color: var(--accent);
  background-color: rgba(15, 15, 18, 0.75);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.video-caption {
  position: relative;
  z-index: 4;
  padding: 0.9rem 1.25rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(247, 246, 242, 0.9);
  background: linear-gradient(to top, rgba(15, 15, 18, 0.85), rgba(15, 15, 18, 0));
  pointer-events: none;
}

@media (min-width: 900px) {
  .video-topbar {
    padding: 1.5rem 2rem;
  }

  .video-caption {
    padding: 1.5rem 2rem;
    font-size: 1rem;
  }
}

/* Right Panel: Conversational Action Stage */
.action-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--canvas);
  border-radius: 20px 20px 0 0;
  margin-top: -16px;
  padding: 1.6rem 1.25rem 1.15rem;
}

@media (min-width: 900px) {
  .action-stage {
    border-radius: 0;
    margin-top: 0;
    padding: clamp(2rem, 4vw, 3.5rem);
    min-height: 100dvh;
  }
}

.action-rail {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  margin-block: auto;
  container-type: inline-size;
  view-transition-name: action-panel;
}

.stage-step {
  display: grid;
  gap: 1rem;
}

.rail-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stage-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stage-heading:focus {
  outline: none;
}

/* Choice Buttons (A / B / C) */
.choice-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 1rem;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 160ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
              background-color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.choice-btn:hover {
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.choice-btn:active {
  transform: translateY(0);
}

.choice-key {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background-color: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.choice-btn:hover .choice-key,
.choice-btn:focus-visible .choice-key {
  background-color: var(--accent);
  border-color: var(--accent-border);
  color: var(--ink);
}

.choice-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.choice-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.choice-sub {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.choice-arrow {
  color: var(--ink-muted);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 160ms ease-out, color 160ms ease-out;
}

.choice-btn:hover .choice-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

.rail-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Step 1 Header */
.step1-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.back-btn {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
}

.back-btn:hover {
  color: var(--ink);
}

.perk-pill {
  padding: 0.26rem 0.65rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

/* Form Fields & Native Validation */
.lead-form {
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.2rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.req-mark {
  color: var(--error);
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 0.12rem;
}

.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 0.74rem 0.88rem;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-strong);
  background-color: var(--surface-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.field input::placeholder {
  color: #93939E;
}

.field input:user-invalid,
.field input.user-invalid-fallback {
  border-color: var(--error);
  background-color: #FFF7F7;
}

.field input:user-valid,
.field input.user-valid-fallback {
  border-color: var(--success);
}

.field:has(input:user-invalid) label,
.field.has-error-fallback label {
  color: var(--error);
}

.error-msg {
  display: none;
  align-items: center;
  gap: 0.35rem;
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.error-msg > span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--error);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

input:user-invalid + .error-msg,
input.user-invalid-fallback + .error-msg,
.consent-row:has(input:user-invalid) .error-msg,
.consent-row.has-error-fallback .error-msg {
  display: flex;
}

/* Consent Checkbox */
.consent-row {
  display: grid;
  gap: 0.2rem;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 0.18rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  cursor: pointer;
}

@supports not (accent-color: #121215) {
  .consent-label {
    position: relative;
    padding-left: 1.75rem;
  }

  .consent-label input[type="checkbox"] {
    position: absolute;
    clip-path: inset(50%);
    overflow: hidden;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
  }

  .consent-label input[type="checkbox"] + span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12rem;
    width: 1.1rem;
    height: 1.1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface-1);
  }

  .consent-label input[type="checkbox"]:checked + span::before {
    background-color: var(--ink);
    border-color: var(--ink);
  }

  .consent-label input[type="checkbox"]:checked + span::after {
    content: "✓";
    position: absolute;
    left: 0.2rem;
    top: 0.06rem;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 700;
  }
}

.inline-link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.server-error {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-xs);
  background-color: var(--error-soft);
  border: 1px solid rgba(185, 28, 28, 0.35);
  color: var(--error);
  font-size: 0.84rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.88rem 1.25rem;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 120ms ease-out;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--ink);
  border-color: var(--accent-border);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary[aria-busy="true"] {
  opacity: 0.78;
  cursor: wait;
}

.btn-ghost {
  background-color: var(--surface-1);
  color: var(--ink);
  border-color: var(--border-subtle);
  padding: 0.72rem 1rem;
  font-size: 0.86rem;
}

.btn-ghost:hover {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}

.btn-full {
  width: 100%;
}

.btn-link-muted {
  background: none;
  border: 0;
  padding: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  justify-self: center;
}

.btn-link-muted:hover {
  color: var(--ink);
}

/* Step 2 Qualification */
.step-pill {
  display: inline-block;
  width: fit-content;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-pill-success {
  background-color: var(--success-soft);
  color: var(--success);
}

.qualification-stack {
  display: grid;
  gap: 0.85rem;
}

.q-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.38rem;
  container-type: inline-size;
}

.q-legend {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.option-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@container (min-width: 340px) {
  .option-group-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.option-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-subtle);
  background-color: var(--surface-1);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 140ms ease-out, background-color 140ms ease-out;
}

.option-chip:hover {
  border-color: var(--border-strong);
}

.option-chip input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}

.option-chip:has(input:checked),
.option-chip.is-checked {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
}

/* Step 3 Success */
.success-panel {
  gap: 0.9rem;
}

.success-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--success-soft);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.code-row {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.founder-code {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-xs);
  background-color: var(--ink);
  color: var(--accent);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.success-summary {
  padding: 0.72rem 0.88rem;
  border-radius: var(--radius-xs);
  background-color: var(--surface-2);
  border: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  color: var(--ink);
}

.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.copy-feedback {
  min-height: 1.1em;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
}

/* Micro-Footer */
.rail-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Focus Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 2px;
}

/* Native Modal Dialog */
dialog#privacy-dialog {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  max-width: 480px;
  width: calc(100% - 2rem);
  background-color: var(--surface-1);
  color: var(--ink);
  box-shadow: 0 24px 54px -20px rgba(18, 18, 21, 0.35);
}

dialog#privacy-dialog::backdrop {
  background-color: rgba(15, 15, 18, 0.65);
  backdrop-filter: blur(3px);
}

.dialog-card {
  padding: 1.5rem;
  display: grid;
  gap: 0.85rem;
}

.dialog-header h2 {
  font-size: 1.18rem;
}

.dialog-body {
  display: grid;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

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

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

[hidden] {
  display: none !important;
}
