/* =========================================================
   VRoad.AI — Futuristic theme (complements Tailwind CDN)
   Brand: TADIC deep blue + electric cyan + red CTA
   ========================================================= */

:root {
  --bg: #0b1322;
  --surface: #0b1322;
  --navy: #0a1a3a;
  --brand: #1b59c5;     /* TADIC blue */
  --brand-deep: #16479e;
  --cyan: #38d0f0;      /* electric accent */
  --red: #e5202a;       /* CTA (logo dot) */
  --line: rgba(56, 208, 240, 0.14);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

/* ---- Responsive safeguards ------------------------------ */
html, body {
  /* "clip" prevents sideways scroll like "hidden" but does not create a
     scroll container, which would silently disable position: sticky */
  overflow-x: clip;
  max-width: 100%;
}
*,
*::before,
*::after { box-sizing: border-box; }

/* media scales with its container, never overflows */
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }

/* prevent long words / URLs from breaking layout */
p, h1, h2, h3, li, a, span, dd { overflow-wrap: break-word; }

/* very small phones (≤380px): tame the largest headings */
@media (max-width: 380px) {
  h1 { font-size: 1.95rem; line-height: 1.14; }
  .text-aurora, .text-cyan-glow { word-break: break-word; }
}

/* Space Grotesk has a stylized "&" glyph; serve U+0026 from a standard face instead */
@font-face {
  font-family: "Amp Fix";
  src: local("Arial"), local("Helvetica");
  unicode-range: U+0026;
}
@font-face {
  font-family: "Amp Fix";
  font-weight: bold;
  src: local("Arial Bold"), local("Arial"), local("Helvetica");
  unicode-range: U+0026;
}

body {
  font-family: "Amp Fix", "Space Grotesk", "Source Sans 3", system-ui, sans-serif;
  background-color: var(--bg);
  color: #cbd5e1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, .font-display {
  font-family: "Amp Fix", "Space Grotesk", "Lexend", system-ui, sans-serif;
}
.font-mono-ui {
  font-family: "JetBrains Mono", ui-monospace, "Courier New", monospace;
}

::selection { background: var(--cyan); color: #04121a; }

/* ---- Global ambient background --------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(40% 35% at 12% 8%, rgba(27, 89, 197, 0.40), transparent 60%),
    radial-gradient(38% 32% at 90% 6%, rgba(56, 208, 240, 0.22), transparent 60%),
    radial-gradient(45% 40% at 78% 88%, rgba(27, 89, 197, 0.28), transparent 62%),
    radial-gradient(30% 28% at 30% 80%, rgba(229, 32, 42, 0.10), transparent 60%),
    var(--bg);
  background-color: var(--bg);
  animation: aurora 22s ease-in-out infinite alternate;
  will-change: transform;
}

/* Aurora / mesh gradient drift */
@keyframes aurora {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.05) rotate(0deg); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.12) rotate(1.2deg); }
  100% { transform: translate3d(1%, -2%, 0) scale(1.06) rotate(-1deg); }
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(56, 208, 240, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 208, 240, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 90%);
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 90%);
}

/* ---- Glow orbs ------------------------------------------ */
.glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

/* ---- Glass surfaces ------------------------------------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.glass-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(148, 197, 255, 0.12);
  border-radius: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 208, 240, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 208, 240, 0.15), 0 20px 50px -20px rgba(56, 208, 240, 0.4);
}

/* gradient hairline border on top of cards */
.edge-top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

/* ---- Eyebrow / tag -------------------------------------- */
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---- Gradient text -------------------------------------- */
.text-glow {
  background: linear-gradient(180deg, #ffffff 25%, #9fd9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-cyan-glow {
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(56, 208, 240, 0.55);
}

/* ---- Buttons -------------------------------------------- */
.btn-cta {
  position: relative;
  background: linear-gradient(180deg, #ff3b43, var(--red));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(229, 32, 42, 0.5), 0 10px 30px -8px rgba(229, 32, 42, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-cta:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(229, 32, 42, 0.7), 0 14px 40px -8px rgba(229, 32, 42, 0.8);
}
.btn-ghost {
  border: 1px solid rgba(148, 197, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(56, 208, 240, 0.1);
  border-color: rgba(56, 208, 240, 0.5);
}

/* ---- Logo chip (real TADIC png on white) ---------------- */
.logo-chip {
  position: relative;
  background: #fff;
  border-radius: 0.55rem;
  padding: 0.28rem 0.5rem;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(56, 208, 240, 0.25);
}
.logo-chip::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent 20%, rgba(56, 208, 240, 0.55) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: shimmer 5s ease-in-out infinite;
}

/* CTA built-in shine sweep on hover */
.btn-cta { overflow: hidden; }
.btn-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%) skewX(-15deg);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.btn-cta:hover::after { transform: translateX(120%) skewX(-15deg); }

/* ---- Scroll reveal -------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* Reveal direction variants */
[data-reveal="left"]  { transform: translateX(-34px); }
[data-reveal="right"] { transform: translateX(34px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="blur"]  { transform: translateY(20px); filter: blur(10px); }
[data-reveal].is-visible { transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  .marquee-track, .pulse-ring, body::before,
  .shimmer::after, .text-aurora, .shine-sweep::after { animation: none !important; }
}

/* ---- FAQ accordion -------------------------------------- */
[data-accordion] + div {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* ---- Marquee -------------------------------------------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---- Pulse rings (HUD dots) ----------------------------- */
@keyframes pulsering {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}
.pulse-ring { animation: pulsering 2.4s ease-out infinite; }

/* ---- Section divider line ------------------------------- */
.hr-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  border: 0;
}

/* ---- Focus visibility ----------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---- Animated gradient text (aurora text) --------------- */
.text-aurora {
  background: linear-gradient(100deg, #ffffff, #38d0f0, #7ea8ff, #ffffff, #38d0f0);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: auroraText 7s linear infinite;
}
@keyframes auroraText {
  to { background-position: 250% 0; }
}

/* ---- Shimmer / shine sweep ------------------------------ */
.shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 75%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 80%
  );
  transform: skewX(-18deg);
  animation: shimmer 4.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { left: -150%; }
  55%  { left: 150%; }
  100% { left: 150%; }
}

/* Shine sweep triggered on hover (cards, buttons) */
.shine-sweep { position: relative; overflow: hidden; }
.shine-sweep::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(126, 224, 245, 0.22) 50%, transparent 70%);
  transform: translateX(-120%) skewX(-15deg);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.shine-sweep:hover::after { transform: translateX(120%) skewX(-15deg); }

/* ---- Ripple effect -------------------------------------- */
.has-ripple { position: relative; overflow: hidden; }
.ripple-ink {
  position: absolute;
  border-radius: 9999px;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
  mix-blend-mode: overlay;
}
@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* ---- Sticky / pinned scrollytelling --------------------- */
.pin-wrap { position: relative; }
.pin-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 6rem;
}
.pin-step {
  opacity: 0.35;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.pin-step.active {
  opacity: 1;
}
.pin-visual-layer {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.pin-visual-layer.active {
  opacity: 1;
  transform: scale(1);
}

/* ---- Form fields (dark) --------------------------------- */
.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 197, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  color: #e2e8f0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: #64748b; }
.field:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 208, 240, 0.18);
}
