/* ============================================================
   LUNAR IX — dark immersive theme
   Brand colors live in :root — tweak everything from here.
   ============================================================ */

:root {
  --bg: #06070d;
  --bg-soft: #0a0c16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #eef0f8;
  --text-dim: #9aa0b5;
  --accent: #7c6cff;          /* violet */
  --accent-2: #4cc9f0;        /* cyan  */
  --accent-glow: rgba(124, 108, 255, 0.35);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }

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

img, canvas { display: block; max-width: 100%; }

/* ============ Custom cursor ============ */
.cursor-dot, .cursor-glow {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent-2);
}
.cursor-glow {
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  z-index: 0;
  will-change: transform;
}
body.has-cursor .cursor-dot,
body.has-cursor .cursor-glow { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-glow { display: none; }
}

/* ============ Screen-reader-only text ============ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============ Skip link (visible only on keyboard focus) ============ */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 300;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ============ Scroll progress bar ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  will-change: transform;
}

/* ============ Ambient parallax orbs ============ */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}
.bg-orb--1 {
  width: 560px; height: 560px;
  left: -12%; top: 55%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.13), transparent 70%);
}
.bg-orb--2 {
  width: 480px; height: 480px;
  right: -10%; top: 150%;
  background: radial-gradient(circle, rgba(76, 201, 240, 0.11), transparent 70%);
}
.bg-orb--3 {
  width: 640px; height: 640px;
  left: 30%; top: 260%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.09), transparent 70%);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn--primary {
  position: relative;
  background: linear-gradient(135deg, var(--accent), #5a8dee);
  color: #fff;
  box-shadow: 0 0 0 rgba(124, 108, 255, 0);
}
.btn--primary::after {
  /* ambient glow pulse — composited opacity only */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 6px 28px var(--accent-glow);
  opacity: 0.15;
  animation: ctaPulse 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes ctaPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.8; }
}
.btn--primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}
.btn--ghost {
  border-color: var(--surface-border);
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.btn--small { padding: 0.55rem 1.2rem; font-size: 0.9rem; }
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* ============ Floating CTA pill ============ */
.float-cta {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(70px);
  transition: transform 0.45s var(--ease-out), opacity 0.45s, visibility 0s 0.45s;
}
.float-cta.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: transform 0.45s var(--ease-out), opacity 0.45s, visibility 0s 0s;
}

/* ============ Hero keyword rotator ============ */
.rotator {
  display: inline-block;
  position: relative;
  height: 1.6em;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  color: var(--accent-2);
  font-weight: 600;
  transition: width 0.35s var(--ease-out);
}
.rotator__word {
  position: absolute;
  left: 0; top: 0;
  line-height: 1.6;
  transition: transform 0.45s var(--ease-out), opacity 0.45s;
}
.rotator__word.is-out { transform: translateY(-105%); opacity: 0; }
.rotator__word.is-in { transform: translateY(105%); opacity: 0; transition: none; }

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.is-scrolled {
  background: rgba(6, 7, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--surface-border);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 1rem;
}
.nav__logo-mark {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav__links {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.nav__links a {
  position: relative;
  transition: color 0.3s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--accent-2);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: -1;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero__glow--1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(124,108,255,0.5), transparent 70%);
  top: -10%; left: -8%;
}
.hero__glow--2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(76,201,240,0.35), transparent 70%);
  bottom: -12%; right: -6%;
  animation-delay: -7s;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 30px, 0) scale(1.12); }
}

.hero__content {
  position: relative;
  padding: 6rem 1.5rem 4rem;
  max-width: 880px;
}
.hero__content::before {
  /* soft scrim so headline stays readable over bright fluid trails */
  content: "";
  position: absolute;
  inset: -8% -18%;
  background: radial-gradient(closest-side, rgba(6, 7, 13, 0.62), transparent 75%);
  z-index: -1;
  pointer-events: none;
}
.hero__eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.35em;
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.02em;
}
.hero__line {
  display: block;
  overflow: hidden;
}
.hero__line .char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: charUp 0.8s var(--ease-out) forwards;
  animation-delay: var(--cd, 0s);
  will-change: transform, opacity;
}
.hero__line .char.space { width: 0.28em; }
@keyframes charUp {
  to { transform: translateY(0); opacity: 1; }
}
.hero__line--accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin: 1.6rem auto 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}
.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
}
.hero__scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ Marquee ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
  padding: 1.1rem 0;
  background: var(--bg-soft);
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.marquee__track i {
  font-style: normal;
  color: var(--accent);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ Sections ============ */
.section {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 5vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}
.section--alt {
  max-width: none;
  background: var(--bg-soft);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}
.section--alt > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.section__head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section__eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 1rem;
}
.section__title {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  letter-spacing: -0.015em;
}

/* ============ Section fluid backdrops (stats, contact) ============ */
.section-fluid {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw; /* full-bleed even inside max-width sections */
  max-width: none; /* override the global canvas { max-width: 100% } */
  height: 100%;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}
.stats-section,
.contact {
  isolation: isolate; /* keep the canvas behind this section's content only */
}

/* ============ Reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: transform, opacity;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Service cards ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.4rem;
}
.card {
  position: relative;
  padding: 2rem 1.8rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  overflow: hidden;
  transition: border-color 0.4s, transform 0.2s ease-out;
  transform-style: preserve-3d;
}
.card::before {
  /* hover glow follows the cursor via --mx / --my set in JS */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(124, 108, 255, 0.14),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(124, 108, 255, 0.4); }
.card__icon {
  font-size: 1.8rem;
  color: var(--accent-2);
  margin-bottom: 1.1rem;
  text-shadow: 0 0 18px var(--accent-glow);
}

/* ---- Living icons: each card demos its service ----
   Paused by default, play on card hover; always playing on touch
   devices (which have no hover). */
.card__icon.icon-anim {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 46px;
  text-shadow: none;
}
.icon-anim i, .icon-anim span { display: block; }
.icon-anim i, .icon-anim span, .icon-anim span::before {
  animation-play-state: paused;
}
.card:hover .icon-anim i,
.card:hover .icon-anim span,
.card:hover .icon-anim span::before {
  animation-play-state: running;
}
@media (hover: none) {
  .icon-anim i, .icon-anim span, .icon-anim span::before {
    animation-play-state: running;
  }
}

/* chatbot: typing dots in a bubble */
.icon-chat__bubble {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid rgba(76, 201, 240, 0.55);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 0 16px rgba(76, 201, 240, 0.12);
}
.icon-chat__bubble i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: dotBounce 1.1s ease-in-out infinite;
}
.icon-chat__bubble i:nth-child(2) { animation-delay: 0.15s; }
.icon-chat__bubble i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* phone agent: voice waveform */
.icon-voice { gap: 4px; }
.icon-voice i {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  animation: wave 1s ease-in-out infinite;
  transform: scaleY(0.35);
}
.icon-voice i:nth-child(1) { height: 16px; }
.icon-voice i:nth-child(2) { height: 26px; animation-delay: 0.12s; }
.icon-voice i:nth-child(3) { height: 34px; animation-delay: 0.24s; }
.icon-voice i:nth-child(4) { height: 26px; animation-delay: 0.36s; }
.icon-voice i:nth-child(5) { height: 16px; animation-delay: 0.48s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* website: browser frame with skeleton lines drawing in */
.icon-web__frame {
  width: 54px;
  padding: 14px 8px 8px;
  border: 1.5px solid rgba(124, 108, 255, 0.6);
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.icon-web__frame::before {
  content: "";
  position: absolute;
  top: 5px; left: 8px;
  width: 14px; height: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.8;
}
.icon-web__frame i {
  height: 4px;
  border-radius: 2px;
  background: var(--accent-2);
  width: 100%;
  transform-origin: left;
  animation: lineGrow 1.7s var(--ease-out) infinite;
}
.icon-web__frame i:nth-child(2) { width: 65%; animation-delay: 0.25s; }
@keyframes lineGrow {
  0% { transform: scaleX(0); }
  45%, 80% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* dashboard: bars growing from the baseline */
.icon-dash {
  align-items: flex-end;
  padding-bottom: 4px;
}
.icon-dash i {
  width: 8px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transform-origin: bottom;
  animation: barGrow 1.8s ease-in-out infinite;
}
.icon-dash i:nth-child(1) { height: 14px; }
.icon-dash i:nth-child(2) { height: 26px; animation-delay: 0.15s; }
.icon-dash i:nth-child(3) { height: 36px; animation-delay: 0.3s; }
.icon-dash i:nth-child(4) { height: 20px; animation-delay: 0.45s; }
@keyframes barGrow {
  0% { transform: scaleY(0.2); }
  40%, 75% { transform: scaleY(1); }
  100% { transform: scaleY(0.2); }
}

/* workflow: pulses traveling between nodes */
.icon-flow { gap: 0; }
.icon-flow__node {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-2);
  flex-shrink: 0;
}
.icon-flow__line {
  width: 20px; height: 2px;
  background: rgba(124, 108, 255, 0.35);
  position: relative;
}
.icon-flow__line i {
  position: absolute;
  top: -2px; left: -2px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulseTravel 1.4s linear infinite;
}
.icon-flow__line--2 i { animation-delay: 0.7s; }
@keyframes pulseTravel {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(18px); opacity: 0; }
}

/* custom AI: pulsing rings around a core */
.icon-ai {
  position: relative;
  width: 46px;
  justify-content: center;
}
.icon-ai__core {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}
.icon-ai__ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 108, 255, 0.5);
  animation: ringPulse 2s ease-out infinite;
}
.icon-ai__ring--2 { animation-delay: 1s; }
@keyframes ringPulse {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}
.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}
.card__tag {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

/* ============ Process steps ============ */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2rem 1.6rem;
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.02);
  /* transform (hover) is instant; the lighting props carry a per-tile
     delay (--d) so the glow ripples one-by-one across the row */
  transition:
    transform 0.4s var(--ease-out),
    border-color 0.5s var(--ease-out) var(--d, 0s),
    box-shadow 0.5s var(--ease-out) var(--d, 0s),
    background 0.5s var(--ease-out) var(--d, 0s);
}
.step::before {
  /* backlight aura that switches on as the tile is reached on scroll */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(130% 120% at 50% 0%, rgba(124, 108, 255, 0.30), transparent 65%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out) var(--d, 0s);
  pointer-events: none;
  z-index: -1;
}

/* ---- Backlit state (set one-by-one in JS as you scroll) ---- */
.step.is-lit {
  border-color: rgba(124, 108, 255, 0.5);
  background: linear-gradient(160deg, rgba(124, 108, 255, 0.1), rgba(76, 201, 240, 0.04));
  box-shadow: 0 18px 48px rgba(124, 108, 255, 0.22);
}
.step.is-lit::before { opacity: 1; }
.step:hover { transform: translateY(-4px); }

.step__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent), transparent 160%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: filter 0.5s;
}
.step.is-lit .step__num { filter: brightness(1.4); }
.step h3 { margin: 0.8rem 0 0.5rem; font-size: 1.15rem; }
.step p { color: var(--text-dim); font-size: 0.93rem; }

/* ============ Stats ============ */
.stats-section { text-align: center; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ============ Contact ============ */
.contact { overflow: visible; }
.contact__glow {
  position: absolute;
  width: 600px; height: 600px;
  left: 50%; top: 0;
  transform: translate(-50%, -30%);
  background: radial-gradient(circle, rgba(124,108,255,0.16), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
.contact__sub {
  margin-top: 1rem;
  color: var(--text-dim);
  max-width: 520px;
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.6rem;
  align-items: stretch;
}
.contact__book {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 2.4rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(124, 108, 255, 0.35);
  background:
    linear-gradient(160deg, rgba(124,108,255,0.12), rgba(76,201,240,0.05));
  transition: border-color 0.4s, transform 0.2s ease-out, box-shadow 0.4s;
}
.contact__book:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 48px rgba(124, 108, 255, 0.2);
}
.contact__book-icon {
  font-size: 1.6rem;
  color: var(--accent-2);
}
.contact__book h3 { font-size: 1.4rem; }
.contact__book p { color: var(--text-dim); flex: 1; }
.contact__book .btn { align-self: flex-start; margin-top: 0.6rem; }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 2.4rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
}
.contact__form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact__form input,
.contact__form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.18);
}
.contact__form ::placeholder { color: rgba(154, 160, 181, 0.7); }
.contact__form .btn { align-self: flex-start; margin-top: 0.4rem; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--surface-border);
  padding: 2.2rem clamp(1.25rem, 5vw, 4rem);
  background: var(--bg-soft);
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__copy { color: var(--text-dim); font-size: 0.88rem; }
.footer__links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.footer__links a:hover { color: var(--accent-2); }

/* ============ FAQ ============ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 760px;
}
.faq__item {
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}
.faq__item:hover,
.faq__item[open] {
  border-color: rgba(124, 108, 255, 0.5);
}
.faq__item[open] {
  background: linear-gradient(160deg, rgba(124, 108, 255, 0.07), rgba(76, 201, 240, 0.03));
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
}
.faq__answer {
  padding: 0 1.6rem 1.4rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  animation: faqReveal 0.35s var(--ease-out);
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ Form success state ============ */
.form-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.9rem;
  padding: 2rem 1.5rem;
  min-height: 280px;
}
.form-sent__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.form-sent__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.form-sent__sub { color: var(--text-dim); font-size: 0.93rem; }
.form-sent__error { color: #f87171; font-size: 0.88rem; margin-top: 0.4rem; }

/* ============ Scroll-spy nav ============ */
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ============ Focus styles (keyboard navigation) ============ */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
/* Buttons: add glow that matches the hover aesthetic */
.btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.25);
}
/* Nav links: extend the existing hover treatment to keyboard focus */
.nav__links a:focus-visible { color: var(--text); }
.nav__links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
/* Form inputs already have a border+glow on :focus — suppress the duplicate outline */
.contact__form input:focus-visible,
.contact__form textarea:focus-visible { outline: none; }

/* ============ Reduced motion ============ */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__line .char { transform: none; opacity: 1; animation: none; }
  .cursor-dot, .cursor-glow, .hero__scroll-hint { display: none; }
}
