/* =========================================================
   SchweizerSeiten — Premium UI Styles
   Layered on top of Tailwind. Effects, animations, glass.
   ========================================================= */

:root {
  --c-cyan: #22d3ee;
  --c-violet: #a855f7;
  --c-pink: #ec4899;
  --c-lime: #bef264;
  --c-bg: #06060a;

  --grad-primary: linear-gradient(135deg, #22d3ee 0%, #a855f7 50%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(168, 85, 247, 0.18));
}

html { scroll-behavior: smooth; }
body { font-feature-settings: "ss01", "cv11"; }

/* =========================================================
   Animated background — mesh blobs, grid, noise
   ========================================================= */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(168, 85, 247, 0.12), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(34, 211, 238, 0.10), transparent 60%),
    #06060a;
}
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.orb-1 { width: 520px; height: 520px; background: #a855f7; top: -120px; left: -100px; animation: orbA 22s ease-in-out infinite; }
.orb-2 { width: 460px; height: 460px; background: #22d3ee; top: 20%;  right: -120px; animation: orbB 26s ease-in-out infinite; }
.orb-3 { width: 420px; height: 420px; background: #ec4899; bottom: -100px; left: 30%; animation: orbC 30s ease-in-out infinite; }
.orb-4 { width: 360px; height: 360px; background: #6366f1; top: 55%;  left: -80px; animation: orbA 28s ease-in-out infinite reverse; }

@keyframes orbA { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(80px,60px,0) scale(1.1); } }
@keyframes orbB { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-100px,40px,0) scale(1.08); } }
@keyframes orbC { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(60px,-80px,0) scale(1.12); } }

.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}

.bg-noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* =========================================================
   Glass surfaces
   ========================================================= */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.05) inset,
    0 30px 60px -30px rgba(0,0,0,0.6);
}

#topnav.scrolled .glass {
  background: linear-gradient(180deg, rgba(10,10,15,0.75), rgba(10,10,15,0.55));
}

/* =========================================================
   Logo mark
   ========================================================= */
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad-primary);
  position: relative;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.5);
}
.logo-mark::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 5px;
  background: #06060a;
}
.logo-mark::before {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 3px;
  background: var(--grad-primary);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  color: #fff;
  position: relative;
  background: linear-gradient(135deg, #22d3ee 0%, #a855f7 60%, #ec4899 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 12px 30px -10px rgba(168,85,247,0.55),
    0 0 30px -8px rgba(34,211,238,0.45);
  transition: transform .25s ease, box-shadow .3s ease, filter .3s ease;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  opacity: 0; transition: opacity .3s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.14) inset,
    0 18px 50px -10px rgba(168,85,247,0.7),
    0 0 50px -6px rgba(34,211,238,0.55);
}
.btn-primary:hover::after { opacity: 1; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}

/* =========================================================
   Typography helpers
   ========================================================= */
.grad-text {
  background: linear-gradient(120deg, #22d3ee 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradShift 8s ease infinite;
}
@keyframes gradShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

.eyebrow {
  display: inline-flex; align-items: center;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 9999px;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18), 0 0 16px rgba(74, 222, 128, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18), 0 0 16px rgba(74, 222, 128, 0.7); }
  50%     { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.10), 0 0 24px rgba(74, 222, 128, 0.9); }
}

/* =========================================================
   Stat cards
   ========================================================= */
.stat-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.4rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  transition: transform .35s ease, border-color .35s ease;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.16); }

/* =========================================================
   Marquee
   ========================================================= */
.marquee-wrap {
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex; gap: 2.5rem;
  padding: 1.2rem 0;
  white-space: nowrap;
  animation: marquee 36s linear infinite;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.45);
}
.marquee-track span:not(:nth-child(2n)) { color: rgba(255,255,255,0.85); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   Service cards
   ========================================================= */
.service-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.service-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34,211,238,0.6), rgba(168,85,247,0.6), rgba(236,72,153,0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.service-card::after {
  content: "";
  position: absolute; left: 50%; top: -40%;
  width: 380px; height: 380px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(168,85,247,0.35), transparent 70%);
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-4px); }
.service-card:hover::before { opacity: 1; }
.service-card:hover::after  { opacity: 1; }

.service-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,0.18), rgba(168,85,247,0.22));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 24px rgba(168,85,247,0.18);
}
.service-icon svg { width: 22px; height: 22px; }

.service-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600; font-size: 1.25rem;
  margin-top: 1rem;
}
.service-text { color: rgba(255,255,255,0.62); margin-top: 0.5rem; line-height: 1.6; }

/* =========================================================
   Feature cards (Warum wir)
   ========================================================= */
.feature-card {
  position: relative;
  padding: 1.6rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform .35s ease, border-color .35s ease;
  overflow: hidden;
}
.feature-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.16); }
.feature-num {
  display: inline-block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
}
.feature-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600; font-size: 1.2rem;
  margin-top: 0.6rem;
}
.feature-text { color: rgba(255,255,255,0.6); margin-top: 0.4rem; line-height: 1.6; }

/* =========================================================
   Step cards (Erfahrung)
   ========================================================= */
.step-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform .35s ease, border-color .35s ease;
}
.step-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.step-num {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 2rem;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.step-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600; font-size: 1.1rem;
  margin-top: 0.4rem;
}
.step-text { color: rgba(255,255,255,0.6); margin-top: 0.4rem; line-height: 1.55; font-size: 0.95rem; }

.tag-card {
  text-align: center;
  padding: 1rem 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.02em;
}

/* =========================================================
   Contact section
   ========================================================= */
.contact-line { display: flex; align-items: center; gap: 1rem; }
.contact-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,0.18), rgba(168,85,247,0.22));
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.contact-icon svg { width: 20px; height: 20px; }

.form-card {
  position: relative;
  padding: 1.85rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.form-glow {
  position: absolute;
  width: 520px; height: 520px;
  top: -200px; right: -200px;
  background: radial-gradient(closest-side, rgba(168,85,247,0.35), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.field { display: block; }
.field-label {
  display: block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}
.field input, .field textarea {
  width: 100%;
  background: rgba(6,6,10,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  color: #fff;
  font-size: 1rem;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.35); }
.field input:focus, .field textarea:focus {
  border-color: rgba(168,85,247,0.6);
  background: rgba(6,6,10,0.75);
  box-shadow: 0 0 0 4px rgba(168,85,247,0.15), 0 0 30px -8px rgba(168,85,247,0.55);
}
.field textarea { resize: vertical; min-height: 140px; }

.form-status {
  margin-top: 1rem;
  font-size: 0.92rem;
  min-height: 1.2rem;
}
.form-status.is-success { color: #86efac; }
.form-status.is-error   { color: #fca5a5; }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (max-width: 768px) {
  .orb { filter: blur(60px); }
  .orb-1, .orb-2, .orb-3, .orb-4 { width: 320px; height: 320px; }
  .marquee-track { font-size: 1rem; gap: 1.5rem; }
  .form-card { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .marquee-track, .grad-text, .status-dot,
  .aurora, .word-flash, .zh-underline::after { animation: none !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .tilt-card, .tilt-inner, .magnetic { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Aurora streaks — additional depth on the background
   ========================================================= */
.aurora {
  position: absolute;
  width: 140%;
  height: 320px;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.35;
  mix-blend-mode: screen;
  pointer-events: none;
}
.aurora-1 {
  top: 10%; left: -20%;
  background: linear-gradient(90deg, transparent, #22d3ee 40%, #a855f7 60%, transparent);
  transform: rotate(-8deg);
  animation: auroraDrift 18s ease-in-out infinite;
}
.aurora-2 {
  top: 60%; left: -30%;
  background: linear-gradient(90deg, transparent, #ec4899 40%, #6366f1 60%, transparent);
  transform: rotate(6deg);
  animation: auroraDrift 24s ease-in-out infinite reverse;
}
@keyframes auroraDrift {
  0%, 100% { transform: translate3d(0,0,0) rotate(-8deg); opacity: 0.32; }
  50%      { transform: translate3d(40px,-20px,0) rotate(-4deg); opacity: 0.5; }
}

/* =========================================================
   Custom cursor (desktop only)
   ========================================================= */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, width, height;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  mix-blend-mode: difference;
  transition: width .25s ease, height .25s ease, opacity .25s ease;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: radial-gradient(circle, rgba(168,85,247,0.18), transparent 70%);
  transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
}
.cursor-ring.is-hover {
  width: 70px; height: 70px;
  border-color: rgba(255,255,255,0.0);
  background: radial-gradient(circle, rgba(168,85,247,0.45), rgba(34,211,238,0.18) 60%, transparent 80%);
}
.cursor-dot.is-hover { width: 0; height: 0; opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* =========================================================
   Hero spotlight (mouse follower)
   ========================================================= */
.hero-spotlight { position: relative; isolation: isolate; }
.hero-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      600px circle at var(--mx, 50%) var(--my, 30%),
      rgba(168, 85, 247, 0.18),
      transparent 60%
    );
  opacity: 0;
  transition: opacity .6s ease;
  z-index: 0;
}
.hero-spotlight:hover .hero-light { opacity: 1; }

/* =========================================================
   Pills (status + Made-in-Switzerland)
   ========================================================= */
.badge-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
}
.swiss-pill {
  background: linear-gradient(135deg, rgba(218, 41, 28, 0.18), rgba(255,255,255,0.04));
  border-color: rgba(218, 41, 28, 0.35);
  box-shadow: 0 0 24px -8px rgba(218, 41, 28, 0.5);
}
.swiss-pill:hover { box-shadow: 0 0 30px -4px rgba(218, 41, 28, 0.65); }

/* Easter-egg trigger affordance */
.ee-trigger {
  cursor: pointer;
  user-select: none;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
  outline: none;
  -webkit-tap-highlight-color: rgba(218, 41, 28, 0.25);
}
.ee-trigger:hover  { transform: translateY(-1px) scale(1.03); }
.ee-trigger:active { transform: translateY(0) scale(0.97); }
.ee-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.45), 0 0 24px -4px rgba(218, 41, 28, 0.6);
  border-radius: 9999px;
}

/* Bouncing arrow next to CH pill */
.ee-bounce {
  animation: eeNudge 4s ease-in-out infinite 2.4s;
}
.ee-arrow {
  display: inline-block;
  margin-left: 0.15rem;
  font-size: 0.95em;
  color: rgba(255,255,255,0.55);
  animation: eeArrow 1.4s ease-in-out infinite;
}
@keyframes eeNudge {
  0%, 88%, 100% { transform: translateX(0); }
  92%           { transform: translateX(-3px); }
  96%           { transform: translateX(2px); }
}
@keyframes eeArrow {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50%      { transform: translateX(-3px); opacity: 1; }
}

/* Hint box */
.hint-box {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(168,85,247,0.08));
  border: 1px dashed rgba(255,255,255,0.18);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.hint-icon {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
  animation: hintTwinkle 2.4s ease-in-out infinite;
}
@keyframes hintTwinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0); }
  50%      { opacity: 0.55; transform: scale(0.85) rotate(20deg); }
}
.hint-link {
  background: none;
  border: none;
  color: #f87171;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}
.hint-link:hover { color: #fca5a5; }
.hint-sep, .hint-tail { color: rgba(255,255,255,0.55); }

kbd {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-bottom-width: 2px;
  font-family: "JetBrains Mono", "Consolas", ui-monospace, monospace;
  font-size: 0.8em;
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
  letter-spacing: 0;
}
.crest-svg {
  filter: drop-shadow(0 0 6px rgba(0, 102, 179, 0.45));
  border-radius: 4px;
}

/* =========================================================
   Hero word effects
   ========================================================= */
.word-flash {
  position: relative;
  display: inline-block;
}
.word-flash::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 0.18em;
  background: linear-gradient(90deg, transparent, #22d3ee, #a855f7, #ec4899, transparent);
  filter: blur(8px);
  opacity: 0.6;
  animation: wordFlash 4s ease-in-out infinite;
  z-index: -1;
}
@keyframes wordFlash {
  0%, 100% { opacity: 0.35; transform: scaleX(0.85); }
  50%      { opacity: 0.8;  transform: scaleX(1.05); }
}

.zh-underline {
  position: relative;
  color: #fff;
  white-space: nowrap;
}
.zh-underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.05em;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff 0% 50%, #0066B3 50% 100%);
  box-shadow: 0 4px 24px -2px rgba(0, 102, 179, 0.6);
  transform: scaleX(0); transform-origin: left;
  animation: zhUnderline 1.4s cubic-bezier(.2,.7,.2,1) forwards 0.4s;
}
@keyframes zhUnderline {
  to { transform: scaleX(1); }
}

/* =========================================================
   Magnetic button + shine
   ========================================================= */
.magnetic { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, filter .3s ease; will-change: transform; }
.btn-primary { position: relative; overflow: hidden; }
.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn-primary:hover .btn-shine { animation: shineSweep .9s ease forwards; }
@keyframes shineSweep {
  to { transform: translateX(120%); }
}

/* =========================================================
   3D Tilt cards
   ========================================================= */
.tilt-card {
  perspective: 1200px;
  transform-style: preserve-3d;
}
.tilt-inner {
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-card .service-icon,
.tilt-card .service-title,
.tilt-card .service-text {
  transform: translateZ(20px);
}

/* Animated rainbow border on hover */
.tilt-card::before {
  background: conic-gradient(
    from var(--ang, 0deg),
    rgba(34,211,238,0.0) 0deg,
    rgba(34,211,238,0.7) 80deg,
    rgba(168,85,247,0.7) 180deg,
    rgba(236,72,153,0.7) 280deg,
    rgba(34,211,238,0.0) 360deg
  ) !important;
  animation: spinBorder 6s linear infinite paused;
}
.tilt-card:hover::before { animation-play-state: running; }
@keyframes spinBorder { to { --ang: 360deg; } }
@property --ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* =========================================================
   Live Demo — Editor + Browser
   ========================================================= */
.editor-card, .browser-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.7);
}

.editor-bar, .browser-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.dot { width: 11px; height: 11px; border-radius: 9999px; flex-shrink: 0; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.editor-file {
  margin-left: 0.5rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.02em;
}
.editor-tag {
  margin-left: auto;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.editor-tag::before {
  content: "•";
  margin-right: 0.4rem;
  color: #4ade80;
  animation: pulse 1.6s ease-in-out infinite;
}

.editor-body {
  flex: 1;
  margin: 0;
  padding: 1.25rem 1.4rem;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #d1d5db;
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(168,85,247,0.08), transparent 60%),
    rgba(6, 6, 10, 0.6);
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

#codeOutput { display: block; min-height: 100%; }
.cursor-blink::after {
  content: "▌";
  display: inline-block;
  margin-left: 1px;
  color: #22d3ee;
  animation: blinkCaret 1.05s steps(1) infinite;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.7);
}
@keyframes blinkCaret { 50% { opacity: 0; } }

/* Syntax tokens */
.tk-sel    { color: #c084fc; }
.tk-pseudo { color: #f472b6; }
.tk-prop   { color: #22d3ee; }
.tk-num    { color: #fbbf24; }
.tk-hex    { color: #fb7185; }
.tk-fn     { color: #34d399; }
.tk-punct  { color: rgba(255,255,255,0.4); }

/* ---------- Browser preview ---------- */
.browser-url {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  margin-right: 1.7rem; /* compensate for left dots */
}

.browser-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0f0f17;
  isolation: isolate;
}

.prev-bg {
  position: absolute; inset: 0;
  background: #0f0f17;
  transition: background .8s ease;
  z-index: 0;
}

.prev-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.2rem 2rem;
  color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.prev-title {
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.prev-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease .1s, transform .5s ease .1s;
}
.prev-btn {
  margin-top: 0.6rem;
  padding: 0.7rem 1.3rem;
  border-radius: 9999px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: all .5s ease .2s;
}
.prev-card {
  margin-top: 0.6rem;
  padding: 1rem 1.2rem;
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  width: min(320px, 90%);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: all .55s ease .3s;
}
.prev-card-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.prev-card-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-family: Inter, system-ui, sans-serif;
}

/* ---------- Stages ---------- */
/* Stage 1: gradient background + title appears */
[data-stage="1"] .prev-bg {
  background:
    radial-gradient(80% 70% at 70% 0%, rgba(168,85,247,0.45), transparent 60%),
    linear-gradient(135deg, #0a0a0f 0%, #1a0f2e 50%, #2a1052 100%);
}
[data-stage="1"] .prev-title { opacity: 1; transform: translateY(0); }
[data-stage="1"] .prev-subtitle { opacity: 1; transform: translateY(0); }

/* Stage 2: button styled */
[data-stage="2"] .prev-bg {
  background:
    radial-gradient(80% 70% at 70% 0%, rgba(168,85,247,0.45), transparent 60%),
    linear-gradient(135deg, #0a0a0f 0%, #1a0f2e 50%, #2a1052 100%);
}
[data-stage="2"] .prev-title    { opacity: 1; transform: translateY(0); }
[data-stage="2"] .prev-subtitle { opacity: 1; transform: translateY(0); }
[data-stage="2"] .prev-btn      {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: #fff;
  color: #06060a;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6);
}

/* Stage 3: card appears */
[data-stage="3"] .prev-bg {
  background:
    radial-gradient(80% 70% at 70% 0%, rgba(168,85,247,0.45), transparent 60%),
    linear-gradient(135deg, #0a0a0f 0%, #1a0f2e 50%, #2a1052 100%);
}
[data-stage="3"] .prev-title    { opacity: 1; transform: translateY(0); }
[data-stage="3"] .prev-subtitle { opacity: 1; transform: translateY(0); }
[data-stage="3"] .prev-btn      {
  opacity: 1; transform: translateY(0) scale(1);
  background: #fff; color: #06060a;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6);
}
[data-stage="3"] .prev-card     {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

/* Stage 4: full glow finale */
[data-stage="4"] .prev-bg {
  background:
    radial-gradient(70% 60% at 30% 100%, rgba(34,211,238,0.35), transparent 60%),
    radial-gradient(80% 70% at 70% 0%, rgba(168,85,247,0.55), transparent 60%),
    linear-gradient(135deg, #0a0a0f 0%, #1a0f2e 50%, #2a1052 100%);
}
[data-stage="4"] .prev-title {
  opacity: 1; transform: translateY(0);
  background: linear-gradient(120deg, #22d3ee, #fff 50%, #ec4899);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
[data-stage="4"] .prev-subtitle { opacity: 1; transform: translateY(0); }
[data-stage="4"] .prev-btn {
  opacity: 1;
  transform: translateY(-2px) scale(1);
  background: linear-gradient(135deg, #22d3ee, #a855f7, #ec4899);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 0 40px -4px rgba(168,85,247,0.7), 0 0 60px -8px rgba(34,211,238,0.5);
}
[data-stage="4"] .prev-card {
  opacity: 1;
  transform: translateY(-2px) scale(1);
  background: rgba(255,255,255,0.07);
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 30px -8px rgba(168, 85, 247, 0.4);
}

/* Mobile: stack-friendly height */
@media (max-width: 768px) {
  .editor-card, .browser-card { min-height: 360px; }
  .editor-body { font-size: 0.78rem; }
  .prev-content { padding: 1.5rem 1.4rem; }
}

/* =========================================================
   Pre-loader
   ========================================================= */
.preloader {
  position: fixed; inset: 0;
  z-index: 10000;
  display: grid; place-items: center;
  background: #06060a;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-mark {
  position: relative;
  width: 88px; height: 88px;
  filter: drop-shadow(0 0 24px rgba(168,85,247,0.6));
}
.preloader-svg { width: 100%; height: 100%; }
.preloader-frame {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: plFrame 1.6s cubic-bezier(.5,0,.2,1) forwards;
}
.preloader-cross-v, .preloader-cross-h {
  transform-origin: 40px 40px;
  opacity: 0;
  animation: plCross .6s cubic-bezier(.2,.7,.2,1) forwards 1s;
}
.preloader-cross-h { animation-delay: 1.15s; }

@keyframes plFrame { to { stroke-dashoffset: 0; } }
@keyframes plCross {
  0%   { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

.preloader-label {
  position: absolute;
  margin-top: 130px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  opacity: 0;
  animation: plLabel .6s ease forwards 1.4s;
}
@keyframes plLabel { to { opacity: 1; } }

body.is-loading { overflow: hidden; }
body.is-loading .reveal { transition-delay: 0s !important; }

/* =========================================================
   Scroll progress bar
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #22d3ee, #a855f7, #ec4899);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  z-index: 60;
  transition: width 80ms linear;
  pointer-events: none;
}

/* =========================================================
   Custom scrollbar (Webkit + Firefox)
   ========================================================= */
* { scrollbar-width: thin; scrollbar-color: rgba(168,85,247,0.6) rgba(255,255,255,0.04); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22d3ee, #a855f7, #ec4899);
  border-radius: 9999px;
  border: 2px solid #06060a;
}
*::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }

/* =========================================================
   Hero word stagger reveal
   ========================================================= */
.hero-headline { will-change: transform; }
.hw {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em) rotateX(-30deg);
  transform-origin: 50% 100%;
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.hw.is-in { opacity: 1; transform: translateY(0) rotateX(0); }

/* =========================================================
   Floating Action Button
   ========================================================= */
.fab {
  position: fixed;
  right: 1.2rem; bottom: 1.2rem;
  z-index: 50;
  display: flex; flex-direction: column; gap: 0.6rem;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.fab-btn {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.fab-btn svg { width: 20px; height: 20px; }
.fab-btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.25); }
.fab-primary {
  background: linear-gradient(135deg, #22d3ee, #a855f7, #ec4899);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 12px 30px -10px rgba(168,85,247,0.6);
}
.fab-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, 0 16px 40px -8px rgba(168,85,247,0.8);
}

/* =========================================================
   Konami easter egg — Schweizer-Kreuz Confetti
   ========================================================= */
.confetti-layer {
  position: fixed; inset: 0;
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
}
.confetto {
  position: absolute;
  top: -40px;
  width: 18px; height: 18px;
  background: #DA291C;
  border-radius: 4px;
  animation: confettoFall var(--dur, 3.4s) cubic-bezier(.4,.6,.6,1) forwards,
             confettoSpin var(--spin, 1.4s) linear infinite;
  box-shadow: 0 0 8px rgba(218, 41, 28, 0.4);
}
.confetto::before, .confetto::after {
  content: "";
  position: absolute;
  background: #fff;
}
.confetto::before {
  /* vertical bar of cross */
  left: 50%; top: 18%; bottom: 18%;
  width: 30%;
  transform: translateX(-50%);
  border-radius: 1px;
}
.confetto::after {
  /* horizontal bar of cross */
  top: 50%; left: 18%; right: 18%;
  height: 30%;
  transform: translateY(-50%);
  border-radius: 1px;
}
@keyframes confettoFall {
  to { transform: translate3d(var(--dx, 0), 110vh, 0); opacity: 0.85; }
}
@keyframes confettoSpin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   Stat card numeric polish
   ========================================================= */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(34,211,238,0.0), rgba(168,85,247,0.4), rgba(34,211,238,0.0));
  opacity: 0;
  filter: blur(12px);
  transition: opacity .35s ease;
  z-index: -1;
}
.stat-card:hover::after { opacity: 0.6; }

