/**
 * Drivlex landing (index) — extracted from inline <style> for maintainability.
 * Deploy: bump ?v= on this file, tailwind.css, site-footer.css, and main.js together in HTML.
 */

/* Override template theme so `text-dark` matches app ink (Tailwind bundle still ships #111928). */
html {
  --color-dark: #0f2f3a;
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

:root {
  --drivlex-ink: #0f2f3a;
  --drivlex-ocean: #2a7a91;
  --drivlex-mint: #acdee2;
  --drivlex-frost: #d5ebef;
  --drivlex-paper: #ffffff;
  --drivlex-canvas: #a8bfc9;
  --drivlex-brand-gradient: linear-gradient(to right, #0a252e 0%, #0f2f3a 40%, #2a7a91 100%);
  --drivlex-brand-gradient-cta: linear-gradient(180deg, #0a252e 0%, #0f2f3a 42%, #2a7a91 100%);
  /* Cookie “Accept” hover (mint on white modal is fine) */
  --drivlex-cta-mint-hover: #95cdd4;
  /* Get Started — deep→bright teal gradient */
  --drivlex-cta-gradient: linear-gradient(
    145deg,
    #0a2f3a 0%,
    #134e5f 32%,
    #1f6b7d 62%,
    #2a7a91 100%
  );
  --drivlex-cta-gradient-hover: linear-gradient(
    145deg,
    #0d3b48 0%,
    #185d6f 32%,
    #267d91 62%,
    #348fa3 100%
  );
}

/* Same vertical canvas as app login/register (.drivlex-auth-page in globals.css) */
.drivlex-landing-auth-canvas {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--drivlex-frost) 38%, var(--drivlex-canvas)) 0%,
    var(--drivlex-canvas) 45%,
    color-mix(in srgb, var(--drivlex-canvas) 88%, #96a8b0) 100%
  );
}

#home svg circle[fill="white"] {
  fill: color-mix(in srgb, var(--drivlex-ocean) 26%, var(--drivlex-canvas));
}

.drivlex-landing-cta-band .pointer-events-none svg circle,
.drivlex-landing-cta-band .pointer-events-none svg path {
  stroke: color-mix(in srgb, var(--drivlex-ocean) 16%, var(--drivlex-canvas));
  stroke-opacity: 1;
}

/* Lead copy on canvas bands: darker than template body-color (#637381) for contrast on grey-teal */
.drivlex-landing-subhead {
  color: color-mix(in srgb, var(--drivlex-ink) 78%, var(--drivlex-ocean));
  font-weight: 500;
}

.drivlex-cta-register:focus-visible {
  outline: 2px solid var(--drivlex-mint);
  outline-offset: 3px;
}

.drivlex-cta-register {
  background: var(--drivlex-cta-gradient);
  color: var(--drivlex-paper);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 4px 22px rgba(8, 55, 68, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 -1px 0 rgba(0, 0, 0, 0.12) inset;
}

.drivlex-cta-register:hover {
  background: var(--drivlex-cta-gradient-hover);
  color: var(--drivlex-paper);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 6px 28px rgba(8, 55, 68, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 -1px 0 rgba(0, 0, 0, 0.1) inset;
}

/* Scroll margin so anchor links leave room for fixed header */
#home,
#highlights,
#pricing,
#stats,
#testimonials,
#faq-section {
  scroll-margin-top: 5.5rem;
}

/* Typewriter quote */
.typewriter-text {
  border-right: 2px solid currentColor;
  padding-right: 4px;
  animation: drivlex-tw-blink 0.9s step-end infinite;
}

.typewriter-text.typewriter-done {
  border-right-color: transparent;
  animation: none;
  padding-right: 0;
}

@keyframes drivlex-tw-blink {
  0%,
  50% {
    border-right-color: currentColor;
  }
  50.01%,
  100% {
    border-right-color: transparent;
  }
}

/* FAQ */
#faq-section .faq-list {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

#faq-section .faq-list .single-faq {
  margin-bottom: 1.5rem;
}

#faq-section .faq-list .single-faq:last-child {
  margin-bottom: 0;
}

#faq-section .single-faq {
  border-radius: 1rem;
  padding: 0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06);
  min-height: 0;
}

#faq-section .single-faq:hover {
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.08);
}

#faq-section .faq-btn {
  min-height: 72px;
  padding: 1.25rem 1.5rem;
  gap: 1.25rem;
}

#faq-section .faq-content {
  padding: 1rem 1.5rem 1.25rem;
  background: color-mix(in srgb, var(--drivlex-frost) 42%, #fff);
}

#faq-section .faq-content p {
  line-height: 1.6;
}

#faq-section .icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  #faq-section .icon {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  #faq-section .icon svg {
    width: 1.375rem;
    height: 1.375rem;
    stroke: white;
    stroke-width: 3;
  }
}

/* Testimonials: nav arrows above next section */
#testimonials {
  position: relative;
  z-index: 25;
}

#testimonials .testimonial-nav {
  margin-top: 1.25rem;
  position: relative;
  z-index: 2;
  padding-bottom: 0.25rem;
}

@media (min-width: 640px) {
  #testimonials .testimonial-nav {
    margin-top: 1.75rem;
  }
}

/* Cookie modal — full viewport until user responds */
#cookie-consent {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 99999 !important;
}

#cookie-consent [data-cookie-action="accept"]:hover {
  background: var(--drivlex-cta-mint-hover) !important;
}

#cookie-consent [data-cookie-action="reject"]:hover {
  background: color-mix(in srgb, var(--drivlex-frost) 55%, #fff) !important;
}
