/* Theme: Samyak AI - premium AI-product redesign.
   Foundation: deep midnight navy/indigo page background with soft violet,
   blue and cyan glows. Content (question cards, result cards, lead card)
   sits on bright, near-opaque white surfaces for readability - "restrained
   glassmorphism", not glass everywhere. Loads AFTER recommend.css and only
   restyles existing selectors plus the small set of new elements added in
   recommend.html (.rec-ai-badge, .hero-*, .progress-top-row,
   .progress-percent, .progress-microcopy, .next-hint, .question-icon-tile,
   .option-icon-tile, .option-check, the icon <svg> inside .best-card-sticker)
   and recommend.js (which builds small inline SVG icons instead of emoji).
   No scoring, course data, or lead-capture logic changes required. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --rec-accent: #6d5bff;
  --rec-accent-dark: #4c3cd6;
  --rec-blue: #3b82f6;
  --rec-cyan: #22d3ee;
  --rec-bg: #05060f;
  --rec-surface: #ffffff;
  --rec-border: #e6e8f5;
  --rec-whatsapp: #22c55e;
  --ink: #0f1230;
  --ink-muted: #5b5f7a;
  --on-dark: #eef0ff;
  --on-dark-muted: rgba(238, 240, 255, 0.68);
  --card-shadow: 0 2px 6px rgba(5, 6, 15, 0.08), 0 18px 44px -10px rgba(76, 60, 214, 0.35);
}

* { -webkit-font-smoothing: antialiased; }

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  /* Deliberately NOT setting a page-wide `color` override here - recommend.css
     already sets body's default text color to the dark --rec-text (readable
     on the white cards), and that needs to keep cascading into every card's
     text that doesn't set its own color. Only the specific elements that sit
     directly on the dark page background (header, hero, progress labels,
     etc.) get an explicit light color below - see each of those rules. */
  position: relative;
  overflow-x: hidden;
  /* Deep navy foundation with a few large, intentional glows - restrained
     to three hues (violet, blue, cyan), not a rainbow wash. */
  background-color: #05060f;
  background-image:
    radial-gradient(60% 46% at 18% 0%, rgba(109, 91, 255, 0.34), transparent 70%),
    radial-gradient(52% 40% at 100% 12%, rgba(59, 130, 246, 0.26), transparent 70%),
    radial-gradient(60% 48% at 82% 100%, rgba(34, 211, 238, 0.16), transparent 70%),
    linear-gradient(180deg, #080a1c 0%, #05060f 55%, #030308 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .rec-brand, .hero-title, .rec-title-sm, .result-kicker, .question-text {
  font-family: "Space Grotesk", "Inter", "Segoe UI", sans-serif;
}

html { overflow-x: hidden; }

/* ---------- Header: dark glass bar on the navy foundation ---------- */
.rec-header {
  background: rgba(8, 10, 28, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rec-brand {
  color: var(--on-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.rec-ai-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.14rem 0.46rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--rec-accent), var(--rec-cyan));
  color: #0b0d22;
}
.rec-nav a { color: var(--on-dark-muted); }
.rec-nav a:hover { color: var(--on-dark); }

/* ---------- Headings / copy that sit directly on the dark page (outside
   the light content cards) ---------- */
.rec-title-sm { color: var(--on-dark); font-weight: 700; }
#wizardSection > .rec-subtitle,
#followUpSection > .rec-subtitle { color: var(--on-dark-muted); }
.alt-heading { color: var(--on-dark-muted); }
.btn-link { color: var(--rec-cyan); }
.btn-link:hover { color: #67e8f9; }

/* =====================================================================
   Hero / landing screen
   ===================================================================== */
.hero-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.75rem 0.5rem 1.5rem;
}

.hero-orb-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.9), transparent 22%),
    conic-gradient(from 180deg, var(--rec-accent), var(--rec-blue), var(--rec-cyan), var(--rec-accent));
  filter: blur(0.3px);
  box-shadow: 0 0 50px 6px rgba(109, 91, 255, 0.45), 0 0 90px 20px rgba(34, 211, 238, 0.22);
  animation: orb-pulse 6s ease-in-out infinite;
}
.hero-orb-core {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfd3ff 40%, rgba(255,255,255,0) 72%);
  opacity: 0.9;
}
.hero-orb-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(238, 240, 255, 0.22);
  animation: orb-spin 18s linear infinite;
}
.hero-orb-ring::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--rec-cyan);
  box-shadow: 0 0 10px 2px rgba(34, 211, 238, 0.8);
}
@keyframes orb-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}
@keyframes orb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9cdff;
  background: rgba(109, 91, 255, 0.16);
  border: 1px solid rgba(109, 91, 255, 0.35);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero-eyebrow-icon { width: 14px; height: 14px; color: var(--rec-cyan); }

.hero-title {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  background: linear-gradient(120deg, #ffffff 10%, #cdd3ff 55%, #8ef3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  color: var(--on-dark-muted);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 420px;
  margin: 0 0 1.75rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 340px;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
}
.hero-cta svg { width: 18px; height: 18px; }

.hero-supporting {
  color: var(--on-dark-muted);
  font-size: 0.86rem;
  margin: 1rem 0 0.35rem;
}
.hero-trust {
  color: #9aa0d9;
  font-size: 0.8rem;
  margin: 0;
}
.hero-trust:not(:empty)::before {
  content: "✓ ";
  color: var(--rec-cyan);
}

/* =====================================================================
   Progress indicator
   ===================================================================== */
.progress-wrap { margin-bottom: 1.4rem; }
.progress-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.progress-label { color: var(--on-dark); font-weight: 600; font-size: 0.85rem; }
.progress-percent { color: var(--rec-cyan); font-weight: 700; font-size: 0.85rem; }
.progress-track {
  background: rgba(238, 240, 255, 0.14);
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, var(--rec-accent), var(--rec-blue), var(--rec-cyan));
  box-shadow: 0 0 10px rgba(109, 91, 255, 0.6);
  border-radius: 999px;
}
.progress-microcopy {
  color: var(--on-dark-muted);
  font-size: 0.82rem;
  margin: 0.6rem 0 0;
  text-align: center;
}

/* =====================================================================
   Question / result / lead cards - bright surfaces on the dark page
   ===================================================================== */
.question-card, .result-card {
  background: var(--rec-surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

/* Fade + slide-up reveal, triggered by spatial-fx.js adding this class to a
   card whenever its content is freshly rendered. Fast and purposeful (0.4s),
   and entirely skipped when prefers-reduced-motion is set (see bottom). */
.card-in { animation: card-float-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes card-float-in {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

.question-text {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
}
.question-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(109, 91, 255, 0.14), rgba(34, 211, 238, 0.14));
  color: var(--rec-accent-dark);
}
.question-icon-tile svg { width: 19px; height: 19px; }

/* ---------- Answer cards ---------- */
.option-card {
  position: relative;
  background: #fafaff;
  border: 1.5px solid var(--rec-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.option-card:hover {
  border-color: #c7c9f5;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(76, 60, 214, 0.1);
}
.option-card:active { transform: translateY(0) scale(0.99); }
.option-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border-radius: 10px;
  background: #eef0fb;
  color: #585ea8;
  transition: background 0.15s ease, color 0.15s ease;
}
.option-icon-tile svg { width: 17px; height: 17px; }
.option-label { flex: 1; color: var(--ink); }
.option-check {
  width: 18px;
  height: 18px;
  color: var(--rec-accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.option-check svg { width: 18px; height: 18px; }

.option-card.selected {
  border-color: var(--rec-accent);
  background: linear-gradient(120deg, rgba(109, 91, 255, 0.07), rgba(34, 211, 238, 0.05));
  box-shadow: 0 0 0 1px rgba(109, 91, 255, 0.25), 0 8px 20px rgba(76, 60, 214, 0.14);
}
.option-card.selected .option-label { color: var(--ink); font-weight: 600; }
.option-card.selected .option-icon-tile {
  background: linear-gradient(135deg, var(--rec-accent), var(--rec-blue));
  color: #fff;
}
.option-card.selected .option-check { opacity: 1; transform: scale(1); }

/* ---------- Navigation ---------- */
/* .wizard-nav's layout (flex + space-between) is left exactly as set in
   recommend.css - only button colors/shape are themed here. */
.btn { border-radius: 12px; font-family: "Inter", sans-serif; }
.btn-primary {
  background: linear-gradient(120deg, var(--rec-accent), var(--rec-blue));
  box-shadow: 0 8px 22px rgba(76, 60, 214, 0.38);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(76, 60, 214, 0.48);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { background: rgba(109, 91, 255, 0.28); box-shadow: none; color: rgba(255,255,255,0.75); }
.btn-ghost {
  background: rgba(238, 240, 255, 0.06);
  color: var(--on-dark);
  border: 1.5px solid rgba(238, 240, 255, 0.25);
}
.btn-ghost:hover { background: rgba(238, 240, 255, 0.12); }
.btn-secondary { background: #eef0fb; color: #4c3cd6; }
.btn-whatsapp { background: linear-gradient(120deg, #22c55e, #16a34a); }

.next-hint {
  text-align: center;
  color: var(--on-dark-muted);
  font-size: 0.8rem;
  margin: 0.6rem 0 0;
}

/* =====================================================================
   Result screen
   ===================================================================== */
.best-card {
  position: relative;
  border-color: rgba(109, 91, 255, 0.35);
  box-shadow: 0 2px 6px rgba(5,6,15,0.08), 0 20px 50px -12px rgba(109, 91, 255, 0.5);
}
.best-card-sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: absolute;
  top: -13px;
  right: 18px;
  background: linear-gradient(120deg, var(--rec-accent), var(--rec-cyan));
  color: #0b0d22;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(76, 60, 214, 0.4);
}
.best-card-sticker svg { width: 13px; height: 13px; }
.result-kicker { color: var(--rec-accent-dark); font-weight: 700; }
.match-score-badge {
  background: linear-gradient(120deg, rgba(109,91,255,0.14), rgba(34,211,238,0.14));
  color: var(--rec-accent-dark);
  font-weight: 700;
  border: 1px solid rgba(109, 91, 255, 0.25);
}
.match-card h4 { color: var(--ink); }
.tag { background: #eef0fb; color: #3d3f6b; }

.no-match-card h2 { color: var(--ink); }

/* ---------- Lead capture ---------- */
.lead-card { background: #ffffff; }
.lead-fields .input { border-color: var(--rec-border); background: #fafaff; }
.lead-fields .input:focus { outline: none; border-color: var(--rec-accent); box-shadow: 0 0 0 3px rgba(109,91,255,0.15); }
.consent-row input[type="checkbox"] { accent-color: var(--rec-accent); }

/* =====================================================================
   Responsive - desktop gets a wider, more deliberate composition instead
   of a narrow mobile column stretched across the screen.
   ===================================================================== */
@media (min-width: 860px) {
  .rec-header-inner { max-width: 880px; }
  .rec-main { max-width: 760px; padding-top: 2.5rem; padding-bottom: 4rem; }
  .hero-title { font-size: 2.75rem; }
  .hero-subtitle { max-width: 520px; font-size: 1.1rem; }
  .question-card, .result-card { padding: 2rem 2.3rem; }
  .option-grid { gap: 0.9rem; }
}

/* =====================================================================
   Reduced motion - every animation/transition above is disabled outright.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
