/* Cycles IQ onboarding · Market Zeitgeist
   Tokens follow brand/README.md and brand/logo/palette.json:
   cobalt carries logo and actions, ochre stays secondary, flat style, 0 px corners,
   2 px lines as dividers, everything left-aligned, Archivo 800 headings / 400 body. */

:root {
  --mz-accent: #1364ce;          /* Kobalt: logo cycle, primary action, links */
  --mz-accent-tint: #c4d9f9;     /* surfaces, hover, tags */
  --mz-accent-deep: #002f6e;     /* text on tint, pressed state */
  --mz-complement: #c48d25;      /* Ocker: highlights, figures only */
  --mz-complement-deep: #9a6500; /* kicker text in ochre */
  --mz-complement-tint: #f6e6cb; /* quote and hint surfaces */
  --mz-ink: #201e1d;             /* text */
  --mz-muted: #605d5d;           /* Grau 700: secondary text */
  --mz-axis: #9b9797;            /* Grau 500: lines */
  --mz-surface: #eae9e9;         /* cards, table head */
  --mz-ground: #f3f2f2;          /* page background */
  --mz-white: #ffffff;           /* inputs */
  --mz-danger: #a3261a;
  --mz-font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mz-maxw: 640px;
  --mz-line: 2px solid var(--mz-ink);
  --mz-line-soft: 2px solid var(--mz-axis);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--mz-ground);
  color: var(--mz-ink);
  font-family: var(--mz-font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

a { color: var(--mz-accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--mz-white);
  padding: .5rem .75rem; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- top bar: symbol 26 px, wordmark 16 px, gap 10 px ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--mz-ground);
  border-bottom: var(--mz-line);
}
.topbar__inner {
  max-width: var(--mz-maxw); margin: 0 auto; padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--mz-ink); }
.brand__symbol { width: 26px; height: 26px; display: block; flex: none; }
.brand__name { font-size: 16px; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.brand__name b { font-weight: 800; }
.brand__name span { font-weight: 400; }
.program {
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mz-complement-deep);
}

.progress { max-width: var(--mz-maxw); margin: 0 auto; padding: 0 1.25rem .7rem; }
.progress__bar { height: 2px; background: var(--mz-axis); overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--mz-accent); transition: width .35s ease; }
.progress__label { font-size: .8rem; color: var(--mz-muted); margin-top: .35rem; }

/* ---------- screens ---------- */
.app {
  flex: 1; width: 100%; max-width: var(--mz-maxw); margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem; position: relative;
}
.screen { display: none; }
.screen.is-active { display: block; animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
  .progress__fill { transition: none; }
}

.eyebrow {
  margin: 0 0 .6rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--mz-complement-deep); font-weight: 600;
}
h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 .8rem; letter-spacing: -.02em; }
h1 { font-size: clamp(1.75rem, 2.2vw + 1.2rem, 2.5rem); }
h2 { font-size: clamp(1.45rem, 1.6vw + 1rem, 1.95rem); }
h3 { font-size: 1.2rem; }
.lead { font-size: 1.1rem; margin: 0 0 1rem; }
.hint, .note, .field-help { color: var(--mz-muted); font-size: .95rem; margin: 0 0 1.25rem; }
.field-help { margin: .4rem 0 0; font-size: .85rem; }
.tagline { color: var(--mz-muted); margin: 0 0 1.5rem; padding-left: .9rem; border-left: 2px solid var(--mz-complement); }
.muted { color: var(--mz-muted); font-weight: 400; }

.benefits { list-style: none; padding: 0; margin: 0 0 1.25rem; border-top: var(--mz-line); }
.benefits li { padding: .85rem 0; border-bottom: var(--mz-line-soft); }
.benefits strong { color: var(--mz-accent); font-weight: 600; }
.note { background: var(--mz-complement-tint); padding: .8rem 1rem; color: var(--mz-ink); }

/* ---------- choices ---------- */
.choices { display: grid; gap: .5rem; margin: 0 0 .75rem; }
.choice {
  display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left;
  background: var(--mz-white); border: 2px solid var(--mz-surface);
  padding: .95rem 1rem; font: inherit; color: inherit; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.choice:hover { border-color: var(--mz-accent); }
.choice:active { background: var(--mz-accent-tint); }
.choice:focus-visible, .btn:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 3px solid var(--mz-accent-tint); outline-offset: 2px;
}
.choice[aria-checked="true"] { border-color: var(--mz-accent); background: var(--mz-accent-tint); color: var(--mz-accent-deep); }
.choice span { display: flex; flex-direction: column; gap: .1rem; }
.choice small { color: var(--mz-muted); font-size: .85rem; }
.choice[aria-checked="true"] small { color: var(--mz-accent-deep); }
kbd {
  font-family: var(--mz-font); font-size: .75rem; font-weight: 600; line-height: 1; padding: .3rem .45rem;
  border: 2px solid var(--mz-surface); background: var(--mz-ground); color: var(--mz-muted);
  min-width: 1.7rem; text-align: center;
}
.choice[aria-checked="true"] kbd { background: var(--mz-accent); color: var(--mz-white); border-color: var(--mz-accent); }
.btn kbd { background: transparent; border-color: currentColor; color: inherit; margin-left: .35rem; opacity: .8; }
@media (hover: none) { kbd { display: none; } }

/* ---------- fields ---------- */
.fields { display: grid; gap: 1.1rem; margin-bottom: .5rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
textarea, input {
  width: 100%; font: inherit; color: inherit; background: var(--mz-white);
  border: 2px solid var(--mz-surface); border-radius: 0; padding: .85rem 1rem;
  transition: border-color .12s;
}
textarea { resize: vertical; min-height: 9rem; margin-bottom: .5rem; }
textarea:focus, input:focus { border-color: var(--mz-accent); outline: none; }
.field-error { color: var(--mz-danger); font-size: .9rem; margin: .35rem 0 .75rem; }
.is-invalid { border-color: var(--mz-danger) !important; }

/* ---------- actions ---------- */
.actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: 0; padding: .8rem 1.4rem; border: 2px solid transparent;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.btn--primary { background: var(--mz-accent); color: var(--mz-white); border-color: var(--mz-accent); }
.btn--primary:hover { background: var(--mz-accent-deep); border-color: var(--mz-accent-deep); }
.btn--primary:active { background: var(--mz-accent-deep); }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--mz-muted); border-color: var(--mz-axis); }
.btn--ghost:hover { color: var(--mz-ink); border-color: var(--mz-ink); }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--mz-white); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- summary / submit ---------- */
.summary {
  margin: 0 0 1.5rem; display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem;
  border-top: var(--mz-line); border-bottom: var(--mz-line-soft); padding: .9rem 0; font-size: .95rem;
}
.summary dt { color: var(--mz-muted); }
.summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 480px) { .summary { grid-template-columns: 1fr; } .summary dt { margin-top: .4rem; } }
.turnstile-wrap { margin-bottom: 1rem; }
.submit-error {
  border-left: 2px solid var(--mz-danger); padding: .5rem 0 .5rem 1rem; color: var(--mz-danger); font-size: .95rem;
}

/* ---------- calendly / done ---------- */
.calendly { min-height: 660px; margin: 1rem 0 1.5rem; background: var(--mz-white); border: 2px solid var(--mz-surface); }
.calendly-fallback { margin: 0 0 1.5rem; }
.calendly-unconfigured { margin: 0; padding: 1rem 1.1rem; color: var(--mz-complement-deep); background: var(--mz-complement-tint); }
.calendly-unconfigured code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
.done { border-top: var(--mz-line); padding-top: 1.5rem; }
.done p { margin: 0 0 1rem; color: var(--mz-muted); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--mz-maxw); margin: 0 auto; padding: 1rem 1.25rem 2rem; width: 100%;
  border-top: var(--mz-line-soft);
  font-size: .8rem; color: var(--mz-muted); display: flex; flex-wrap: wrap; gap: .4rem;
}
.footer__sep { opacity: .6; }
