/* Density-driven overrides — only apply when density vars are set */
.section { padding: var(--mn-section-pad, 120px) 0 !important; }
.hero { min-height: auto; padding: var(--mn-hero-pad, 140px) 0 100px !important; }
.hero h1 { font-size: var(--mn-h1-size, clamp(2.8rem, 6vw, 4.5rem)) !important; }
.hero-subtitle { font-size: var(--mn-body-size, 1.06rem) !important; }
.section-header { margin-bottom: var(--mn-gap, 32px) !important; }

/* Surface = solid → no glass anywhere */
html[data-mn-surface="solid"] .service-card,
html[data-mn-surface="solid"] .pricing-card,
html[data-mn-surface="solid"] .contact-card,
html[data-mn-surface="solid"] .contact-form,
html[data-mn-surface="solid"] .hero-stats,
html[data-mn-surface="solid"] .navbar.scrolled {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg-card-solid) !important;
}
html[data-mn-surface="solid"] .hero-orb-1,
html[data-mn-surface="solid"] .hero-orb-2 { opacity: .3; filter: blur(40px); }

/* Surface = terminal → grid, mono accents, hard borders */
html[data-mn-surface="terminal"] body { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace !important; }
html[data-mn-surface="terminal"] .hero-grid { opacity: 1 !important; }
html[data-mn-surface="terminal"] .hero-orb-1,
html[data-mn-surface="terminal"] .hero-orb-2 { display: none; }
html[data-mn-surface="terminal"] .service-card,
html[data-mn-surface="terminal"] .pricing-card,
html[data-mn-surface="terminal"] .contact-card,
html[data-mn-surface="terminal"] .contact-form,
html[data-mn-surface="terminal"] .hero-stats {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background:
    linear-gradient(var(--bg-card-solid), var(--bg-card-solid)) padding-box,
    linear-gradient(135deg, var(--primary), var(--accent)) border-box !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
html[data-mn-surface="terminal"] .navbar,
html[data-mn-surface="terminal"] .navbar.scrolled {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border-light) !important;
  backdrop-filter: none !important;
}
html[data-mn-surface="terminal"] body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
}
html[data-mn-surface="terminal"] .text-gradient,
html[data-mn-surface="terminal"] .price-amount,
html[data-mn-surface="terminal"] .pricing-hosting h3 .text-gradient {
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: -.02em;
}

/* Cinematic density makes hero text feel even bigger */
html[data-mn-density="cinematic"] .hero h1 { letter-spacing: -0.04em; line-height: 1.02; }
html[data-mn-density="compact"] .hero h1 { letter-spacing: -0.02em; }

/* Vibe = mono — kill colored glow, stick to white-on-black drama */
html[data-mn-vibe="mono"] .hero-orb-1,
html[data-mn-vibe="mono"] .hero-orb-2 { opacity: .15; }
html[data-mn-vibe="mono"] .service-icon { filter: grayscale(.3); }

/* === HERO WOW EFFECTS === */
.hero-particles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: .9;
  mix-blend-mode: screen;
}
.hero-spotlight {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 2;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 30%),
    color-mix(in srgb, var(--primary) 20%, transparent),
    transparent 60%
  );
  transition: background .25s ease;
}
.hero-content { position: relative; z-index: 3; }

/* Typing caret */
.hero-typer { display: inline-block; }
.hero-typer-caret {
  display: inline-block;
  margin-left: 2px;
  -webkit-text-fill-color: var(--primary-light);
  color: var(--primary-light);
  animation: heroCaret 1.05s steps(1) infinite;
  font-weight: 300;
  transform: translateY(-2px);
}
@keyframes heroCaret { 50% { opacity: 0; } }

/* Hero h1 entrance */
.hero h1 {
  animation: heroRise .9s cubic-bezier(.2,.8,.2,1) both;
}
.hero-subtitle { animation: heroRise 1s .12s cubic-bezier(.2,.8,.2,1) both; }
.hero-actions   { animation: heroRise 1s .22s cubic-bezier(.2,.8,.2,1) both; }
.hero-stats     { animation: heroRise 1s .32s cubic-bezier(.2,.8,.2,1) both; }
.hero-badge     { animation: heroRise .8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Magnetic CTA shimmer */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
  will-change: transform;
}
.btn-magnetic::after {
  content: ""; position: absolute; inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  filter: blur(18px);
  opacity: .55;
  z-index: -1;
  animation: heroPulse 2.6s ease-in-out infinite;
}
@keyframes heroPulse {
  0%, 100% { opacity: .45; transform: scale(.96); }
  50%      { opacity: .85; transform: scale(1.04); }
}
.btn-shimmer {
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: heroShimmer 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes heroShimmer {
  0%   { left: -100%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

/* Stats: number tick on enter */
.hero-stats .stat-number {
  background-size: 200% auto;
  animation: heroGradShift 6s ease-in-out infinite;
}
@keyframes heroGradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-subtitle, .hero-actions, .hero-stats, .hero-badge,
  .btn-magnetic::after, .btn-shimmer, .hero-stats .stat-number,
  .hero-typer-caret { animation: none !important; }
}

/* === Service-card variants — Terminal & Neon (matches preview/cards.html) === */
.service-card-terminal {
  background: #0b1020 !important;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent) !important;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.6), var(--shadow-glow) !important;
  position: relative;
  overflow: hidden;
}
.service-card-terminal::after {
  content: ""; position: absolute; right: -50px; bottom: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  filter: blur(36px); pointer-events: none;
}
.service-card-terminal .term-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 14px;
}
.service-card-terminal .term-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.service-card-terminal .term-dot.r { background: #ef4444; }
.service-card-terminal .term-dot.y { background: #eab308; }
.service-card-terminal .term-dot.g { background: #22c55e; }
.service-card-terminal .term-file {
  margin-left: 8px; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: #64748b;
}
.service-card-terminal .term-code {
  margin: 0 0 18px; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; line-height: 1.7; color: #cbd5e1;
  white-space: pre-wrap;
}
.service-card-terminal h3 { margin-top: 4px; }

.service-card-neon {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg-light) 85%, transparent),
    color-mix(in srgb, var(--bg-light) 55%, transparent)) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--primary) 15%, transparent),
    0 0 40px -10px color-mix(in srgb, var(--accent) 40%, transparent) !important;
  position: relative;
}
/* Pricing card label & "ab" prefix */
.pricing-card .pkg-variant {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
  letter-spacing: 0;
}
.pricing-card .price-prefix {
  font-size: 0.45em;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: middle;
  margin-right: 6px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* Tweak panel root — never blocks the page */
#__tweaks_root { position: fixed; inset: 0; pointer-events: none; z-index: 99998; }
#__tweaks_root > * { pointer-events: auto; }
