/* ==========================================================================
   Career Mentors — global stylesheet (mobile-first)
   Breakpoints: 768px (tablet) | 1200px (desktop)
   1.  Design tokens (CSS custom properties)
   2.  Reset
   3.  Base elements & accessibility helpers
   4.  Layout: container, section, grid & flex utilities
   5.  Components: buttons, cards, badges, avatars, progress
   6.  Site header & navigation (sticky + hamburger)
   7.  Hero
   8.  How it works
   9.  Success stories
   10. Contact
   11. Footer
   12. Camera permission modal & live preview
   13. Skill test (questions, progress, evaluation)
   14. Dashboard (score chart, pass/fail, confetti)
   15. Responsive enhancements (768px+, 1200px+)
   16. Reduced motion & print
   ========================================================================== */

/* 1. Design tokens ========================================================= */
:root {
  /* Brand palette */
  --color-primary: #1e3a8a;
  --color-primary-strong: #16306f;
  --color-primary-soft: #dbe4fb;
  --color-primary-tint: #eef2fe;
  --color-accent: #f59e0b;
  --color-accent-strong: #d97706;
  --color-accent-tint: #fef3c7;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-on-dark: #e2e8f0;
  --color-border: #e2e8f0;

  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.0625rem, 0.4vw + 0.98rem, 1.15rem);
  --fs-h3: clamp(1.125rem, 0.6vw + 1rem, 1.375rem);
  --fs-h2: clamp(1.7rem, 2.4vw + 1.05rem, 2.6rem);
  --fs-h1: clamp(2.1rem, 5vw + 0.4rem, 3.75rem);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-base: 1.65;

  /* Spacing scale */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(3.25rem, 7vw, 6rem);
  --header-height: 4.25rem;
  --grid-gap: clamp(1.25rem, 3vw, 2rem);

  /* Radii, shadows, motion */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.14);
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* Stacking */
  --z-nav: 90;
  --z-header: 100;
  --z-skip: 200;
  --z-camera: 300;
}

/* 2. Reset ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-sm));
}

body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* The hidden attribute must always win, even over flex/grid components. */
[hidden] {
  display: none !important;
}

/* 3. Base elements & accessibility helpers ================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
}

h4 {
  font-size: var(--fs-md);
}

p {
  text-wrap: pretty;
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: var(--z-skip);
  padding: var(--space-xs) var(--space-md);
  background-color: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -130%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.text-accent {
  color: var(--color-accent);
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.eyebrow--on-dark {
  color: var(--color-accent);
}

/* 4. Layout: container, section, grid & flex utilities ==================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-pad);
}

.section--alt {
  background-color: var(--color-surface-alt);
}

.section--primary {
  background-color: var(--color-primary);
  color: var(--color-on-dark);
}

.section--primary .section__title,
.section--primary h2 {
  color: var(--color-surface);
}

.section__header {
  display: grid;
  gap: var(--space-xs);
  justify-items: center;
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
  text-align: center;
}

.section__title {
  font-size: var(--fs-h2);
}

.section__lead,
.section__header p:not(.eyebrow) {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

.section--primary .section__lead {
  color: var(--color-on-dark);
  opacity: 0.9;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.stack > * + * {
  margin-top: var(--stack-gap, var(--space-sm));
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

/* Structural hooks: layout children that inherit their styling from the grid
   or flex parent and therefore need no declarations of their own —
   .nav__item, .hero-card__meter-label, .footer__nav, .footer__contact. */

/* 5. Components =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
  transform: none;
  box-shadow: none;
}

.btn--ghost:disabled:hover,
.btn--ghost[disabled]:hover {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn--lg {
  min-height: 3.25rem;
  padding: 0.9rem 1.75rem;
  font-size: var(--fs-base);
}

.btn--block {
  width: 100%;
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.btn--accent:hover {
  background-color: var(--color-accent-strong);
  color: var(--color-text);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.45);
  transform: translateY(-3px) scale(1.035);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-primary-tint);
}

.section--primary .btn--ghost {
  border-color: rgba(248, 250, 252, 0.45);
  color: var(--color-surface);
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.25rem, 3vw, 1.85rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-soft);
  color: var(--color-primary-strong);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.avatar--sm {
  width: 2.25rem;
  height: 2.25rem;
  font-size: var(--fs-xs);
}

.progress {
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-alt);
  overflow: hidden;
}

.progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background-color: var(--color-accent);
}

/* 6. Site header & navigation (sticky + hamburger) ======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition-base), border-color var(--transition-base),
    background-color var(--transition-base);
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  min-height: var(--header-height);
  padding-block: var(--space-2xs);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__mark {
  display: inline-flex;
}

.brand__mark svg {
  width: 2rem;
  height: 2rem;
}

.brand__text {
  color: var(--color-text);
}

.brand__accent {
  color: var(--color-accent);
}

/* Hamburger button — visible below 768px */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-primary);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.nav-toggle:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-tint);
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: var(--radius-pill);
  background-color: currentColor;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Collapsible mobile navigation panel */
.nav {
  display: none;
  order: 3;
  flex-basis: 100%;
  flex-direction: column;
  gap: var(--space-sm);
  padding-block: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
}

.nav.is-open {
  display: flex;
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-base);
  font-weight: 500;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav__link:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-tint);
}

.nav__link.is-active {
  color: var(--color-primary);
  font-weight: 600;
}

.nav__cta {
  width: 100%;
}

/* Progressive enhancement: with JavaScript disabled the collapsible panel
   cannot be toggled, so keep every destination reachable at all widths. */
.no-js .nav {
  display: flex;
}

.no-js .nav-toggle {
  display: none;
}

/* 7. Hero ================================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -25%;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background-image: radial-gradient(circle, rgba(30, 58, 138, 0.14), transparent 68%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  align-items: center;
}

.hero__content {
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 800;
}

.hero__lead {
  max-width: 34rem;
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  width: 100%;
  margin-top: var(--space-2xs);
}

.hero__actions .btn {
  flex: 1 1 auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.stats__item {
  display: grid;
  gap: 0.15rem;
}

.stats__value {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-primary);
}

.stats__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.hero__visual {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}

/* Fade-in on scroll (classes toggled by js/app.js) ------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Without JavaScript the content must never stay hidden. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* Resume upload zone ------------------------------------------------------ */
.uploader {
  display: grid;
  gap: var(--space-sm);
}

.uploader__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xs);
}

.uploader__heading {
  font-size: var(--fs-h3);
}

.uploader__subheading {
  margin-top: 0.15rem;
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.uploader__dropzone {
  position: relative;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: clamp(1.5rem, 4vw, 2.25rem) var(--space-md);
  background-color: var(--color-primary-tint);
  border: 2px dashed var(--color-primary-soft);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  animation: uploader-pulse 2.6s ease-in-out infinite;
  transition: border-color var(--transition-base), background-color var(--transition-base),
    transform var(--transition-base);
}

.uploader__dropzone:hover {
  background-color: var(--color-primary-soft);
  border-color: var(--color-primary);
}

/* Drag-over feedback: border colour change + background tint. */
.uploader__dropzone.is-dragover {
  background-color: var(--color-accent-tint);
  border-color: var(--color-accent);
  border-style: solid;
  transform: scale(1.01);
}

.uploader__dropzone:hover,
.uploader__dropzone.is-dragover {
  animation-play-state: paused;
}

.uploader__icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.uploader__title {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: 600;
}

.uploader__hint {
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
}

.uploader__browse-row {
  margin-top: 0.35rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.uploader__browse {
  padding: 0;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.uploader__browse:hover {
  color: var(--color-accent-strong);
}

/* Upload error message ---------------------------------------------------- */
.uploader__error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  padding: 0.7rem 0.85rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #b91c1c;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.45;
}

.uploader__error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background-color: #b91c1c;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
}

/* Note under the Start Test button: limited access or blocked camera. */
.uploader__note {
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
  text-align: center;
}

.uploader__note.is-error {
  color: #b91c1c;
  font-weight: 500;
}

/* Upload progress --------------------------------------------------------- */
.uploader__progress {
  display: grid;
  gap: 0.4rem;
}

.uploader__progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-xs);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}

.uploader__progress-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploader__progress-value {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
}

.uploader__status {
  min-height: 1.25rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.uploader__status.is-success {
  color: #15803d;
}

/* Camera permission notice ------------------------------------------------ */
.camera-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background-color: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.camera-notice__icon {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--color-primary);
}

.camera-notice__text {
  margin: 0;
}

/* Information icon + tooltip ---------------------------------------------- */
.tooltip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.tooltip__trigger {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-surface);
  cursor: help;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.tooltip__trigger:hover,
.tooltip__trigger:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-text);
  transform: scale(1.1);
}

.tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: -0.35rem;
  z-index: 5;
  width: max-content;
  max-width: min(17rem, 78vw);
  padding: 0.6rem 0.7rem;
  background-color: var(--color-text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--color-surface);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
  transition: opacity var(--transition-base), transform var(--transition-base),
    visibility var(--transition-base);
}

.tooltip__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0.75rem;
  border: 0.35rem solid transparent;
  border-top-color: var(--color-text);
}

.tooltip:hover .tooltip__bubble,
.tooltip:focus-within .tooltip__bubble,
.tooltip.is-open .tooltip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Animations -------------------------------------------------------------- */
@keyframes uploader-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.22);
  }

  70% {
    box-shadow: 0 0 0 0.6rem rgba(30, 58, 138, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(30, 58, 138, 0);
  }
}

/* 8. How it works ========================================================= */
.steps {
  counter-reset: step;
  margin: 0;
  list-style: none;
}

.step {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step__number {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-2xs);
  border-radius: var(--radius-md);
  background-color: var(--color-primary);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.step__title {
  font-size: var(--fs-h3);
}

.step__text {
  color: var(--color-text-muted);
  font-size: var(--fs-base);
}

/* 9. Success stories ====================================================== */
.stories {
  align-items: stretch;
}

.story {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  justify-content: space-between;
}

.story__quote {
  position: relative;
  margin: 0;
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}

.story__quote::before {
  content: "\201C";
  display: block;
  margin-bottom: -0.4rem;
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.6;
}

.story__quote p {
  margin: 0;
}

.story__person {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.story__name {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.story__role {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-subtle);
}

/* 10. Contact ============================================================= */
.contact {
  align-items: start;
}

.contact__intro {
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
}

.contact__lead {
  max-width: 32rem;
  color: var(--color-on-dark);
  font-size: var(--fs-md);
  opacity: 0.88;
}

.contact__details {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-2xs);
  list-style: none;
}

.contact__details li {
  display: grid;
  gap: 0.15rem;
}

.contact__label {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.contact__value {
  color: var(--color-surface);
  font-size: var(--fs-md);
  font-weight: 500;
  word-break: break-word;
}

a.contact__value:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.contact-form {
  display: grid;
  gap: var(--space-sm);
  color: var(--color-text);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field__label {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.field__input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.field__input::placeholder {
  color: var(--color-text-subtle);
}

.field__input:focus {
  outline: none;
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.field__input--textarea {
  min-height: 7rem;
  resize: vertical;
}

.field__input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.field__error {
  color: #b91c1c;
  font-size: var(--fs-xs);
}

.form-status {
  min-height: 1.25rem;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.form-status.is-success {
  color: #15803d;
}

.form-status.is-error {
  color: #b91c1c;
}

/* 11. Footer ============================================================== */
.site-footer {
  padding-block: var(--space-xl) var(--space-md);
  background-color: var(--color-text);
  color: var(--color-on-dark);
}

.footer__inner {
  display: grid;
  gap: var(--space-lg);
}

.footer__brand {
  display: grid;
  gap: var(--space-xs);
  max-width: 26rem;
}

.brand--footer {
  color: var(--color-accent);
}

.brand--footer .brand__text {
  color: var(--color-surface);
}

.footer__tagline {
  color: rgba(226, 232, 240, 0.75);
  font-size: var(--fs-sm);
}

.footer__heading {
  margin-bottom: var(--space-xs);
  color: var(--color-surface);
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer__list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  list-style: none;
}

.footer__link {
  color: rgba(226, 232, 240, 0.8);
  font-size: var(--fs-sm);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(226, 232, 240, 0.15);
}

.footer__copy,
.footer__legal {
  color: rgba(226, 232, 240, 0.65);
  font-size: var(--fs-xs);
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 12. Camera permission modal & live preview ============================== */
.camera-modal {
  position: fixed;
  inset: 0;
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  background-color: transparent;
  border: 0;
  overflow: visible;
}

.camera-modal::backdrop {
  background-color: rgba(15, 23, 42, 0.55);
}

@supports (backdrop-filter: blur(2px)) {
  .camera-modal::backdrop {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

.camera-modal__panel {
  display: grid;
  gap: var(--space-sm);
  justify-items: center;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

/* Slide-up entrance for the panel, fade-in for the blurred backdrop. */
.camera-modal[open] .camera-modal__panel {
  animation: modal-slide-up 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.camera-modal[open]::backdrop {
  animation: modal-backdrop-in 340ms ease;
}

.camera-modal__icon {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background-color: var(--color-accent-tint);
  color: var(--color-accent-strong);
}

.camera-modal__title {
  font-size: var(--fs-h3);
}

.camera-modal__text {
  color: var(--color-text-muted);
  font-size: var(--fs-base);
}

.camera-modal__list {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  list-style: none;
  text-align: left;
}

.camera-modal__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.camera-modal__list li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background-color: #16a34a;
}

.camera-modal__error {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #b91c1c;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: left;
}

.camera-modal__actions {
  display: grid;
  gap: var(--space-2xs);
  width: 100%;
  margin-top: var(--space-2xs);
}

/* Live surveillance preview — 60px circle, bottom-right corner. */
.camera-preview {
  position: fixed;
  right: clamp(0.75rem, 3vw, 1.5rem);
  bottom: clamp(0.75rem, 3vw, 1.5rem);
  z-index: var(--z-camera);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none; /* passive indicator: never blocks the page */
}

.camera-preview__live {
  padding: 0.1rem 0.5rem;
  background-color: #dc2626;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-preview__video {
  width: 60px;
  height: 60px;
  object-fit: cover;
  background-color: var(--color-text);
  border: 2px solid #dc2626;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transform: scaleX(-1); /* mirror the self-view */
  animation: camera-pulse 1.8s ease-in-out infinite;
}

@keyframes camera-pulse {
  0%,
  100% {
    border-color: #dc2626;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45), var(--shadow-md);
  }

  50% {
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: 0 0 0 0.4rem rgba(220, 38, 38, 0), var(--shadow-md);
  }
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(1.75rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 13. Skill test ========================================================== */
.skill-test {
  /* scrollIntoView() must clear the sticky header. */
  scroll-margin-top: calc(var(--header-height) + var(--space-sm));
}

.skill-test__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.skill-test__title {
  font-size: var(--fs-h2);
}

/* Elapsed time, top-right. No limit — it only records. */
.skill-test__timer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.skill-test__timer-icon {
  display: inline-flex;
  color: var(--color-accent-strong);
}

/* Progress bar ------------------------------------------------------------ */
.test-progress {
  display: grid;
  gap: 0.4rem;
  margin-bottom: var(--space-sm);
}

.test-progress__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-xs);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.test-progress__label strong {
  color: var(--color-text);
  font-family: var(--font-heading);
}

.test-progress__percent {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.test-progress__track {
  height: 0.6rem;
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.test-progress__bar {
  display: block;
  height: 100%;
  background-color: var(--color-accent);
  border-radius: inherit;
  transition: width var(--transition-base);
}

/* Panel ------------------------------------------------------------------- */
.test-panel {
  display: grid;
  gap: var(--space-sm);
  max-width: 54rem;
  margin-inline: auto;
}

.test-state {
  display: grid;
  gap: var(--space-sm);
  justify-items: center;
  padding: var(--space-lg) var(--space-sm);
  text-align: center;
}

.test-state__title {
  font-size: var(--fs-h3);
}

.test-state__message {
  max-width: 34rem;
  color: var(--color-text-muted);
}

.test-state--error .test-state__message {
  color: #b91c1c;
  font-weight: 500;
}

/* Loading / evaluating spinner */
.spinner {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  border: 3px solid var(--color-primary-soft);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spinner-spin 800ms linear infinite;
}

@keyframes spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Question ---------------------------------------------------------------- */
.test-question {
  /* Keeps the panel from jumping in height between questions. */
  min-height: 18rem;
}

.test-question__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.test-question__count {
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.test-question__text {
  margin-bottom: var(--space-md);
}

/* MCQ options: stacked on mobile, two columns from 768px up. */
.test-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  border: 0;
}

.test-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  padding: 0.75rem 0.85rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.test-option:hover {
  background-color: var(--color-primary-tint);
  border-color: var(--color-primary);
}

.test-option:has(.test-option__input:checked) {
  background-color: var(--color-primary-tint);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.test-option:has(.test-option__input:focus-visible) {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.test-option__input {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--color-primary);
}

.test-option__text {
  font-size: var(--fs-sm);
  line-height: 1.5;
}

/* Open-ended answer ------------------------------------------------------- */
.test-open {
  display: grid;
  gap: 0.35rem;
}

.test-open__input {
  width: 100%;
  min-height: 9rem;
  padding: 0.85rem 0.9rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.test-open__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.test-open__counter {
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
  text-align: right;
}

/* Navigation -------------------------------------------------------------- */
.test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.test-actions .btn {
  flex: 1 1 auto;
}

.test-status {
  min-height: 1.25rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: center;
}

.test-status.is-error {
  color: #b91c1c;
}

/* Result ------------------------------------------------------------------ */
.test-result__score {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.test-result__value {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

.test-result__unit {
  font-size: var(--fs-h3);
  font-weight: 600;
}

.test-result__list {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  list-style: none;
  text-align: left;
}

.test-result__item {
  padding-left: 0.85rem;
  border-left: 3px solid var(--color-primary-soft);
}

.test-result__item.is-correct {
  border-left-color: #16a34a;
}

.test-result__item.is-incorrect {
  border-left-color: var(--color-accent);
}

/* Two-column options and a right-aligned action bar from tablet up. */
@media (min-width: 768px) {
  .test-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-actions {
    justify-content: flex-end;
  }

  .test-actions .btn {
    flex: 0 1 auto;
  }
}

/* 14. Dashboard =========================================================== */
.dashboard {
  position: relative;
  overflow: hidden; /* keeps the confetti inside the section */
  scroll-margin-top: calc(var(--header-height) + var(--space-sm));
}

.dashboard__header {
  margin-bottom: var(--space-md);
  text-align: center;
}

.dashboard__title {
  font-size: var(--fs-h2);
}

.dashboard__panel {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  justify-items: center;
  max-width: 54rem;
  margin-inline: auto;
  text-align: center;
}

/* Circular score chart ---------------------------------------------------- */
.score-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 11rem;
  height: 11rem;
}

.score-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Start the arc at 12 o'clock instead of 3 o'clock. */
  transform: rotate(-90deg);
}

.score-ring__track,
.score-ring__value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.score-ring__track {
  stroke: var(--color-primary-soft);
}

/* Initial paint only — js/dashboard.js recomputes these from the r attribute.
   For the r="70" circle in index.html, 2 × π × 70 ≈ 439.82. */
.score-ring__value {
  stroke: var(--color-accent);
  stroke-dasharray: 439.82;
  stroke-dashoffset: 439.82;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pass = green, fail = amber. */
.score-chart.is-pass .score-ring__value {
  stroke: #16a34a;
}

.score-chart.is-fail .score-ring__value {
  stroke: var(--color-accent);
}

.score-chart__readout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.1rem;
  justify-items: center;
}

.score-chart__value {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 8vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.score-chart__total {
  color: var(--color-text-subtle);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.score-chart__label {
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Pass / fail outcome ----------------------------------------------------- */
.dashboard__body {
  display: grid;
  gap: var(--space-sm);
  width: 100%;
}

.dashboard__outcome {
  display: grid;
  gap: var(--space-xs);
  justify-items: center;
}

.dashboard__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard__badge--pass {
  background-color: #dcfce7;
  color: #15803d;
}

.dashboard__badge--fail {
  background-color: var(--color-accent-tint);
  color: #b45309;
}

.dashboard__message {
  max-width: 34rem;
  color: var(--color-text);
  font-size: var(--fs-md);
  font-weight: 500;
  text-wrap: pretty;
}

.dashboard__encouragement {
  max-width: 34rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-style: italic;
}

.dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  justify-content: center;
  width: 100%;
  margin-top: var(--space-2xs);
}

.dashboard__note {
  min-height: 1.25rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* Razorpay checkout feedback (owned by js/razorpay.js). */
.dashboard__payment-status {
  max-width: 36rem;
  padding: 0.7rem 0.85rem;
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  text-align: left;
}

.dashboard__payment-status.is-success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
  font-weight: 500;
}

.dashboard__payment-status.is-error {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
  font-weight: 500;
}

.dashboard__payment-hint {
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
}

/* Confetti ---------------------------------------------------------------- */
.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti__piece {
  position: absolute;
  top: -0.75rem;
  width: 0.5rem;
  height: 0.85rem;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 2.4s ease-in forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0), 22rem, 0) rotate(540deg);
  }
}

/* Tablet and up: chart beside the message, everything left-aligned. */
@media (min-width: 768px) {
  .dashboard__panel {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .dashboard__outcome {
    justify-items: start;
  }

  .dashboard__actions {
    justify-content: flex-start;
  }
}

/* 15. Responsive enhancements ============================================ */
/* Tablet and up — 768px+ */
@media (min-width: 768px) {
  :root {
    --header-height: 4.75rem;
  }

  /* Swap the hamburger for an inline horizontal menu */
  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
    order: 0;
    flex-basis: auto;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    padding-block: 0;
    border-top: 0;
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xs);
  }

  .nav__link {
    padding: 0.5rem 0.75rem;
    font-size: var(--fs-sm);
  }

  .nav__cta {
    width: auto;
  }

  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero__actions .btn {
    flex: 0 1 auto;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact {
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .footer__inner {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

/* Desktop — 1200px+ */
@media (min-width: 1200px) {
  :root {
    --grid-gap: 2rem;
  }

  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }

  .hero__visual {
    padding-left: var(--space-md);
  }

  .contact {
    grid-template-columns: 1fr 1.05fr;
  }
}

/* Small phones — keep a comfortable 320px baseline */
@media (max-width: 359px) {
  .brand {
    font-size: 1rem;
  }

  .nav-toggle {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* 16. Reduced motion & print ============================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .step:hover,
  .tooltip__trigger:hover {
    transform: none;
  }

  /* Reveal content instantly instead of hiding it behind an animation. */
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .uploader__dropzone {
    animation: none;
  }

  /* The score ring lands directly on its value and the confetti is skipped. */
  .score-ring__value {
    transition: none;
  }

  .confetti {
    display: none;
  }
}

@media print {
  .site-header,
  .nav-toggle,
  .hero__visual,
  .contact-form,
  .skip-link {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .card,
  .site-footer {
    box-shadow: none;
    border: 1px solid #d4d4d4;
  }
}

