/* TAM onboarding form redesign
   Uses the local DESIGN.md workflow plus TAM brand tokens. */

:root {
  --tam-indigo-950: #1E1B4B;
  --tam-indigo-700: #4338CA;
  --tam-indigo-600: #4F46E5;
  --tam-indigo-500: #6366F1;
  --tam-indigo-400: #818CF8;
  --tam-indigo-200: #C7D2FE;
  --tam-indigo-100: #E0E7FF;
  --tam-indigo-50: #EEF2FF;
  --tam-coral: #F97066;
  --tam-teal: #2DD4BF;
  --tam-charcoal: #1E1B4B;
  --tam-slate: #475569;
  --tam-cool-gray: #94A3B8;
  --tam-ghost-white: #F8FAFC;
  --tam-white: #FFFFFF;
  --tam-midnight: #0F172A;
  --shadow-panel: 0 24px 70px rgba(30, 27, 75, 0.14);
  --shadow-card: 0 10px 30px rgba(30, 27, 75, 0.10), 0 4px 10px rgba(30, 27, 75, 0.05);
  --shadow-soft: 0 4px 12px rgba(30, 27, 75, 0.08);
  --shadow-coral: 0 12px 28px rgba(249, 112, 102, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.10) 0%, rgba(248, 250, 252, 0) 38%),
    linear-gradient(165deg, rgba(199, 210, 254, 0.42) 0%, rgba(248, 250, 252, 0.96) 32%, #ffffff 100%);
}

body::before {
  background:
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 72%);
}

.page {
  width: min(100%, 1220px);
  max-width: none;
  padding: 28px 24px 56px;
}

.brand {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
}

header.brand img {
  width: auto;
  height: auto;
  border-radius: 0;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  width: clamp(220px, 19vw, 260px);
  text-decoration: none;
}

.brand-logo .brand-logo-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand .name {
  font-size: 19px;
}

.brand .tagline {
  color: var(--tam-indigo-700);
  font-weight: 700;
}

.brand-note {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--tam-indigo-700);
  font: 700 12px/1 "Open Sans", system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.hero {
  position: sticky;
  top: 24px;
  margin: 0;
  padding: 10px 0 0;
}

.eyebrow,
.section-head .eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--tam-indigo-700);
  letter-spacing: 0.05em;
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 20px;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.02;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 9999px;
  background: var(--tam-coral);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-coral);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.hero-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(249, 112, 102, 0.34);
}

.hero-time {
  color: var(--tam-slate);
  font-size: 14px;
  font-weight: 700;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0;
}

.metric {
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(99, 102, 241, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  color: var(--tam-charcoal);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric span {
  display: block;
  color: var(--tam-slate);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.email-callout,
.prep-panel {
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.email-callout {
  border-left: 0;
}

.email-callout::before,
.prep-panel::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--tam-indigo-500), var(--tam-teal));
}

.email-callout strong,
.prep-panel h2 {
  color: var(--tam-indigo-700);
}

.prep-panel h2 {
  margin: 0 0 10px;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.25;
}

.prep-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prep-panel li {
  position: relative;
  padding-left: 24px;
  color: var(--tam-slate);
  font-size: 14px;
  line-height: 1.5;
}

.prep-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--tam-teal);
  border-radius: 9999px;
  background: #fff;
}

main {
  min-width: 0;
}

.card,
.status-panel {
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 32px;
  box-shadow: var(--shadow-panel);
}

.card {
  padding: clamp(24px, 3vw, 40px);
  background:
    linear-gradient(180deg, rgba(238, 242, 255, 0.52), rgba(255, 255, 255, 0) 170px),
    var(--tam-white);
}

.progress {
  margin-bottom: 34px;
  padding: 18px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
}

.progress-track {
  height: 10px;
  background: var(--tam-indigo-100);
}

.progress-fill {
  background: linear-gradient(90deg, var(--tam-indigo-700), var(--tam-indigo-400), var(--tam-teal));
}

.progress-meta {
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.progress-meta > span:first-child {
  color: var(--tam-indigo-700);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.progress-meta .step-label {
  text-align: right;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  max-width: 12ch;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.12;
}

.section-head p:not(.eyebrow) {
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.65;
}

.field {
  margin-bottom: 22px;
}

.field-label {
  margin-bottom: 8px;
  color: var(--tam-indigo-950);
  font-size: 14px;
}

.field-hint {
  color: var(--tam-slate);
  font-size: 13px;
  line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  min-height: 50px;
  border-color: rgba(99, 102, 241, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(30, 27, 75, 0.03);
}

textarea {
  min-height: 112px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(99, 102, 241, 0.42);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tam-indigo-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 8px 20px rgba(30, 27, 75, 0.08);
}

.option-group {
  gap: 10px;
}

.option {
  min-height: 50px;
  border-color: rgba(99, 102, 241, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
}

.option:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.38);
  background: rgba(238, 242, 255, 0.58);
}

.option:has(input:checked) {
  border-color: var(--tam-indigo-500);
  background: rgba(99, 102, 241, 0.09);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.nav {
  margin-top: 36px;
  padding-top: 26px;
}

.btn {
  min-height: 48px;
  padding: 0 24px;
  font-weight: 800;
}

.btn-primary {
  background: var(--tam-coral);
  box-shadow: var(--shadow-coral);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  border-color: rgba(99, 102, 241, 0.22);
  color: var(--tam-indigo-700);
}

.btn-secondary:hover {
  background: var(--tam-indigo-50);
}

.status-panel {
  padding: clamp(28px, 4vw, 46px);
}

.foot {
  margin-top: 34px;
}

@media (max-width: 1040px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    position: static;
  }

  .hero h1 {
    max-width: 14ch;
    font-size: clamp(42px, 8vw, 68px);
  }

  .hero-metrics {
    max-width: 720px;
  }
}

@media (max-width: 680px) {
  .page {
    padding: 18px 14px 42px;
  }

  .brand {
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .brand-logo {
    width: min(168px, 48vw);
  }

  .brand-note {
    display: none;
  }

  .hero {
    padding-top: 0;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(38px, 12vw, 52px);
  }

  .hero p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-actions {
    margin: 22px 0;
  }

  .hero-link {
    width: 100%;
  }

  .hero-time {
    width: 100%;
    text-align: center;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 22px 0;
  }

  .metric {
    min-height: 0;
    padding: 15px 16px;
  }

  .card,
  .status-panel {
    border-radius: 24px;
  }

  .progress {
    padding: 14px;
  }

  .progress-meta {
    display: grid;
    gap: 6px;
  }

  .progress-meta .step-label {
    text-align: left;
  }

  .section-head h2 {
    max-width: 100%;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .btn-secondary.invisible {
    display: none;
  }
}

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