/* ==========================================================
   A1 Inspect Ltd — Modern Landing Page
   Minimal/clean aesthetic. Fluid typography and spacing.
   ========================================================== */

/* --- SELF-HOSTED INTER FONT --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

@layer reset, tokens, base, layout, components, utilities;

/* --- RESET --- */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
  }

  body {
    min-block-size: 100svh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

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

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

  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }

  h1, h2, h3, h4 { text-wrap: balance; }
  p, li { text-wrap: pretty; }

  a {
    color: inherit;
    text-decoration-skip-ink: auto;
  }

  ul, ol { list-style: none; }

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

/* --- TOKENS --- */
@layer tokens {
  :root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #dbeafe;
    --brand-gradient: linear-gradient(135deg, #2563eb, #1d4ed8);

    --surface-0: #ffffff;
    --surface-1: #f8fafc;
    --surface-2: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #6b7280;
    --border: #e2e8f0;

    --success: #059669;
    --error: #dc2626;

    /* Dark mode surfaces */
    --dark-surface-0: #0f172a;
    --dark-surface-1: #1e293b;
    --dark-surface-2: #334155;
    --dark-text-primary: #f1f5f9;
    --dark-text-secondary: #94a3b8;
    --dark-text-muted: #64748b;
    --dark-border: #334155;
    --dark-brand-light: #1e3a5f;

    /* Fluid Typography */
    --fs-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.875rem);
    --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    --fs-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    --fs-2xl: clamp(2rem, 1.5rem + 1.8vw, 3.25rem);
    --fs-3xl: clamp(2.5rem, 1.8rem + 2.5vw, 4.5rem);

    /* Fluid Spacing */
    --space-xs: clamp(0.5rem, 0.4rem + 0.3vw, 0.75rem);
    --space-s: clamp(0.75rem, 0.6rem + 0.5vw, 1rem);
    --space-m: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
    --space-l: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem);
    --space-xl: clamp(2rem, 1.5rem + 2vw, 4rem);
    --space-2xl: clamp(3rem, 2rem + 3.5vw, 6rem);
    --space-3xl: clamp(4rem, 2.5rem + 5vw, 8rem);

    --ease-out: cubic-bezier(0.2, 0, 0, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 100vw;

    --transition: 200ms var(--ease-out);
  }
}

/* --- BASE --- */
@layer base {
  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface-0);
  }

  h1 {
    font-size: var(--fs-3xl);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 700;
  }

  h2 {
    font-size: var(--fs-2xl);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
  }

  h3 {
    font-size: var(--fs-xl);
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-weight: 600;
  }

  p {
    max-inline-size: 65ch;
    color: var(--text-secondary);
    line-height: 1.7;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
  }

  :focus:not(:focus-visible) {
    outline: none;
  }
}

/* --- LAYOUT --- */
@layer layout {
  .container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-l);
  }

  .section {
    padding-block: var(--space-3xl);
  }

  .section-alt {
    padding-block: var(--space-3xl);
    background: var(--surface-1);
  }
}

/* --- COMPONENTS --- */
@layer components {

  /* Skip Link */
  .skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--brand);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 10001;
    font-weight: 500;
    text-decoration: none;
    transition: top 0.2s;
  }

  .skip-link:focus {
    top: 0;
  }

  /* ---- Navigation ---- */
  .navbar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
  }

  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
  }

  .nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
  }

  .nav-logo svg {
    color: var(--brand);
    flex-shrink: 0;
  }

  .nav-flags-wrapper {
    position: relative;
  }

  .nav-flags {
    font-size: 2.15rem;
    letter-spacing: 0.15em;
    line-height: 1;
  }

  .nav-flags-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-0);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: border-color var(--transition);
  }

  .nav-flags-toggle:hover {
    border-color: var(--text-muted);
  }

  .nav-flags-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 1001;
  }

  .nav-flags-dropdown.active {
    display: block;
  }

  .nav-flags-dropdown li {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
  }

  @media (max-width: 768px) {
    .nav-flags {
      display: none;
    }

    .nav-flags-toggle {
      display: flex;
    }
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-m);
  }

  .nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(1.2rem, 1.125rem + 0.3vw, 1.3rem);
    color: var(--text-secondary);
    transition: color var(--transition);
  }

  .nav-links a:hover {
    color: var(--text-primary);
  }

  .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
  }

  .mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition), opacity var(--transition);
  }

  @media (max-width: 768px) {
    .mobile-menu-toggle {
      display: flex;
    }

    .nav-links {
      display: none;
      position: absolute;
      top: 4rem;
      inset-inline: 0;
      background: var(--surface-0);
      border-bottom: 1px solid var(--border);
      flex-direction: column;
      padding: var(--space-m);
      gap: var(--space-s);
    }

    .nav-links.active {
      display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
      opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
      transform: rotate(-45deg) translate(7px, -6px);
    }
  }

  /* ---- Buttons ---- */
  .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.75em 1.75em;
    background: var(--brand-gradient);
    color: white;
    font-weight: 600;
    font-size: var(--fs-sm);
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition:
      translate 150ms var(--ease-out),
      box-shadow 150ms var(--ease-out);
  }

  .btn-primary:hover {
    translate: 0 -1px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  }

  .btn-primary:active {
    translate: 0 0;
    box-shadow: none;
    transition-duration: 50ms;
  }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.75em 1.75em;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--fs-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition:
      background var(--transition),
      border-color var(--transition);
  }

  .btn-secondary:hover {
    background: var(--surface-1);
    border-color: var(--text-muted);
  }

  .btn-large {
    padding: 1rem 2.25rem;
    font-size: var(--fs-base);
  }

  .btn-sm {
    padding: 0.5em 1.25em;
    font-size: var(--fs-sm);
  }

  /* ---- Section Header ---- */
  .section-header {
    text-align: center;
    margin-block-end: var(--space-2xl);
  }

  .section-header .overline {
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    margin-block-end: var(--space-xs);
  }

  .section-header h2 {
    margin-block-end: var(--space-s);
  }

  .section-header p {
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    max-inline-size: 55ch;
    margin-inline: auto;
  }

  /* ---- Hero ---- */
  .hero {
    position: relative;
    padding-block-start: calc(4rem + var(--space-3xl));
    padding-block-end: var(--space-3xl);
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    text-align: center;
    overflow: hidden;
  }

  /* Hero Backdrop Carousel */
  .hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .hero-backdrop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s var(--ease-out);
  }

  .hero-backdrop img.active {
    opacity: 1;
  }

  .hero-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.5) 40%,
      rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
  }

  .hero:has(.hero-backdrop) .hero-content {
    position: relative;
    z-index: 2;
  }

  .hero:has(.hero-backdrop) .hero-eyebrow {
    color: #fff;
  }

  .hero:has(.hero-backdrop) h1 {
    color: #fff;
  }

  .hero:has(.hero-backdrop) .gradient-text {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #fff;
    background-clip: unset;
  }

  .hero:has(.hero-backdrop) .hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
  }

  .hero:has(.hero-backdrop) .stat-number {
    color: #fff;
  }

  .hero:has(.hero-backdrop) .stat-label {
    color: rgba(255, 255, 255, 0.85);
  }

  .hero:has(.hero-backdrop) .btn-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
  }

  .hero:has(.hero-backdrop) .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-backdrop img {
      transition: none;
    }
    .hero-backdrop img:not(:first-child) {
      display: none;
    }
    .hero-backdrop img:first-child {
      opacity: 1;
    }
  }

  .hero-content {
    max-width: 800px;
    margin-inline: auto;
  }

  .hero-eyebrow {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-block-end: var(--space-s);
  }

  .hero h1 {
    margin-block-end: var(--space-m);
  }

  .gradient-text {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-subtitle {
    font-size: var(--fs-lg);
    margin-block-end: var(--space-xl);
    margin-inline: auto;
  }

  .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-s);
    margin-block-end: var(--space-2xl);
  }

  .hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
  }

  .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .stat-number {
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--brand);
  }

  .stat-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* ---- Social Proof Bar ---- */
  .social-proof-bar {
    padding-block: var(--space-xl);
    border-bottom: 1px solid var(--border);
  }

  .proof-label {
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-block-end: var(--space-m);
  }

  .trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-l);
    flex-wrap: wrap;
  }

  .badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
  }

  .badge svg {
    width: 20px;
    height: 20px;
    color: var(--brand);
    flex-shrink: 0;
  }

  /* ---- Card Grid ---- */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--space-l);
  }

  .card {
    padding: var(--space-l);
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition:
      translate 300ms var(--ease-out),
      box-shadow 300ms var(--ease-out),
      border-color 300ms var(--ease-out);
  }

  .card:hover {
    translate: 0 -4px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--brand);
  }

  .card-icon {
    width: 48px;
    height: 48px;
    background: var(--brand-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-block-end: var(--space-m);
    color: var(--brand);
  }

  .card h3 {
    font-size: var(--fs-lg);
    margin-block-end: var(--space-xs);
  }

  .card > p {
    margin-block-end: var(--space-m);
  }

  .service-features {
    padding: 0;
  }

  .service-features li {
    padding: 0.4rem 0;
    padding-inline-start: 1.5rem;
    color: var(--text-secondary);
    position: relative;
    font-size: var(--fs-sm);
  }

  .service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    opacity: 0.5;
  }

  /* ---- Process Steps ---- */
  .process-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 900px;
    margin-inline: auto;
  }

  .process-step {
    flex: 1;
    text-align: center;
    padding-inline: var(--space-m);
  }

  .process-step h3 {
    font-size: var(--fs-lg);
    margin-block-end: var(--space-xs);
  }

  .process-step p {
    font-size: var(--fs-sm);
    line-height: 1.7;
  }

  .step-number {
    width: 48px;
    height: 48px;
    background: var(--brand-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto var(--space-m);
  }

  .process-connector {
    width: 80px;
    height: 2px;
    background: var(--border);
    margin-top: 24px;
    flex-shrink: 0;
  }

  @media (max-width: 768px) {
    .process-steps {
      flex-direction: column;
      align-items: center;
    }

    .process-connector {
      width: 2px;
      height: 40px;
      margin: 0;
    }
  }

  /* ---- Features Grid (About) ---- */
  .features-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }

  .feature-item {
    display: flex;
    gap: var(--space-s);
    align-items: flex-start;
    padding: var(--space-m);
  }

  .feature-check {
    width: 32px;
    height: 32px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .feature-item h3 {
    font-size: var(--fs-base);
    font-weight: 600;
    margin-block-end: 0.25rem;
  }

  .feature-item p {
    font-size: var(--fs-sm);
  }

  /* ---- Inspector Profile ---- */
  .inspector-profile {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
    align-items: start;
    margin-block-start: var(--space-2xl);
    padding: var(--space-xl);
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
  }

  .inspector-photo {
    overflow: hidden;
    border-radius: var(--radius-lg);
  }

  .inspector-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-lg);
  }

  .inspector-bio .overline {
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    margin-block-end: var(--space-xs);
  }

  .inspector-bio h3 {
    font-size: var(--fs-xl);
    margin-block-end: 0.25rem;
  }

  .inspector-title {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--brand) !important;
    margin-block-end: var(--space-m);
  }

  .inspector-bio > p {
    margin-block-end: var(--space-s);
  }

  .inspector-credentials {
    margin-block-start: var(--space-m);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: var(--space-xs);
  }

  .inspector-credentials li {
    padding: 0.5rem 0;
    padding-inline-start: 1.5rem;
    position: relative;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
  }

  .inspector-credentials li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
  }

  @media (max-width: 768px) {
    .inspector-profile {
      grid-template-columns: 1fr;
      text-align: center;
    }

    .inspector-photo {
      max-width: 240px;
      margin-inline: auto;
    }

    .inspector-credentials {
      grid-template-columns: 1fr;
    }
  }

  /* ---- Testimonial Carousel ---- */
  .testimonials-carousel {
    position: relative;
    overflow: hidden;
    max-width: 700px;
    margin-inline: auto;
  }

  .carousel-track {
    display: flex;
    transition: translate 500ms var(--ease-out);
  }

  .carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    padding-inline: var(--space-xs);
  }

  .testimonial-card {
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-l);
    margin: 0;
  }

  /* Carousel Arrows */
  .carousel-arrow {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-0);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  }

  .carousel-arrow:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  }

  .carousel-arrow--prev {
    left: 0;
  }

  .carousel-arrow--next {
    right: 0;
  }

  /* Carousel Dots */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-block-start: var(--space-m);
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--border);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), width var(--transition);
  }

  .carousel-dot.active {
    width: 28px;
    background: var(--brand);
  }

  @media (max-width: 768px) {
    .carousel-arrow {
      width: 36px;
      height: 36px;
    }

    .carousel-arrow--prev {
      left: 0.25rem;
    }

    .carousel-arrow--next {
      right: 0.25rem;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .carousel-track {
      transition: none;
    }
  }

  .testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-block-end: var(--space-s);
  }

  .testimonial-text {
    font-size: var(--fs-base);
    line-height: 1.8;
    color: var(--text-primary);
    font-style: normal;
    margin-block-end: var(--space-m);
  }

  .testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-style: normal;
  }

  .testimonial-author strong {
    color: var(--text-primary);
    font-weight: 600;
  }

  .testimonial-author span {
    font-size: var(--fs-sm);
    color: var(--text-muted);
  }

  /* ---- FAQ ---- */
  .faq-list {
    max-width: 740px;
    margin-inline: auto;
  }

  .faq-item {
    border-bottom: 1px solid var(--border);
  }

  .faq-item summary {
    padding-block: var(--space-m);
    font-weight: 600;
    font-size: var(--fs-base);
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: rotate 200ms var(--ease-out), color 200ms var(--ease-out);
    flex-shrink: 0;
    margin-inline-start: var(--space-s);
  }

  .faq-item[open] summary::after {
    rotate: 45deg;
    color: var(--brand);
  }

  .faq-item summary::-webkit-details-marker {
    display: none;
  }

  .faq-answer {
    padding-block-end: var(--space-m);
  }

  .faq-answer p {
    line-height: 1.8;
    color: var(--text-secondary);
  }

  /* ---- Final CTA ---- */
  .final-cta {
    padding-block: var(--space-3xl);
    background: var(--text-primary);
    text-align: center;
  }

  .cta-content {
    max-width: 600px;
    margin-inline: auto;
  }

  .cta-content h2 {
    color: white;
    margin-block-end: var(--space-s);
  }

  .cta-content p {
    color: #94a3b8;
    font-size: var(--fs-lg);
    margin-block-end: var(--space-xl);
    margin-inline: auto;
  }

  .cta-buttons {
    display: flex;
    gap: var(--space-s);
    justify-content: center;
    flex-wrap: wrap;
  }

  .final-cta .btn-secondary {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
  }

  .final-cta .btn-secondary:hover {
    background: white;
    color: var(--text-primary);
    border-color: white;
  }

  /* ---- Contact ---- */
  .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
    gap: var(--space-2xl);
    max-width: 900px;
    margin-inline: auto;
  }

  .contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    background: var(--surface-0);
    padding: var(--space-l);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .form-group label {
    font-weight: 500;
    font-size: var(--fs-sm);
    color: var(--text-primary);
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    background: var(--surface-0);
    transition:
      border-color var(--transition),
      box-shadow var(--transition);
  }

  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }

  .form-group textarea {
    resize: vertical;
    min-height: 100px;
  }

  .contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
    padding-block-start: var(--space-s);
  }

  .contact-item h3 {
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-block-end: 0.25rem;
  }

  .contact-item a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
  }

  .contact-item a:hover {
    text-decoration: underline;
  }

  /* ---- Footer ---- */
  .footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    padding-block-start: var(--space-2xl);
  }

  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: var(--space-xl);
    padding-block-end: var(--space-xl);
  }

  .footer-logo {
    color: white;
  }

  .footer-logo svg {
    color: white;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
  }

  .footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--fs-sm);
  }

  .footer h3 {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: white;
    margin-block-end: var(--space-s);
  }

  .footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .footer-links a {
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--transition);
  }

  .footer-links a:hover {
    color: white;
  }

  .newsletter-input-group {
    display: flex;
    gap: var(--space-xs);
  }

  .newsletter-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: var(--fs-sm);
  }

  .newsletter-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }

  .newsletter-note {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.4);
    margin-block-start: var(--space-xs);
  }

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-block: var(--space-m);
  }

  .footer-bottom p {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.4);
  }

  /* ---- Theme Toggle ---- */
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-0);
    cursor: pointer;
    color: var(--text-secondary);
    transition:
      color var(--transition),
      background var(--transition),
      border-color var(--transition);
  }

  .theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
  }

  /* Show sun in dark mode, moon in light mode */
  .icon-sun { display: none; }
  .icon-moon { display: block; }

  [data-theme="dark"] .icon-sun { display: block; }
  [data-theme="dark"] .icon-moon { display: none; }

  /* ---- Animations ---- */
  @keyframes page-enter {
    from { opacity: 0; translate: 0 1.5rem; }
  }

  .hero-content > * {
    animation: page-enter 0.6s var(--ease-out) both;
  }

  .hero-content > :nth-child(1) { animation-delay: 0ms; }
  .hero-content > :nth-child(2) { animation-delay: 80ms; }
  .hero-content > :nth-child(3) { animation-delay: 160ms; }
  .hero-content > :nth-child(4) { animation-delay: 240ms; }
  .hero-content > :nth-child(5) { animation-delay: 320ms; }

  /* Scroll-driven reveal */
  @keyframes reveal-up {
    from { opacity: 0; translate: 0 2rem; }
    to   { opacity: 1; translate: 0 0; }
  }

  .card,
  .process-step,
  .testimonials-carousel,
  .feature-item,
  .faq-item,
  .inspector-profile {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }
}

/* --- UTILITIES --- */
@layer utilities {
  .visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    block-size: 1px;
    inline-size: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
  }
}

/* ==========================================================
   DARK MODE
   Applied via [data-theme="dark"] on <html>.
   Uses the dark-* token values defined in :root.
   ========================================================== */

[data-theme="dark"] {
  --surface-0: var(--dark-surface-0);
  --surface-1: var(--dark-surface-1);
  --surface-2: var(--dark-surface-2);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --text-muted: var(--dark-text-muted);
  --border: var(--dark-border);
  --brand-light: var(--dark-brand-light);
  --brand: #3b82f6;
  --brand-dark: #60a5fa;
  --brand-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);

  color-scheme: dark;
}

/* Navbar glass effect in dark mode */
[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.92);
  border-bottom-color: var(--dark-border);
}

/* Hero gradient */
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Hero backdrop overlay darker in dark mode */
[data-theme="dark"] .hero-backdrop::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.6) 40%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

/* Cards & testimonials */
[data-theme="dark"] .card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .contact-form {
  background: var(--dark-surface-1);
  border-color: var(--dark-border);
}

/* Carousel controls in dark mode */
[data-theme="dark"] .carousel-arrow {
  background: var(--dark-surface-1);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .carousel-arrow:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

[data-theme="dark"] .carousel-dot {
  background: var(--dark-border);
}

[data-theme="dark"] .carousel-dot.active {
  background: #3b82f6;
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: #3b82f6;
}

/* Card icon background */
[data-theme="dark"] .card-icon {
  background: var(--dark-brand-light);
}

/* Service feature dots */
[data-theme="dark"] .service-features li::before {
  background: #3b82f6;
}

/* Social proof bar */
[data-theme="dark"] .social-proof-bar {
  border-bottom-color: var(--dark-border);
}

/* FAQ items */
[data-theme="dark"] .faq-item {
  border-bottom-color: var(--dark-border);
}

/* Final CTA - slightly lighter dark to contrast */
[data-theme="dark"] .final-cta {
  background: #1e293b;
}

[data-theme="dark"] .final-cta .btn-secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .final-cta .btn-secondary:hover {
  background: white;
  color: #0f172a;
}

/* Footer - darker still */
[data-theme="dark"] .footer {
  background: #020617;
}

/* Form inputs */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: var(--dark-surface-0);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Flags dropdown in dark mode */
[data-theme="dark"] .nav-flags-toggle {
  background: var(--dark-surface-1);
  border-color: var(--dark-border);
}

[data-theme="dark"] .nav-flags-toggle:hover {
  border-color: var(--dark-text-muted);
}

[data-theme="dark"] .nav-flags-dropdown {
  background: var(--dark-surface-1);
  border-color: var(--dark-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-flags-dropdown li {
  color: var(--dark-text-primary);
}

/* Theme toggle in dark mode */
[data-theme="dark"] .theme-toggle {
  background: var(--dark-surface-1);
  border-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

[data-theme="dark"] .theme-toggle:hover {
  color: #f59e0b;
  border-color: var(--dark-text-muted);
}

/* Secondary button in dark mode */
[data-theme="dark"] .btn-secondary {
  color: var(--dark-text-primary);
  border-color: var(--dark-border);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--dark-surface-2);
  border-color: var(--dark-text-muted);
}

/* Inspector profile */
[data-theme="dark"] .inspector-profile {
  background: var(--dark-surface-1);
  border-color: var(--dark-border);
}

/* Feature check circles */
[data-theme="dark"] .feature-check {
  background: #3b82f6;
}

/* Step numbers */
[data-theme="dark"] .step-number {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

/* Gradient text fix for dark */
[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #93c5fd, #bfdbfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Smooth transition for theme switch */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="dark"] body {
  background: var(--dark-surface-0);
}
