/* readiness-assessment.ai — hand-written styles, no framework.
   Light blue theme carried over from the original v0 design. */

:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --muted-bg: #f1f5f9;
  --muted-bg-soft: #f8fafc;
  --primary: #1e3a8a;
  --primary-hover: #24449c;
  --primary-soft: rgba(30, 58, 138, 0.08);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --border: #e2e8f0;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 1rem;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease,
    box-shadow 150ms ease, color 150ms ease;
}

.btn .icon { width: 1.1em; height: 1.1em; flex: none; }

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

.btn-secondary {
  background: #fff;
  color: var(--primary);
}
.btn-secondary:hover { background: var(--muted-bg-soft); }

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--muted-bg); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--muted-bg); color: var(--fg); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.875rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.125rem; box-shadow: var(--shadow-md); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Badge ---------- */

.badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: rgba(255, 255, 255, 0.8);
  color: var(--fg);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  min-width: 0;
}

.nav__brand .nav__logo { width: 2.5rem; height: 2.5rem; border-radius: 0.4rem; }
.nav__brand .nav__by { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.nav__brand .nav__wiserbrand { height: 1.25rem; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__links > a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}
.nav__links > a:hover { color: var(--fg); }

@media (max-width: 860px) {
  .nav__links > a.nav__page-link { display: none; }
  .nav__brand .nav__by,
  .nav__brand .nav__wiserbrand { display: none; }
}

@media (max-width: 480px) {
  .nav__brand { font-size: 0.95rem; gap: 0.4rem; }
  .nav__brand .nav__logo { width: 2rem; height: 2rem; }
}

/* ---------- Language switcher ---------- */

.lang {
  position: relative;
}

.lang > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 150ms ease;
}
.lang > summary:hover { background: var(--muted-bg); }
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary .icon { width: 1rem; height: 1rem; }

.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  padding: 0.25rem;
  z-index: 50;
}

.lang__menu a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 0.35rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 150ms ease;
}
.lang__menu a:hover { background: var(--muted-bg); }
.lang__menu a[aria-current="true"] { background: var(--muted-bg); font-weight: 600; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 6rem;
  text-align: center;
  background:
    linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, rgba(239, 246, 255, 0.5) 100%);
}

.hero::before {
  /* faint grid, fading toward the bottom */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, #e5e7eb 1px, transparent 1px),
    linear-gradient(to bottom, #e5e7eb 1px, transparent 1px);
  background-size: 4rem 4rem;
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}
.hero__orb--left { top: 0; left: 15%; background: rgba(96, 165, 250, 0.2); }
.hero__orb--right { bottom: 0; right: 15%; background: rgba(59, 130, 246, 0.2); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  margin: 1.5rem 0;
}

.hero .lead {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  color: var(--muted);
  max-width: 46rem;
  margin: 0 auto 2rem;
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.hero__note { font-size: 0.875rem; color: var(--muted); margin: 0; }

.hero__by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.hero__by img { height: 1.25rem; width: auto; }

/* ---------- Sections ---------- */

.section { padding: 5rem 0; }
.section--muted { background: rgba(241, 245, 249, 0.5); }

.section-head {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 4rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 700;
}

.section-head .lead {
  font-size: 1.25rem;
  color: var(--muted);
  text-wrap: pretty;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid--3 { grid-template-columns: repeat(3, 1fr); max-width: 64rem; margin: 0 auto; }
.grid--cards { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
  .grid--3, .grid--cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--3, .grid--cards { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
}

/* ---------- Cards ---------- */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.card--hover:hover {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: var(--shadow-md);
}

.card--shadow {
  border: none;
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.card--center { text-align: center; }
.card--center h3 { font-size: 1.5rem; }

.card__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card__icon-circle {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__icon-circle .icon { width: 2rem; height: 2rem; color: var(--accent); }

/* Numbered "how it works" steps */

.step { text-align: center; }

.step__num {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.step p { color: var(--muted); margin: 0; }

/* ---------- CTA band ---------- */

.cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 5rem 0;
}

.cta h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.cta p { font-size: 1.25rem; opacity: 0.9; max-width: 42rem; margin: 0 auto 2rem; }

/* ---------- FAQ ---------- */

.faq {
  max-width: 48rem;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.faq .card h3 { font-size: 1.25rem; }
.faq .card p { font-size: 1rem; line-height: 1.65; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.footer p { margin: 0; }

/* ---------- Questionnaire modal ---------- */

.qz-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: qz-fade 200ms ease;
}

@keyframes qz-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qz-card {
  width: 100%;
  max-width: 42rem;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: qz-zoom 200ms ease;
}

.qz-card--narrow { max-width: 28rem; }

@keyframes qz-zoom {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.qz-head {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.qz-card--narrow .qz-head { border-bottom: none; padding-bottom: 0; }

.qz-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.qz-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.qz-close {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 150ms ease;
}
.qz-close:hover { background: var(--muted-bg); }
.qz-close .icon { width: 0.9rem; height: 0.9rem; }

.qz-progress {
  height: 0.375rem;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: var(--muted-bg);
  overflow: hidden;
}

.qz-progress__bar {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 200ms ease;
}

.qz-body {
  overflow-y: auto;
  flex: 1;
  padding: 1.25rem 1.5rem;
}

.qz-question { margin-bottom: 2rem; }
.qz-question:last-child { margin-bottom: 0; }

.qz-question h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.qz-options { display: grid; gap: 0.25rem; }

.qz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.qz-option:hover {
  border-color: rgba(37, 99, 235, 0.5);
  background: var(--accent-soft);
}

.qz-option input {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: none;
}

.qz-option--selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

.qz-option--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.qz-option--disabled:hover {
  border-color: var(--border);
  background: transparent;
}

.qz-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  margin: 0.35rem 0 0 0.25rem;
}

.qz-foot {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex: none;
}

.qz-card--narrow .qz-foot { border-top: none; padding-top: 0.25rem; }

/* Contact step */

.qz-title { font-size: 1.25rem; font-weight: 600; margin: 0.75rem 0 0.15rem; }
.qz-subtitle { font-size: 0.875rem; color: var(--muted); margin: 0; }

.qz-fields {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.qz-field { display: grid; gap: 0.3rem; }

.qz-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.8);
}

.qz-field input {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 150ms ease;
}
.qz-field input:focus { border-color: var(--primary); outline: none; }

/* Honeypot — visually hidden, not display:none-only (bots skip those less) */
.qz-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.qz-error {
  margin: 0.75rem 1.5rem 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

/* Results */

.qz-results { padding: 0 1.5rem 1.5rem; text-align: center; }

.qz-results__check {
  width: 4rem;
  height: 4rem;
  margin: 0.5rem auto 0.75rem;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qz-results__check .icon { width: 2rem; height: 2rem; color: var(--primary); }

.qz-score {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.qz-level {
  display: inline-block;
  background: var(--muted-bg);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
}

.qz-level-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.6rem auto 1.25rem;
  max-width: 22rem;
}

.qz-report {
  background: linear-gradient(135deg, var(--primary-soft), rgba(30, 58, 138, 0.12));
  border: 1px solid rgba(30, 58, 138, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.qz-report .icon { width: 2rem; height: 2rem; color: var(--primary); }
.qz-report h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.qz-report p { font-size: 0.78rem; color: var(--muted); margin: 0; }
.qz-report .btn { width: 100%; }

.qz-madeby {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  font-size: 0.75rem;
  color: var(--muted);
}
.qz-madeby__row { display: flex; align-items: center; gap: 0.5rem; }
.qz-madeby img { height: 1rem; width: auto; }
.qz-madeby p { margin: 0; opacity: 0.8; }

/* Spinner on the submit button */

.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

body.qz-open { overflow: hidden; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__orb { animation: none; }
  .spinner { animation-duration: 1.5s; }
  .qz-overlay, .qz-card { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
