/* Bootstrap components inherit EmmTek's visual tokens. */
body { color:var(--text); font-family:inherit; }
.container { max-width:var(--max); padding-inline:0; }
.btn { --bs-btn-color:var(--text); --bs-btn-hover-color:var(--text); --bs-btn-active-color:var(--text); }
.button:focus-visible { color:white; }
.form-row.row { display:flex; gap:0; }
.form-control,.form-select {
  color:var(--text); background-color:#0c192e; border-color:#ffffff30;
  padding:14px; border-radius:12px; margin-bottom:22px;
}
.form-control:focus,.form-select:focus { color:var(--text); background-color:#0c192e; border-color:var(--cyan); box-shadow:0 0 0 .2rem #76a9fa26; }
.form-control::placeholder { color:#96a8bf; }
/* Use the native arrow: no embedded image is needed by the strict site CSP. */
.form-select { background-image:none; appearance:auto; }
.motion-toggle {
  position:static; padding:10px 16px; min-height:44px;
  border:1px solid #76a9fa60; border-radius:50px; background:#102239f5;
  color:var(--text); font-size:.875rem; box-shadow:0 5px 20px #0003;
}
.motion-toggle:hover,.motion-toggle:focus-visible { color:white; background:#21426b; border-color:var(--cyan); }
.motion-toggle:disabled { opacity:1; color:var(--muted); background:#102239; }
/* Footer padding and structure */
.site-footer { padding-bottom:0; }
.footer-preferences { padding-bottom:16px; }

/* ── Splash Screen ── */
.splash {
  position:fixed; inset:0; z-index:9999;
  display:grid; place-items:center;
  pointer-events:none;
}
.splash[hidden] { display:none; }
.splash-logo-wrap { position:relative; width:120px; height:120px; }
.splash-bg {
  position:absolute; inset:0;
  background:radial-gradient(ellipse at 50% 40%,#162d4e,#090e18 70%);
}
.splash-content {
  position:relative; z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:16px;
  opacity:0;
}
.splash-logo {
  width:120px; height:120px; object-fit:contain;
  filter:drop-shadow(0 0 30px #8cc9ff40);
}
.splash-text {
  font-size:clamp(2rem,5vw,3.2rem); font-weight:750; letter-spacing:-.04em;
  color:var(--text); white-space:nowrap;
}
.splash-divider { color:#8a9aac; margin-inline:6px; font-weight:300; }
.splash-ti { font-size:.7em; font-weight:450; letter-spacing:0; }
.splash-tagline {
  font-size:.875rem; color:var(--muted); letter-spacing:.1em; text-transform:uppercase;
  margin:0; opacity:0;
}
.splash-glitch {
  position:absolute; z-index:3;
  inset:0;
  width:120px; height:120px;
  opacity:0; pointer-events:none;
}
.splash-glitch img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:contain;
  mix-blend-mode:screen;
}
.splash-glitch-r { filter:hue-rotate(-60deg) saturate(3); }
.splash-glitch-g { filter:hue-rotate(60deg) saturate(3); }
.splash-glitch-b { filter:hue-rotate(180deg) saturate(3); }
.splash-scanlines {
  position:absolute; inset:0; z-index:4;
  background:repeating-linear-gradient(0deg,transparent,transparent 2px,#00000018 2px,#00000018 4px);
  opacity:0; pointer-events:none;
}
.splash.is-done { display:none; }

/* ── Fiber Optic ── */
.fiber-optic {
  position:absolute; inset:0; z-index:-1;
  overflow:hidden; pointer-events:none;
}
.fiber-strand {
  position:absolute; overflow:visible;
  background:linear-gradient(90deg,transparent,#4388eb55 40%,#8cc9ff88 60%,transparent);
}
.fiber-strand-1 { top:18%; left:0; right:0; height:1px; transform:rotate(-4deg); }
.fiber-strand-2 { top:40%; left:0; right:0; height:1px; transform:rotate(2deg); }
.fiber-strand-3 { top:62%; left:0; right:0; height:1px; transform:rotate(-1deg); }
.fiber-strand-4 { top:28%; left:0; right:0; height:1px; transform:rotate(5deg); }
.fiber-strand-5 { top:78%; left:0; right:0; height:1px; transform:rotate(-3deg); }
.fiber-light {
  position:absolute; top:-4px;
  width:100%; height:9px;
  border-radius:50%;
  background:none;
  opacity:0;
}

 .fiber-light::before {
  content:''; position:absolute; left:0; top:-3px; width:90px; height:15px;
  border-radius:50%; background:radial-gradient(ellipse,#efffff 0%,#8cecff 16%,#4388eb88 40%,transparent 72%);
  box-shadow:0 0 18px 5px #8cc9ff66,0 0 50px 14px #4388eb33;
}
.fiber-strand-2 { --travel:6s; --delay:-3s; }
.fiber-strand-3 { --travel:8s; --delay:-5s; }
.fiber-strand-4 { --travel:7s; --delay:-2s; }
.fiber-strand-5 { --travel:9s; --delay:-7s; }
@media(prefers-reduced-motion:no-preference) {
  .motion-enabled .splash.is-playing { animation:splash-exit .45s 2.05s ease-in forwards; }
  .splash.is-playing .splash-content { animation:splash-enter .65s ease-out forwards; }
  .splash.is-playing .splash-tagline { animation:splash-enter .5s .35s ease-out forwards; }
  .splash.is-playing .splash-logo-wrap { animation:logo-glitch .55s 1.65s steps(1) both; }
  .splash.is-playing .splash-glitch { animation:glitch-visible .55s 1.65s both; }
  .splash.is-playing .splash-glitch-r { animation:glitch-slice .55s 1.65s steps(1) both; }
  .splash.is-playing .splash-glitch-b { animation:glitch-slice .55s 1.65s steps(1) reverse both; }
  .splash.is-playing .splash-scanlines { animation:glitch-visible .55s 1.65s both; }
  .motion-enabled .fiber-light { opacity:1; animation:fiber-travel var(--travel,5s) var(--delay,-1s) linear infinite; }
  @keyframes splash-enter { from { opacity:0; transform:translateY(14px) scale(.92); } to { opacity:1; transform:translateY(0) scale(1); } }
  @keyframes splash-exit { to { opacity:0; visibility:hidden; } }
  @keyframes glitch-visible { 0%,100% { opacity:0; } 10%,90% { opacity:.8; } }
  @keyframes logo-glitch { 0%,100% { transform:none; } 20% { transform:translateX(-5px) skewX(4deg); } 45% { transform:translateX(6px) skewX(-6deg); } 70% { transform:translateX(-3px); } }
  @keyframes glitch-slice { 0%,100% { clip-path:inset(0 0 65%); transform:translateX(0); } 20% { clip-path:inset(15% 0 45%); transform:translateX(-14px); } 45% { clip-path:inset(55% 0 10%); transform:translateX(14px); } 70% { clip-path:inset(30% 0 40%); transform:translateX(-9px); } }
  @keyframes fiber-travel { from { transform:translateX(-15%); } to { transform:translateX(110%); } }

  .motion-enabled .hero-orbits span { animation:ambient-drift 18s ease-in-out infinite alternate; }
  .motion-enabled .hero-orbits span:nth-child(2) { animation-duration:23s; animation-delay:-7s; }
  .motion-enabled .hero-orbits span:nth-child(3) { animation-duration:14s; animation-delay:-4s; }
  .motion-enabled .hero-orbits::before { animation:ambient-glow 12s ease-in-out infinite alternate; }
  .motion-enabled .status-dot { animation:status-breathe 4s ease-in-out infinite; }
  .motion-enabled .hero-emblem { animation:emblem-float 8s ease-in-out infinite; }
  .motion-enabled .project-link img { transition:filter .35s ease; }
  .motion-enabled .project-link:is(:hover,:focus-visible) img { filter:brightness(1.12); }
  .motion-enabled :is(.service,.case-study):focus-within { border-color:#76a9fa80; box-shadow:0 16px 48px #3678df18; }
  .motion-enabled .service,.motion-enabled .case-study { transition:border-color .3s,box-shadow .3s; }
  .motion-enabled .brand-card { transition:translate .3s,box-shadow .3s; }
  @media(hover:hover) {
    .motion-enabled .brand-card:hover { translate:0 -4px; box-shadow:0 10px 28px #76a9fa26; }
  }
  /* Footer animations */
  .motion-enabled .footer-glow { animation:footer-glow-pulse 4s ease-in-out infinite alternate; }
  .motion-enabled .footer-brand .brand img { animation:footer-logo-breathe 6s ease-in-out infinite; }
  .motion-enabled .footer-social-icon { transition:color .25s,border-color .25s,background .25s,transform .3s,box-shadow .3s; }
  .motion-enabled .footer-nav a,.motion-enabled .footer-services-col a { transition:color .2s,padding-left .25s; }
  .motion-enabled .footer-nav a:hover,.motion-enabled .footer-services-col a:hover { padding-left:6px; }
  .motion-enabled .footer-contact a { transition:background .25s,border-color .25s,transform .25s,box-shadow .25s; }
  .motion-enabled .footer-contact a:hover { box-shadow:0 6px 20px #76a9fa12; }
  .motion-enabled .back-to-top span { animation:back-to-top-bounce 2s ease-in-out infinite; }
  .motion-enabled .back-to-top:hover span { animation:none; }
  @keyframes ambient-drift { from { translate:0 0; } to { translate:22px -28px; } }
  @keyframes ambient-glow { from { opacity:.55; } to { opacity:1; } }
  @keyframes emblem-float { 0%,100% { translate:0 0; } 50% { translate:0 -7px; } }
  @keyframes status-breathe { 0%,100% { box-shadow:0 0 0 4px #70dbea12; } 50% { box-shadow:0 0 0 9px #70dbea20; } }
  @keyframes footer-glow-pulse { 0% { opacity:.5; filter:blur(0); } 100% { opacity:1; filter:blur(1px); } }
  @keyframes footer-logo-breathe { 0%,100% { filter:drop-shadow(0 0 4px #8cc9ff00); } 50% { filter:drop-shadow(0 0 12px #8cc9ff40); } }
  @keyframes back-to-top-bounce { 0%,100% { translate:0 0; } 50% { translate:0 -3px; } }
}
html.motion-paused { scroll-behavior:auto; }
.motion-paused *,.motion-paused *::before,.motion-paused *::after { animation:none!important; transition:none!important; }
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; }
}
@media print { .motion-toggle,.splash,.fiber-optic { display:none!important; } }

.motion-settings { position:relative; }
.motion-settings summary { cursor:pointer; padding:10px; border:1px solid var(--line); border-radius:24px; font-size:.875rem; }
.motion-preferences { position:absolute; top:calc(100% + 12px); right:0; padding:16px; min-width:220px; background:var(--bg); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); }
.motion-preferences .motion-toggle { width:100%; }
@media(max-width:760px) {
  .motion-settings { margin-top:12px; }
  .motion-preferences { position:static; margin-top:8px; }
}
