:root {
  --h-base: 250;
  --h-brand: 255;
  --h-accent: 75;

  --c-bg: oklch(98% 0.004 250);
  --c-surface: oklch(95.5% 0.006 250);
  --c-surface-2: oklch(92.5% 0.008 250);
  --c-text: oklch(17% 0.018 255);
  --c-muted: oklch(46% 0.012 250);
  --c-line: oklch(89% 0.008 250);
  --c-brand: oklch(32% 0.09 255);
  --c-brand-deep: oklch(22% 0.08 255);
  --c-accent: oklch(68% 0.16 75);
  --c-warn: oklch(58% 0.18 25);
  --c-good: oklch(58% 0.13 150);

  --ff-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ff-body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-xs:   clamp(0.78rem, 0.74rem + 0.18vw, 0.88rem);
  --fs-sm:   clamp(0.92rem, 0.86rem + 0.25vw, 1.02rem);
  --fs-base: clamp(1rem, 0.96rem + 0.22vw, 1.12rem);
  --fs-lg:   clamp(1.15rem, 1.06rem + 0.45vw, 1.38rem);
  --fs-xl:   clamp(1.5rem, 1.28rem + 1.1vw, 2.15rem);
  --fs-2xl:  clamp(2rem, 1.55rem + 2.1vw, 3rem);

  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;

  --container: 720px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --radius: 14px;
  --radius-sm: 8px;

  color-scheme: light only;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(1100px 480px at 50% -10%, color-mix(in oklab, var(--c-brand) 10%, transparent), transparent 60%),
    var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
  font-variation-settings: "opsz" 96;
  color: var(--c-text);
}
h1 { font-size: var(--fs-2xl); letter-spacing: -0.035em; }
h3 { font-size: var(--fs-lg); font-weight: 500; }

p { text-wrap: pretty; max-width: 60ch; }
em { font-style: italic; }

a {
  color: var(--c-brand);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 180ms;
}
a:hover { color: var(--c-accent); }

.page {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-6) var(--gutter) var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-6);
  flex: 1;
}

/* Brand bar */
.brand { display: flex; align-items: center; padding-block: var(--sp-3); }

/* Card surface */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1.2rem + 2vw, 2.75rem);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--c-text) 4%, transparent);
}
.card.centered {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  text-align: center;
}

/* Eyebrow / labels */
.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brand);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.eyebrow-warn { color: var(--c-warn); }
.eyebrow-good { color: var(--c-good); }

.lead {
  font-size: var(--fs-lg);
  color: var(--c-muted);
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.lead em { color: var(--c-text); font-style: normal; font-weight: 600; }

.muted { color: var(--c-muted); }

/* Spinner */
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--c-line);
  border-top-color: var(--c-brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}

/* Form */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.field { margin-bottom: var(--sp-4); }
.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: var(--sp-2);
  color: var(--c-text);
}
.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--c-bg);
  color: var(--c-text);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-base);
  transition: border-color 180ms, box-shadow 180ms;
}
.field input::placeholder { color: var(--c-muted); opacity: 0.6; }
.field input:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-brand) 22%, transparent);
}
.field input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--c-warn);
}

.hint {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  margin-top: var(--sp-2);
}
.hint.center { text-align: center; margin-top: var(--sp-3); }

/* Consents */
.consents {
  display: grid; gap: var(--sp-3);
  margin: var(--sp-5) 0 var(--sp-5);
  padding: var(--sp-4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
}
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-sm);
  color: var(--c-text);
  cursor: pointer;
  line-height: 1.5;
}
.check input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--c-line);
  border-radius: 5px;
  background: var(--c-bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.1rem;
  transition: border-color 180ms, background 180ms;
}
.check input[type=checkbox]:hover { border-color: var(--c-brand); }
.check input[type=checkbox]:checked {
  background: var(--c-brand);
  border-color: var(--c-brand);
}
.check input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  inset: 3px 4px;
  border-right: 2px solid var(--c-bg);
  border-bottom: 2px solid var(--c-bg);
  transform: rotate(45deg) translateY(-1px);
  width: 6px; height: 11px;
}
.check input[type=checkbox]:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}

/* Button */
button[type=submit] {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: var(--c-brand);
  color: var(--c-bg);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 180ms, transform 80ms;
}
button[type=submit]:hover:not(:disabled) {
  background: var(--c-brand-deep);
}
button[type=submit]:active:not(:disabled) { transform: translateY(1px); }
button[type=submit]:disabled {
  background: color-mix(in oklab, var(--c-brand) 40%, var(--c-surface-2));
  color: var(--c-muted);
  cursor: not-allowed;
}
.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid color-mix(in oklab, var(--c-bg) 50%, transparent);
  border-top-color: var(--c-bg);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
button[type=submit].is-loading .btn-label { opacity: 0.6; }
button[type=submit].is-loading .btn-spinner { display: inline-block; }

/* Success steps */
.steps {
  display: grid; gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  align-items: start;
  padding: var(--sp-4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  transition: background 200ms;
}
.step.pending { opacity: 0.55; }
.step.active {
  background: color-mix(in oklab, var(--c-brand) 12%, var(--c-surface-2));
  border-color: color-mix(in oklab, var(--c-brand) 35%, var(--c-line));
}
.step-num {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  background: var(--c-brand);
  color: var(--c-bg);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.step.pending .step-num {
  background: var(--c-surface);
  color: var(--c-muted);
  border: 1px solid var(--c-line);
}
.step.active .step-num { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--c-brand) 50%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--c-brand) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .step.active .step-num { animation: none; }
}
.step h3 { margin-bottom: var(--sp-1); }
.step p { color: var(--c-muted); font-size: var(--fs-sm); margin: 0; }

/* Footer */
.foot {
  text-align: center;
  padding: var(--sp-5) var(--gutter);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
}
.foot p { margin: 0 auto; max-width: none; }
.foot a { color: var(--c-muted); text-decoration: none; }
.foot a:hover { color: var(--c-brand); text-decoration: underline; }
.foot .copy { opacity: 0.75; }

/* Card entry animation */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise 500ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- auditveo brand mark ----- */
.av-brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: inherit;
  line-height: 1;
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.av-brand:hover { opacity: 0.82; }
.av-brand:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; border-radius: 6px; }
.av-brand .av-mark {
  width: clamp(30px, 2.6vw, 38px);
  height: clamp(30px, 2.6vw, 38px);
  flex-shrink: 0;
  display: block;
}
.av-brand .av-mark .av-dot { fill: oklch(15% 0.014 250); transition: fill 180ms; }
.av-brand .av-mark .av-ring { stroke: oklch(64% 0.13 70); transition: stroke 180ms; }
.av-brand .av-wordmark {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 1rem + 0.7vw, 1.55rem);
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 72;
  color: var(--c-text);
  white-space: nowrap;
}
.av-brand .av-wordmark .av-veo { color: oklch(64% 0.13 70); }
