/* ============================================================
   NEON BRUTALIST THEME (dark): blueprint grid, huge display type, neon cards,
   and a lot of motion. Loaded last, scoped to [data-theme="dark"].
   Every animation is switched off for prefers-reduced-motion.
   The reveal states only apply once CosmicFX has added .fx-ready
   to <html>, so content is never hidden if scripts fail.
   ============================================================ */

html[data-theme="dark"] {
  --c-teal: #2de2c8;
  --c-orange: #ff7a2f;
  --c-violet: #8b5cf6;
  --c-pink: #ff4fa3;
  --c-cream: #f6f0e4;
  --mx: 50vw;
  --my: 30vh;
  --sy: 0;
  --p: 0;
  background-color: #07040f;
}

html[data-theme="dark"] body { background-color: transparent; font-feature-settings: "ss01"; }

/* ---------- Starfield + nebula (fixed, behind everything) ---------- */
html[data-theme="dark"] body::before,
html[data-theme="dark"] body::after {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
}

/* blueprint dot grid that drifts and pulses */
html[data-theme="dark"] body::before {
  background-image:
    radial-gradient(circle, rgba(196, 181, 253, 0.32) 1px, transparent 1.6px),
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 34px 34px, 136px 136px, 136px 136px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(90% 80% at 50% 40%, #000 30%, transparent 100%);
  animation: fx-twinkle 6s ease-in-out infinite alternate, fx-grid-drift 40s linear infinite;
}

/* nebula glows that slowly breathe */
html[data-theme="dark"] body::after {
  z-index: -3;
  background:
    radial-gradient(45% 40% at 85% 12%, rgba(139, 92, 246, 0.22), transparent 70%),
    radial-gradient(40% 40% at 8% 55%, rgba(45, 226, 200, 0.12), transparent 70%),
    radial-gradient(50% 45% at 70% 95%, rgba(255, 122, 47, 0.14), transparent 70%);
  animation: fx-breathe 14s ease-in-out infinite alternate;
}

/* sections let the stars through */
html[data-theme="dark"] section,
html[data-theme="dark"] .main > *,
html[data-theme="dark"] .banner-section {
  background-color: rgba(7, 4, 15, 0.42) !important;
}

/* ---------- Typography ---------- */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  color: var(--c-cream);
}

html[data-theme="dark"] h3,
html[data-theme="dark"] h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-cream);
}

/* big section titles */
html[data-theme="dark"] section h2 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  position: relative;
  display: block;
}
html[data-theme="dark"] section h2[data-align="center"]::after { margin-inline: auto; }

html[data-theme="dark"] section h2::after {
  content: "";
  display: block;
  height: 4px;
  width: 0;
  margin-top: 0.6rem;
  background: linear-gradient(90deg, var(--c-orange), var(--c-pink), var(--c-teal));
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}

html[data-theme="dark"] section h2.fx-in::after,
html[data-theme="dark"]:not(.fx-ready) section h2::after { width: 4.5rem; }

/* mono labels: eyebrow pills, badges, nav, tags */
html[data-theme="dark"] [class*="badge"],
html[data-theme="dark"] [class*="Badge"],
html[data-theme="dark"] [class*="eyebrow"],
html[data-theme="dark"] [class*="sectionTag"],
html[data-theme="dark"] [class*="tag__"],
html[data-theme="dark"] [class*="Tag__"],
html[data-theme="dark"] [class*="label__"],
html[data-theme="dark"] nav a,
html[data-theme="dark"] header nav a {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

html[data-theme="dark"] [class*="badge"],
html[data-theme="dark"] [class*="Badge"],
html[data-theme="dark"] [class*="eyebrow"],
html[data-theme="dark"] [class*="sectionTag"] {
  border: 1px solid rgba(45, 226, 200, 0.6) !important;
  background: rgba(45, 226, 200, 0.08) !important;
  color: var(--c-teal) !important;
  border-radius: 999px !important;
  box-shadow: 0 0 18px rgba(45, 226, 200, 0.18);
  animation: fx-pulse-teal 3.2s ease-in-out infinite;
}

/* ---------- Header ---------- */
/* NOT on <header>: a backdrop-filter there makes it a stacking context, which put the fixed nav
   underneath the hero and made every header link unclickable. The nav is the fixed element. */
/* blur is applied only once the page has scrolled (see .fx-scrolled below) */

html[data-theme="dark"] header nav a {
  position: relative;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

html[data-theme="dark"] header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--c-orange), var(--c-teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="dark"] header nav a:hover { color: var(--c-teal); text-shadow: 0 0 12px rgba(45, 226, 200, 0.6); }
html[data-theme="dark"] header nav a:hover::after { transform: scaleX(1); }

/* ---------- Neon cards ---------- */
html[data-theme="dark"] [class*="Card__"],
html[data-theme="dark"] [class*="card__"] {
  --neon: var(--c-teal);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--neon) 65%, transparent) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--neon) 14%, transparent), transparent 55%),
    linear-gradient(160deg, rgba(22, 13, 44, 0.92), rgba(9, 5, 20, 0.92)) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--neon) 12%, transparent) inset,
    0 0 26px color-mix(in srgb, var(--neon) 16%, transparent) !important;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform 0.25s ease-out, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

html[data-theme="dark"] *:nth-child(3n+2) > [class*="Card__"],
html[data-theme="dark"] [class*="Card__"]:nth-child(3n+2),
html[data-theme="dark"] [class*="card__"]:nth-child(3n+2) { --neon: var(--c-orange); }

html[data-theme="dark"] *:nth-child(3n+3) > [class*="Card__"],
html[data-theme="dark"] [class*="Card__"]:nth-child(3n+3),
html[data-theme="dark"] [class*="card__"]:nth-child(3n+3) { --neon: var(--c-violet); }

html[data-theme="dark"] [class*="Card__"]:hover,
html[data-theme="dark"] [class*="card__"]:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--neon) 40%, transparent) inset,
    0 0 46px color-mix(in srgb, var(--neon) 40%, transparent),
    0 24px 50px rgba(0, 0, 0, 0.5) !important;
}

/* moving light sweep on card hover */
html[data-theme="dark"] [class*="Card__"]::after,
html[data-theme="dark"] [class*="card__"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
html[data-theme="dark"] [class*="Card__"]:hover::after,
html[data-theme="dark"] [class*="card__"]:hover::after {
  transform: translateX(120%);
  transition: transform 0.9s ease;
}

/* ---------- Buttons ---------- */
html[data-theme="dark"] [class*="Button_button__"] {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-radius: 999px !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
}

html[data-theme="dark"] [class*="Button_solid__"] {
  background: linear-gradient(90deg, #ff7a2f, #c04bd8, #8b5cf6, #ff7a2f) !important;
  background-size: 250% 100% !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 0 28px rgba(255, 122, 47, 0.35), 0 0 60px rgba(139, 92, 246, 0.25);
  animation: fx-gradient-shift 5s linear infinite;
}

html[data-theme="dark"] [class*="Button_outlined__"] {
  background: rgba(45, 226, 200, 0.06) !important;
  border: 1.5px solid var(--c-teal) !important;
  color: var(--c-teal) !important;
  box-shadow: 0 0 20px rgba(45, 226, 200, 0.2) inset, 0 0 20px rgba(45, 226, 200, 0.15);
}

html[data-theme="dark"] [class*="Button_button__"]:hover {
  box-shadow: 0 0 40px rgba(255, 122, 47, 0.55), 0 0 90px rgba(139, 92, 246, 0.4);
}

html[data-theme="dark"] [class*="Button_button__"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-130%);
}
html[data-theme="dark"] [class*="Button_button__"]:hover::after {
  transform: translateX(130%);
  transition: transform 0.7s ease;
}

/* ---------- Hero ---------- */
html[data-theme="dark"] [class*="LandingPage_heroTitle__"] {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.8rem, 8.4vw, 7.4rem) !important;
  line-height: 0.92 !important;
  letter-spacing: -0.045em !important;
  height: auto !important;
  min-height: clamp(7rem, 20vw, 17rem);
  overflow: visible !important;
  background: none !important;
  -webkit-text-fill-color: var(--c-cream) !important;
  color: var(--c-cream) !important;
  -webkit-text-stroke: 0;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.45);
  position: relative;
  animation: fx-glitch-skew 7s infinite steps(1) !important;
}

html[data-theme="dark"] [class*="LandingPage_heroTitle__"]::before,
html[data-theme="dark"] [class*="LandingPage_heroTitle__"]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  white-space: pre-line;
  pointer-events: none;
  opacity: 0;
}
html[data-theme="dark"] [class*="LandingPage_heroTitle__"]::before { color: var(--c-teal); -webkit-text-fill-color: var(--c-teal); animation: fx-glitch-a 7s infinite steps(1); }
html[data-theme="dark"] [class*="LandingPage_heroTitle__"]::after  { color: var(--c-orange); -webkit-text-fill-color: var(--c-orange); animation: fx-glitch-b 7s infinite steps(1); }

html[data-theme="dark"] [class*="LandingPage_titleAccent__"] {
  height: 6px !important;
  width: 9rem !important;
  background: linear-gradient(90deg, var(--c-orange), var(--c-pink), var(--c-teal)) !important;
  background-size: 200% 100% !important;
  animation: fx-gradient-shift 3s linear infinite !important;
}

html[data-theme="dark"] [class*="LandingPage_textContainer__"] { background: transparent !important; border: 0 !important; backdrop-filter: none !important; }

/* eyebrow above the hero title (added in LandingPage.js) */
.fx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-teal);
  border: 1px solid rgba(45, 226, 200, 0.55);
  background: rgba(45, 226, 200, 0.07);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
  width: fit-content;
  box-shadow: 0 0 22px rgba(45, 226, 200, 0.2);
}
.fx-eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 10px var(--c-teal);
  animation: fx-blink 1.2s ease-in-out infinite;
}

/* ---------- Marquee ticker ---------- */
.fx-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  overflow: hidden;
  border-top: 1px solid rgba(45, 226, 200, 0.35);
  border-bottom: 1px solid rgba(255, 122, 47, 0.35);
  background: rgba(7, 4, 15, 0.7);
  backdrop-filter: blur(8px);
  transform: rotate(0deg);
}
.fx-marquee__track {
  display: flex;
  width: max-content;
  animation: fx-marquee 32s linear infinite;
}
.fx-marquee:hover .fx-marquee__track { animation-play-state: paused; }
.fx-marquee__item {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.85rem 1.6rem;
  color: var(--c-cream);
}
.fx-marquee__item:nth-child(4n+2) { color: var(--c-teal); }
.fx-marquee__item:nth-child(4n+3) { color: var(--c-orange); }
.fx-marquee__item:nth-child(4n+4) { color: var(--c-pink); }
.fx-marquee__star { display: inline-block; margin-left: 1.6rem; opacity: 0.7; animation: fx-blink 2.4s ease-in-out infinite; }

/* ---------- Floating code chips injected by CosmicFX ---------- */
.fx-chip {
  --neon: var(--c-teal);
  position: absolute;
  z-index: 0;
  pointer-events: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  letter-spacing: 0.04em;
  color: var(--neon);
  padding: 0.55rem 0.9rem 0.55rem 2rem;
  border: 1px solid color-mix(in srgb, var(--neon) 70%, transparent);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(22, 13, 44, 0.85), rgba(9, 5, 20, 0.85));
  box-shadow: 0 0 24px color-mix(in srgb, var(--neon) 25%, transparent);
  transform: translate3d(0, calc(var(--sy) * var(--par, -0.06) * 1px), 0);
  animation: fx-float 8s ease-in-out infinite;
  white-space: nowrap;
}
.fx-chip::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0.7em 0 0 color-mix(in srgb, var(--neon) 55%, transparent);
}
.fx-chip--orange { --neon: var(--c-orange); }
.fx-chip--violet { --neon: #b69cff; }
.fx-chip--pink { --neon: var(--c-pink); }

/* ---------- Reveal on scroll ---------- */
html.fx-ready .fx-reveal {
  opacity: 0;
  transform: translate3d(0, 56px, 0) scale(0.96);
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--fx-delay, 0ms);
}
html.fx-ready .fx-reveal[data-fx="left"]  { transform: translate3d(-80px, 0, 0); }
html.fx-ready .fx-reveal[data-fx="right"] { transform: translate3d(80px, 0, 0); }
html.fx-ready .fx-reveal[data-fx="zoom"]  { transform: scale(0.75); }
html.fx-ready .fx-reveal[data-fx="flip"]  { transform: perspective(900px) rotateX(-40deg) translateY(30px); transform-origin: top; }
html.fx-ready .fx-reveal.fx-in { opacity: 1; transform: none; }

/* tilted cards keep their own transform once revealed */
html.fx-ready [class*="Card__"].fx-reveal.fx-in,
html.fx-ready [class*="card__"].fx-reveal.fx-in {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

/* ---------- Pointer glow, progress bar ---------- */
.fx-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), rgba(45, 226, 200, 0.06) 45%, transparent 70%);
  will-change: transform;
}
@media (hover: none) { .fx-cursor { display: none; } }

.fx-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10001;
  transform-origin: left;
  transform: scaleX(var(--p));
  background: linear-gradient(90deg, var(--c-orange), var(--c-pink), var(--c-teal));
  box-shadow: 0 0 14px rgba(255, 122, 47, 0.8);
  pointer-events: none;
}

/* page enters with a soft rise */
html[data-theme="dark"] .main { animation: fx-page-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* ---------- Misc surfaces ---------- */
html[data-theme="dark"] footer { border-top: 1px solid rgba(45, 226, 200, 0.3); }
html[data-theme="dark"] img { transition: transform 0.6s ease, filter 0.6s ease; }
html[data-theme="dark"] section img:not([class*="logo"]):hover { transform: scale(1.03); filter: saturate(1.15) contrast(1.05); }

/* ---------- Keyframes ---------- */
@keyframes fx-twinkle { from { opacity: 0.45; } to { opacity: 1; } }
@keyframes fx-grid-drift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 136px, 0 136px, 136px 0; } }
@keyframes fx-breathe { from { transform: scale(1) translateY(0); opacity: 0.8; } to { transform: scale(1.12) translateY(-2%); opacity: 1; } }
@keyframes fx-float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -22px; rotate: 6deg; } }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes fx-marquee { to { transform: translateX(-50%); } }
@keyframes fx-gradient-shift { to { background-position: 250% 0; } }
@keyframes fx-pulse-teal { 0%, 100% { box-shadow: 0 0 14px rgba(45, 226, 200, 0.15); } 50% { box-shadow: 0 0 30px rgba(45, 226, 200, 0.45); } }
@keyframes fx-page-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fx-glitch-skew { 0%, 92%, 100% { transform: none; } 93% { transform: skewX(-6deg) translateX(-4px); } 95% { transform: skewX(5deg) translateX(5px); } 97% { transform: none; } }
@keyframes fx-glitch-a { 0%, 92%, 100% { opacity: 0; } 93% { opacity: 0.9; transform: translate(-6px, 2px); clip-path: inset(10% 0 55% 0); } 95% { opacity: 0.9; transform: translate(5px, -3px); clip-path: inset(55% 0 10% 0); } 97% { opacity: 0; } }
@keyframes fx-glitch-b { 0%, 92%, 100% { opacity: 0; } 94% { opacity: 0.9; transform: translate(6px, -2px); clip-path: inset(40% 0 30% 0); } 96% { opacity: 0.9; transform: translate(-5px, 3px); clip-path: inset(5% 0 70% 0); } 98% { opacity: 0; } }

/* ---------- Reduced motion: nothing moves, everything is visible ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] *,
  html[data-theme="dark"] *::before,
  html[data-theme="dark"] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html.fx-ready .fx-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .fx-cursor, .fx-progress { display: none; }
  .fx-marquee__track { transform: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  html[data-theme="dark"] section h2 { font-size: clamp(1.9rem, 9vw, 2.8rem); }
  .fx-chip { opacity: 0.55; }
  .fx-marquee__item { font-size: 0.78rem; padding: 0.7rem 1rem; }
}

/* ---------- Hero layout tuning ---------- */
html[data-theme="dark"] [class*="LandingPage_heroTitle__"] {
  font-size: clamp(2.4rem, 5.6vw, 5.4rem) !important;
  min-height: clamp(6rem, 14vw, 13rem);
}
html[data-theme="dark"] [class*="LandingPage_contentLeft__"] {
  top: 46% !important;
  width: 58% !important;
  padding-top: 5rem !important;
  padding-bottom: 6rem !important;
}
html[data-theme="dark"] [class*="LandingPage_textContainer__"] { min-height: 0 !important; margin-bottom: 1.2rem !important; padding: 0 !important; }
html[data-theme="dark"] [class*="LandingPage_buttonContainer__"] { margin-top: 1.2rem !important; }
@media (max-width: 992px) {
  html[data-theme="dark"] [class*="LandingPage_contentLeft__"] { width: 100% !important; }
}

/* Full-width 3D layer; old decorative hero shapes hidden (they made hard-edged boxes) */
[class*="LandingPage_hero3d__"] { width: 100% !important; left: 0; }
[class*="LandingPage_heroClipShape"],
[class*="LandingPage_heroOrb"],
[class*="LandingPage_heroAccentLine"] { display: none !important; }

/* The fixed nebula already colours the hero; the old section gradients left a hard edge */
html[data-theme="dark"] section.banner-section { background-image: none !important; }

/* ---------- More card-like blocks get the neon outline too ---------- */
html[data-theme="dark"] :is([class*="valuePoint"], [class*="techItem"], .service-card, .achievement-card,
  [class*="successBox"], [class*="categoryNavItem"], [class*="infoCard"], [class*="contactItem"],
  [class*="Home_work__"], [class*="Home_stepPanel__"]) {
  --neon: var(--c-teal);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--neon) 55%, transparent) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--neon) 12%, transparent), transparent 55%),
    linear-gradient(160deg, rgba(22, 13, 44, 0.9), rgba(9, 5, 20, 0.9)) !important;
  box-shadow: 0 0 22px color-mix(in srgb, var(--neon) 14%, transparent) !important;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out, box-shadow 0.35s ease, border-color 0.35s ease;
}
html[data-theme="dark"] :is([class*="valuePoint"], [class*="techItem"], .service-card, .achievement-card,
  [class*="successBox"], [class*="categoryNavItem"], [class*="infoCard"], [class*="contactItem"],
  [class*="Home_work__"], [class*="Home_stepPanel__"]):nth-child(3n+2) { --neon: var(--c-orange); }
html[data-theme="dark"] :is([class*="valuePoint"], [class*="techItem"], .service-card, .achievement-card,
  [class*="successBox"], [class*="categoryNavItem"], [class*="infoCard"], [class*="contactItem"],
  [class*="Home_work__"], [class*="Home_stepPanel__"]):nth-child(3n+3) { --neon: var(--c-violet); }
html[data-theme="dark"] :is([class*="valuePoint"], [class*="techItem"], .service-card, .achievement-card,
  [class*="successBox"], [class*="categoryNavItem"], [class*="infoCard"], [class*="contactItem"],
  [class*="Home_work__"], [class*="Home_stepPanel__"]):hover {
  box-shadow: 0 0 40px color-mix(in srgb, var(--neon) 38%, transparent), 0 18px 40px rgba(0, 0, 0, 0.45) !important;
  border-color: var(--neon) !important;
}

/* Homepage sections set their own heading sizes; beat the generic section-heading rule */
html[data-theme="dark"] section h2[class*="Home_title__"] { font-size: clamp(2.4rem, 6.4vw, 5.6rem); }
html[data-theme="dark"] section h2[class*="Home_ctaTitle__"] { font-size: clamp(2.8rem, 10.5vw, 10rem); line-height: 0.88; }
html[data-theme="dark"] section h2[class*="Home_ctaTitle__"]::after { display: none; }

/* ============================================================
   Calmer, more grown-up hero and chrome (owner: "kiddish")
   Later rules win: these override the earlier playful styling.
   ============================================================ */

/* headline: plain cream, no glitch, no glow */
html[data-theme="dark"] [class*="LandingPage_heroTitle__"] {
  animation: none !important;
  text-shadow: none;
  letter-spacing: -0.04em !important;
}
html[data-theme="dark"] [class*="LandingPage_heroTitle__"]::before,
html[data-theme="dark"] [class*="LandingPage_heroTitle__"]::after { display: none !important; }

html[data-theme="dark"] [class*="LandingPage_titleAccent__"] {
  width: 4rem !important;
  height: 3px !important;
  background: var(--c-teal) !important;
  animation: none !important;
  box-shadow: none !important;
}

/* eyebrow: a quiet outlined label */
.fx-eyebrow {
  background: transparent;
  box-shadow: none;
  color: var(--c-cream);
  border-color: rgba(246, 240, 228, 0.28);
  letter-spacing: 0.18em;
}
.fx-eyebrow i { animation: none; box-shadow: none; opacity: 0.9; }

/* ticker: monochrome, smaller, calmer */
.fx-marquee { border-top-color: rgba(246, 240, 228, 0.14); border-bottom: 0; background: rgba(7, 4, 15, 0.55); }
.fx-marquee__item,
.fx-marquee__item:nth-child(n) {
  color: rgba(246, 240, 228, 0.7) !important;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.26em;
}
.fx-marquee__star { color: var(--c-teal); opacity: 0.85; animation: none; }
.fx-marquee__track { animation-duration: 60s; }

/* hero buttons: solid cream + outlined, no glow, no shimmer */
html[data-theme="dark"] [class*="LandingPage_buttonContainer__"] [class*="Button_solid__"] {
  background: var(--c-cream) !important;
  background-size: auto !important;
  color: #0b0716 !important;
  box-shadow: none !important;
  animation: none !important;
}
html[data-theme="dark"] [class*="LandingPage_buttonContainer__"] [class*="Button_solid__"]:hover {
  background: var(--c-teal) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] [class*="LandingPage_buttonContainer__"] [class*="Button_outlined__"] {
  background: transparent !important;
  border: 1px solid rgba(246, 240, 228, 0.4) !important;
  color: var(--c-cream) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] [class*="LandingPage_buttonContainer__"] [class*="Button_outlined__"]:hover {
  border-color: var(--c-teal) !important;
  color: var(--c-teal) !important;
}

/* site-wide: stop the shimmering gradients and pulsing badges */
html[data-theme="dark"] [class*="Button_solid__"] { animation: none !important; background-size: 100% 100% !important; box-shadow: 0 6px 22px rgba(139, 92, 246, 0.25) !important; }
html[data-theme="dark"] [class*="Button_button__"]:hover { box-shadow: 0 8px 28px rgba(139, 92, 246, 0.35) !important; }
html[data-theme="dark"] [class*="badge"],
html[data-theme="dark"] [class*="Badge"],
html[data-theme="dark"] [class*="eyebrow"],
html[data-theme="dark"] [class*="sectionTag"] { animation: none !important; box-shadow: none !important; }


/* ============================================================
   Typography pass: smaller, and a deliberate mix of typefaces
   serif display (headlines) / grotesk (UI + card titles) / mono (labels) / Inter (body)
   ============================================================ */
html[data-theme="dark"] body { font-family: var(--font-primary); }

html[data-theme="dark"] h1,
html[data-theme="dark"] h2 {
  font-family: var(--font-serif);
  text-transform: none;
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.04;
}
html[data-theme="dark"] h1 em,
html[data-theme="dark"] h2 em { font-style: italic; color: var(--c-teal); }

html[data-theme="dark"] section h2 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); }
html[data-theme="dark"] section h2::after { height: 2px; margin-top: 0.9rem; width: 0; }
html[data-theme="dark"] section h2.fx-in::after,
html[data-theme="dark"]:not(.fx-ready) section h2::after { width: 3rem; }

html[data-theme="dark"] h3 { font-size: clamp(1.1rem, 1.7vw, 1.45rem); letter-spacing: -0.01em; }
html[data-theme="dark"] h4 { font-size: clamp(1rem, 1.3vw, 1.2rem); }

/* hero headline: calmer serif, sentence case */
html[data-theme="dark"] [class*="LandingPage_heroTitle__"] {
  font-family: var(--font-serif) !important;
  text-transform: none !important;
  font-weight: 400 !important;
  font-size: clamp(2rem, 4vw, 3.6rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -0.015em !important;
  min-height: clamp(5rem, 11vw, 9.5rem);
}

/* Home sections set their own sizes; keep them in step */
html[data-theme="dark"] section h2[class*="Home_title__"] { font-size: clamp(2rem, 4vw, 3.4rem); }
html[data-theme="dark"] section h2[class*="Home_ctaTitle__"] { font-size: clamp(2.3rem, 6vw, 5rem); line-height: 1; }

/* card titles: grotesk, not shouting */
html[data-theme="dark"] [class*="Home_cardTitle__"],
html[data-theme="dark"] [class*="Home_workName__"] { text-transform: none; font-size: clamp(1.15rem, 1.7vw, 1.5rem); letter-spacing: -0.015em; }

/* ============================================================
   Smoother rendering + scroll nuances
   ============================================================ */
/* the fixed background layers stay still: animating a masked full-screen layer repaints it every frame */
html[data-theme="dark"] body::before,
html[data-theme="dark"] body::after { animation: none !important; }

html { scroll-padding-top: 90px; }
section[id] { scroll-margin-top: 90px; }

/* the nav gains a backdrop once the page has scrolled */
html[data-theme="dark"] header nav { transition: background 0.35s ease, border-color 0.35s ease; border-bottom: 1px solid transparent; }
html[data-theme="dark"].fx-scrolled header nav {
  background: rgba(7, 4, 15, 0.9) !important;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-bottom-color: rgba(246, 240, 228, 0.08);
}

/* parallax frames: the image is taller than its frame and slides inside it */
:where(.fx-pframe) { position: relative; overflow: hidden; }
.fx-pframe > img[data-parallax] {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
  transition: none !important;
}

/* body must not be a scroll container, or sticky sections (the process steps) stop sticking.
   clip still prevents horizontal bleed. */
html[data-theme="dark"] body { overflow-x: clip !important; overflow-y: visible !important; }


/* footer: keep its own type (the global heading/label rules are stronger than a CSS-module class) */
html[data-theme="dark"] footer h3[class*="colTitle"] {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
html[data-theme="dark"] footer [class*="Footer_label__"] { font-size: 0.66rem; letter-spacing: 0.18em; }
html[data-theme="dark"] footer [class*="Footer_eyebrow__"] { border: 0 !important; background: transparent !important; padding: 0; box-shadow: none; }
html[data-theme="dark"] footer a[class*="Footer_link__"] { color: var(--secondary-text); }
html[data-theme="dark"] footer a[class*="Footer_link__"]:hover { color: var(--text-primary); }
html[data-theme="dark"] footer a[class*="Footer_value__"] { color: var(--text-primary); }
html[data-theme="dark"] footer a[class*="Footer_value__"]:hover { color: var(--accent-teal); }
html[data-theme="dark"] footer [class*="Footer_socials__"] a { color: var(--secondary-text); }
html[data-theme="dark"] footer [class*="Footer_socials__"] a:hover { color: var(--accent-teal); }
html[data-theme="dark"] footer [class*="Footer_copyright__"] a { color: var(--text-primary); }
html[data-theme="dark"] footer a[class*="Footer_primary__"] { color: #0b0716; }

/* ---------- Phones: card groups become swipeable rails instead of long stacks ---------- */
@media (max-width: 768px) {
  .m-rail {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.9rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -1.25rem !important;
    padding: 0.4rem 1.25rem 1.2rem !important;
  }
  .m-rail::-webkit-scrollbar { display: none; }
  .m-rail > * {
    flex: 0 0 82% !important;
    max-width: 82% !important;
    width: 82%;
    margin-bottom: 0 !important;
    scroll-snap-align: start;
  }
  /* a card fills its slot instead of keeping its desktop grid span */
  .m-rail > [class*="Home_card__"] { grid-column: auto !important; min-height: 360px; }

  /* category buttons become a row of chips */
  .m-tabs {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -1.25rem;
    padding: 0.2rem 1.25rem 0.8rem;
  }
  .m-tabs::-webkit-scrollbar { display: none; }
  .m-tabs > * { flex: 0 0 auto !important; width: auto !important; white-space: nowrap; }
  .m-tabs [class*="categoryNavDescription"] { display: none; }
}

/* cards inside a rail are off to the side, so the scroll-reveal would leave them invisible: show them straight away */
@media (max-width: 768px) {
  .m-rail .fx-reveal, .m-rail .animate-on-scroll, .m-rail [class*="fx-"] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* full-screen mobile menu open: the page underneath stays put */
html.menu-open,
html.menu-open body { overflow: hidden !important; overscroll-behavior: none; }
