/* Shared dark glass: the approved home cards define the site's surface. */
.gloss-theme, .gloss-theme .glass-rim {
  --glass-card-radius: 26px;
  --glass-control-radius: 20px;
  --glass-small-radius: 12px;
  --glass-border: #ffffff29;
  --gloss-sheen: linear-gradient(180deg, #ffffff04, transparent 42%);
  --gloss-control: rgba(17,17,17,calc(.76 + var(--home-card-active, 0) * .14));
  --gloss-surface: rgba(17,17,17,calc(.76 + var(--home-card-active, 0) * .14));
  --gloss-red: var(--gloss-control);
  --gloss-control-shadow: inset 0 1px 1px #ffffff1f, inset 0 -14px 24px -16px #ffffff1f;
  --gloss-red-shadow: var(--gloss-control-shadow);
  --gloss-shadow: inset 0 1px 1px #ffffff1f,
    inset 0 calc(-14px - var(--home-card-active, 0) * 7px) calc(24px + var(--home-card-active, 0) * 22px) -16px #ffffff1f;
}

/* Small pills and circular icon controls retain their existing silhouettes. */
.gloss-theme :is(.nav-cta, .marquee-toggle, .home-work-deck-controls button, .footer-social a:where(:not(.contact-icon-tile)), .back-to-top) {
  background: var(--gloss-control);
  box-shadow: var(--gloss-control-shadow);
}
.gloss-theme .nav-cta { border-radius: var(--glass-control-radius); border-color: #aa5f5566; }
.gloss-theme .navbar .lang-switch [data-lang]:focus-visible { outline-offset: -3px; }
.gloss-theme .nav-cta:hover { background: rgba(17,17,17,.90); border-color: #aa5f55; box-shadow: var(--gloss-red-shadow); }
.gloss-theme .navbar { background: rgba(6,6,6,.88); border-bottom-color: #ffffff14; }
.gloss-theme .navbar.scrolled { background: rgba(6,6,6,.96); }

/* Decorative spans leave existing pseudo-elements, content and input intact. */
.gloss-theme .glass-rim { --home-card-active: 0; position: relative; }
.home-card-rim, .home-card-edge {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.home-card-rim { padding: 1px; z-index: 2; opacity: .58; transition: opacity .3s ease;
  background: linear-gradient(140deg,rgba(255,255,255,.62) 0%,rgba(255,255,255,.06) 38%,rgba(255,255,255,0) 60%,rgba(255,255,255,.34) 100%);
}
.home-card-edge { z-index: 2; padding: 1.5px; overflow: hidden; opacity: 0; transition: opacity .25s ease; }
.home-card-edge-light {
  position: absolute; left: 0; top: 0; width: 468px; height: 468px; border-radius: 50%; pointer-events: none;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle,#e8eaef 0%,#e8eaef 5%,rgba(232,234,239,.7) 16%,rgba(232,234,239,.22) 34%,transparent 58%);
}
.gloss-theme .glass-rim.is-home-card-active { --home-card-active: 1; }
.glass-rim.is-home-card-active > :is(.home-card-rim, .home-card-edge) { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .home-card-rim, .home-card-edge { transition: none; }
}

@media (forced-colors: active) {
  .gloss-theme :is(.hero-btn, .nav-cta, .marquee-toggle, .home-work-deck-controls button, .footer-social a:where(:not(.contact-icon-tile)), .back-to-top) {
    background: ButtonFace; color: ButtonText; box-shadow: none;
  }
  .home-card-rim, .home-card-edge { display: none; }
}
