/**
 * Crystal Studio void — source of truth for the site background.
 * Palette A: gold + cyan on near-black; light mode uses cool paper, not cream.
 */
:root {
  --glow-gold: rgba(232, 197, 71, 0.13);
  --glow-cyan: rgba(94, 200, 216, 0.11);
  --dot-base: #3d4a5c;
  --dot-active: #e8c547;
}

html[data-theme="dark"] {
  --bg: #05070c;
}

html[data-theme="light"] {
  --bg: #eef2f7;
  --dot-base: #9aa8bc;
}

html,
body {
  background: var(--bg);
  min-height: 100vh;
}

.studio-shell,
main {
  position: relative;
  z-index: 1;
}

.footer,
.studio-footer {
  position: relative;
  z-index: 1;
}

.studio-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  background:
    radial-gradient(ellipse 88% 58% at 16% -6%, var(--glow-gold), transparent 56%),
    radial-gradient(ellipse 72% 52% at 94% 10%, var(--glow-cyan), transparent 52%),
    radial-gradient(ellipse 50% 38% at 6% 82%, rgba(94, 200, 216, 0.06), transparent 50%),
    radial-gradient(ellipse 75% 42% at 50% 108%, rgba(232, 197, 71, 0.05), transparent 55%),
    linear-gradient(180deg, #070a12 0%, #05070c 48%, #04060a 100%);
}

.studio-atmosphere__aurora {
  position: absolute;
  inset: -10% -5%;
  background: conic-gradient(
    from 210deg at 50% 18%,
    transparent 0deg,
    rgba(232, 197, 71, 0.09) 48deg,
    transparent 100deg,
    rgba(94, 200, 216, 0.1) 158deg,
    transparent 220deg,
    rgba(232, 197, 71, 0.06) 280deg,
    transparent 360deg
  );
  filter: blur(56px);
  opacity: 0.9;
  animation: chilviewAurora 32s ease-in-out infinite alternate;
}

.studio-atmosphere__grid {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  height: 70%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(720px) rotateX(64deg) translateY(-8%);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.45) 18%, transparent 88%);
  opacity: 0.75;
  animation: studioGridDrift 36s linear infinite;
}

.studio-atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  animation: studioOrbFloat 24s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) infinite alternate;
}

.studio-atmosphere__orb--gold {
  width: min(48vw, 500px);
  height: min(48vw, 500px);
  top: -12%;
  left: -8%;
  opacity: 0.55;
  background: radial-gradient(circle, rgba(232, 197, 71, 0.32), rgba(232, 197, 71, 0.05) 58%, transparent 72%);
}

.studio-atmosphere__orb--cyan {
  width: min(44vw, 460px);
  height: min(44vw, 460px);
  top: 10%;
  right: -10%;
  opacity: 0.5;
  background: radial-gradient(circle, rgba(94, 200, 216, 0.28), rgba(94, 200, 216, 0.04) 58%, transparent 72%);
  animation-delay: -9s;
}

.studio-atmosphere__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 35%, transparent 22%, rgba(5, 7, 12, 0.4) 72%),
    linear-gradient(180deg, rgba(5, 7, 12, 0.2) 0%, transparent 32%, rgba(5, 7, 12, 0.6) 100%);
}

.studio-atmosphere__spot {
  display: block !important;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--spot-x, 50%) var(--spot-y, 30%),
    rgba(94, 200, 216, 0.1),
    rgba(232, 197, 71, 0.05) 34%,
    transparent 58%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.is-pointer-fine .studio-atmosphere__spot.is-on {
  opacity: 1;
}

.studio-atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.studio-atmosphere:has([data-dotgrid]) .studio-atmosphere__grid {
  opacity: 0.12;
}

.studio-atmosphere:has([data-dotgrid]) .studio-atmosphere__orb {
  opacity: 0.38;
}

html[data-theme="light"] .studio-atmosphere {
  background:
    radial-gradient(ellipse 90% 60% at 14% -8%, rgba(232, 197, 71, 0.2), transparent 55%),
    radial-gradient(ellipse 70% 50% at 92% 6%, rgba(94, 200, 216, 0.16), transparent 52%),
    radial-gradient(ellipse 55% 40% at 50% 100%, rgba(94, 200, 216, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f7 45%, #e8edf5 100%);
}

html[data-theme="light"] .studio-atmosphere__veil {
  background:
    radial-gradient(ellipse 90% 60% at 50% 35%, transparent 28%, rgba(232, 237, 245, 0.35) 78%),
    linear-gradient(180deg, rgba(247, 249, 252, 0.15) 0%, transparent 36%, rgba(232, 237, 245, 0.45) 100%);
}

html[data-theme="light"] .studio-atmosphere__grid {
  background-image:
    linear-gradient(rgba(20, 28, 44, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 28, 44, 0.045) 1px, transparent 1px);
}

@keyframes chilviewAurora {
  from {
    transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1);
    opacity: 0.7;
  }
  to {
    transform: translate3d(3%, 2%, 0) rotate(8deg) scale(1.06);
    opacity: 1;
  }
}

@keyframes studioGridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 56px 56px;
  }
}

@keyframes studioOrbFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(24px, 36px, 0) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-atmosphere__aurora,
  .studio-atmosphere__grid,
  .studio-atmosphere__orb {
    animation: none;
  }
}

/* —— Crystal glass nav (light + dark) —— */
html[data-theme="light"] .header,
html[data-theme="dark"] .header {
  justify-content: center;
  padding: 16px 20px 0;
}

html[data-theme="light"] .header-cta,
html[data-theme="dark"] .header-cta {
  position: absolute;
  right: 18px;
  top: 16px;
}

html[data-theme="light"] .pill,
html[data-theme="dark"] .pill {
  --nav-x: 0px;
  --nav-w: 0px;
  --nav-on: 0;
  isolation: isolate;
  min-height: 48px;
  padding: 6px 8px 6px 10px;
  gap: 6px;
  border-radius: 16px;
  border: 2px solid transparent;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

html[data-theme="light"] .pill {
  color: #141414;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 252, 0.82)) padding-box,
    linear-gradient(120deg, #c99612 0%, #2eb4c4 48%, #c99612 100%) border-box;
  box-shadow:
    0 16px 44px -14px rgba(20, 28, 44, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset,
    0 1px 0 rgba(232, 197, 71, 0.55);
}

html[data-theme="dark"] .pill {
  color: #eef1f7;
  background:
    linear-gradient(180deg, rgba(18, 24, 36, 0.92), rgba(8, 12, 20, 0.78)) padding-box,
    linear-gradient(120deg, #c99612 0%, #2eb4c4 48%, #c99612 100%) border-box;
  box-shadow:
    0 16px 44px -14px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(232, 197, 71, 0.4);
}

html[data-theme="light"] .brand,
html[data-theme="dark"] .brand {
  font-weight: 650;
  letter-spacing: -0.03em;
}

html[data-theme="dark"] .menu-btn {
  color: #eef1f7;
}

html[data-theme="light"] .nav-links,
html[data-theme="dark"] .nav-links {
  position: relative;
  gap: 1px;
}

html[data-theme="light"] .nav-links::before,
html[data-theme="dark"] .nav-links::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: var(--nav-x, 0);
  width: var(--nav-w, 0);
  border-radius: 10px;
  opacity: var(--nav-on, 0);
  pointer-events: none;
  z-index: 0;
  transition:
    left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

html[data-theme="light"] .nav-links::before {
  background: linear-gradient(180deg, rgba(232, 197, 71, 0.38), rgba(232, 197, 71, 0.16));
  box-shadow: inset 0 0 0 1px rgba(184, 140, 28, 0.35);
}

html[data-theme="dark"] .nav-links::before {
  background: linear-gradient(180deg, rgba(232, 197, 71, 0.42), rgba(232, 197, 71, 0.14));
  box-shadow: inset 0 0 0 1px rgba(232, 197, 71, 0.35);
}

html[data-theme="light"] .nav-links a,
html[data-theme="dark"] .nav-links a {
  position: relative;
  z-index: 1;
  font-weight: 520;
  padding: 9px 11px;
  border-radius: 10px;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] .nav-links a {
  color: #2a2a2a;
}

html[data-theme="dark"] .nav-links a {
  color: #c5cdd8;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.is-active,
html[data-theme="light"] .nav-links a[aria-current="page"] {
  background: transparent;
  color: #5c3f0a;
  font-weight: 620;
}

html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.is-active,
html[data-theme="dark"] .nav-links a[aria-current="page"] {
  background: transparent;
  color: #e8c547;
  font-weight: 620;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a:hover {
  transform: translateY(-1px);
}

html[data-theme="light"] .theme,
html[data-theme="dark"] .theme {
  width: 48px;
  height: 48px;
  border: 1.5px solid transparent;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] .theme {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 252, 0.78)) padding-box,
    linear-gradient(135deg, #e8c547, #5ec8d8) border-box;
  color: #141414;
  box-shadow:
    0 14px 40px -16px rgba(20, 28, 44, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

html[data-theme="dark"] .theme {
  background:
    linear-gradient(180deg, rgba(18, 24, 36, 0.92), rgba(8, 12, 20, 0.78)) padding-box,
    linear-gradient(135deg, #e8c547, #5ec8d8) border-box;
  color: #eef1f7;
  box-shadow:
    0 14px 40px -16px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

html[data-theme="light"] .theme:hover,
html[data-theme="dark"] .theme:hover {
  transform: rotate(-12deg) scale(1.04);
}

html[data-theme="light"] .mobile-nav {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.9)),
    linear-gradient(120deg, #e8c547, #5ec8d8);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 18px 50px -18px rgba(20, 28, 44, 0.4);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .mobile-nav {
  background: rgba(10, 14, 22, 0.94);
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(180deg, rgba(14, 18, 28, 0.96), rgba(8, 12, 20, 0.9)),
    linear-gradient(120deg, #e8c547, #5ec8d8);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(18px);
}

html[data-theme="light"] .mobile-nav a {
  color: #141414;
  font-weight: 520;
}

html[data-theme="dark"] .mobile-nav a {
  color: #eef1f7;
  font-weight: 520;
}

html[data-theme="light"] .mobile-nav a[aria-current="page"],
html[data-theme="light"] .mobile-nav a:hover {
  background: linear-gradient(180deg, rgba(232, 197, 71, 0.32), rgba(232, 197, 71, 0.14));
  color: #5c3f0a;
}

html[data-theme="dark"] .mobile-nav a[aria-current="page"],
html[data-theme="dark"] .mobile-nav a:hover {
  background: linear-gradient(180deg, rgba(232, 197, 71, 0.32), rgba(232, 197, 71, 0.12));
  color: #e8c547;
}

html[data-theme="light"] .hero,
html[data-theme="dark"] .hero {
  grid-template-rows: minmax(92px, 0.9fr) auto calc(var(--u) * 12) auto 1fr;
}

html[data-theme="light"] .hero-title,
html[data-theme="dark"] .hero-title {
  padding-top: 28px;
}

html[data-theme="light"] .studio-shell,
html[data-theme="dark"] .studio-shell,
html[data-theme="light"] body.iw-site:not(:has(.studio-shell)):not(:has(.hero)),
html[data-theme="dark"] body.iw-site:not(:has(.studio-shell)):not(:has(.hero)) {
  padding-top: 6rem;
}

@media (max-width: 1179px) {
  html[data-theme="light"] .header,
  html[data-theme="dark"] .header {
    justify-content: space-between;
  }

  html[data-theme="light"] .header-cta,
  html[data-theme="dark"] .header-cta {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] .nav-links::before,
  html[data-theme="dark"] .nav-links::before,
  html[data-theme="light"] .nav-links a,
  html[data-theme="dark"] .nav-links a,
  html[data-theme="light"] .theme,
  html[data-theme="dark"] .theme {
    transition: none;
  }

  html[data-theme="light"] .nav-links a:hover,
  html[data-theme="dark"] .nav-links a:hover,
  html[data-theme="light"] .theme:hover,
  html[data-theme="dark"] .theme:hover {
    transform: none;
  }
}
