/* =========================================================================
   TechIns Group — shared design system (dark + cyan glassmorphism)
   Used by the homepage and every inner page. Single source of truth.
   ========================================================================= */
:root { --accent: #00e5ff; --bg: #020617; }
html { scroll-padding-top: 7rem; background-color: var(--bg); }
body {
    background-color: var(--bg);
    color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---- Smooth page reveal: kill the Tailwind-CDN / injected-chrome flash on
   navigation. Pure-CSS and JS-independent — the body fades itself in via an
   animation whose first keyframe (opacity 0) hides the unstyled flash at the
   very first paint, then resolves to opacity 1. Because the body's *default*
   opacity stays 1, the page can never get stuck hidden even if a script fails
   to run; the worst case is simply no fade. (techins.css is render-blocking in
   <head>, so this rule is always in force before the body paints.) */
@keyframes techins-page-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: techins-page-in .5s ease both; }

/* ---- Accessibility: visible keyboard focus ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link {
    position: fixed; top: -100px; left: 1rem; z-index: 200;
    background: var(--accent); color: #020617; font-weight: 700;
    padding: .65rem 1.1rem; border-radius: 0 0 .75rem .75rem; transition: top .2s;
}
.skip-link:focus { top: 0; }
::selection { background: rgba(0,229,255,.30); color: #ecffff; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #06343f; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #00e5ff; }
html { scrollbar-color: #06343f #020617; }

/* ---- Background field ---- */
#star-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; pointer-events: none; }
.glow-bg {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100vw; height: 100vh; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at center, rgba(0,229,255,.06) 0%, rgba(2,6,23,0) 60%);
    animation: pulseGlow 12s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%,100% { opacity:.6; transform: translate(-50%,-50%) scale(1); }
    50%     { opacity:.9; transform: translate(-50%,-50%) scale(1.02); }
}

/* ---- Scroll-progress bar ---- */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, #00e5ff, #3b82f6); z-index: 70;
    box-shadow: 0 0 12px rgba(0,229,255,.6); transition: width .1s linear;
}

/* ---- Floating glass nav ---- */
#header-wrapper { transition: transform .6s cubic-bezier(.16,1,.3,1), opacity .4s ease; }
.glass-nav-wrapper {
    position: relative; border-radius: 9999px; padding: 1.5px;
    background: rgba(255,255,255,.05); box-shadow: 0 10px 30px rgba(0,0,0,.5);
    transition: box-shadow .5s cubic-bezier(.16,1,.3,1);
}
.glass-nav-wrapper.scrolled { box-shadow: 0 15px 40px rgba(0,0,0,.6), 0 0 24px rgba(0,229,255,.16); }
.glass-nav-wrapper::before {
    content: ''; position: absolute; inset: 0; border-radius: 9999px; z-index: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.05) 35%, rgba(0,229,255,.9) 50%, rgba(255,255,255,.05) 65%, rgba(255,255,255,.05) 100%);
    background-size: 200% 100%; animation: borderSweep 5s linear infinite;
}
@keyframes borderSweep { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.glass-nav-inner {
    position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: .7rem 1.25rem; border-radius: 9999px;
    background: rgba(15,23,42,.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transition: background .3s ease;
}
.glass-nav-wrapper.scrolled .glass-nav-inner { background: rgba(15,23,42,.95); }
.nav-link { position: relative; }
.nav-link::after {
    content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
    background: var(--accent); border-radius: 2px; transition: width .3s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }

/* ---- Language switch ---- */
.lang-switch {
    display: inline-flex; align-items: center; gap: 2px; padding: 3px;
    border-radius: 9999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.lang-switch button {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1;
    padding: 6px 11px; border-radius: 9999px; color: rgba(255,255,255,.55);
    transition: all .25s ease; cursor: pointer;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.lang-active {
    background: linear-gradient(135deg, #00e5ff, #00c3db); color: #020617;
    box-shadow: 0 0 14px rgba(0,229,255,.35);
}

/* ---- Mega menu ---- */
.mega-menu {
    visibility: hidden; opacity: 0; transform: translateY(10px) scale(.98);
    transition: all .3s cubic-bezier(.16,1,.3,1); transform-origin: top right;
}
.nav-item-group:hover .mega-menu,
.nav-item-group:focus-within .mega-menu { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
.mega-menu-glass {
    background: rgba(10,16,31,.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.1); box-shadow: 0 25px 60px -15px rgba(0,0,0,.7);
}
.menu-blob-1, .menu-blob-2 { position: absolute; border-radius: 9999px; filter: blur(60px); pointer-events: none; }
.menu-blob-1 { top: -40px; right: -40px; width: 180px; height: 180px; background: rgba(0,229,255,.12); }
.menu-blob-2 { bottom: -50px; left: -30px; width: 160px; height: 160px; background: rgba(59,130,246,.10); }

/* ---- Buttons ---- */
.btn-glow { box-shadow: 0 0 20px rgba(0,229,255,.3); transition: all .3s cubic-bezier(.4,0,.2,1); }
.btn-glow:hover { box-shadow: 0 0 35px rgba(0,229,255,.6); transform: translateY(-2px); }

/* ---- Glass cards ---- */
.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.01) 100%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.08); box-shadow: 0 4px 20px -2px rgba(0,0,0,.2);
    transition: all .4s cubic-bezier(.4,0,.2,1);
}
.glass-card:hover {
    border-color: rgba(0,229,255,.3); box-shadow: 0 10px 40px -10px rgba(0,229,255,.15);
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%);
}
.group-logo { filter: drop-shadow(0 0 8px rgba(255,255,255,.1)); transition: all .3s ease; }
.glass-card:hover .group-logo { filter: drop-shadow(0 0 15px rgba(0,229,255,.4)); transform: scale(1.05); }
.feature-card:hover { transform: translateY(-4px); background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%); }
.pillar-card:hover { transform: translateY(-4px); background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%); }

.glass-card-pro {
    background: linear-gradient(135deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.01) 100%);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.06); box-shadow: 0 4px 20px rgba(0,0,0,.4);
    transition: all .4s cubic-bezier(.16,1,.3,1); border-radius: 1.5rem;
    overflow: hidden; height: 100%; display: flex; flex-direction: column;
}
.glass-card-pro:hover {
    border-color: rgba(0,229,255,.3); box-shadow: 0 15px 35px -10px rgba(0,229,255,.15); transform: translateY(-8px);
}

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Team imagery (grayscale → color) ---- */
.team-img-wrapper::after { content: ''; position: absolute; inset: 0; z-index: 10; background: linear-gradient(to top, #020617 0%, transparent 60%); }
.team-img { filter: grayscale(100%) contrast(1.1) brightness(.8); transition: all .7s cubic-bezier(.16,1,.3,1); }
.glass-card-pro:hover .team-img { filter: grayscale(0%) contrast(1.05) brightness(1); transform: scale(1.05); }

/* ---- Swiper ---- */
.team-swiper { padding: 20px 10px 60px !important; margin: -20px -10px -60px !important; }
.swiper-slide { height: auto; }
.swiper-pagination-bullet { background: rgba(255,255,255,.3); transition: all .3s; }
.swiper-pagination-bullet-active { background: #00e5ff; width: 24px; border-radius: 4px; box-shadow: 0 0 10px rgba(0,229,255,.5); }
.swiper-nav-btn {
    position: absolute; top: 45%; transform: translateY(-50%); z-index: 10;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(2,6,23,.7); border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center; color: #fff;
    cursor: pointer; backdrop-filter: blur(8px); transition: all .3s ease;
}
.swiper-nav-btn:hover { background: rgba(0,229,255,.1); border-color: rgba(0,229,255,.5); color: #00e5ff; }
.swiper-btn-prev { left: 10px; } .swiper-btn-next { right: 10px; }
@media (min-width: 1024px) { .swiper-btn-prev { left: -20px; } .swiper-btn-next { right: -20px; } }

/* ---- Hero horizon ---- */
.planet-curve {
    position: absolute; bottom: -200px; left: 50%; transform: translateX(-50%);
    width: 150vw; height: 300px; background: #020617;
    border-top: 1px solid rgba(0,229,255,.4); border-radius: 50%;
    box-shadow: 0 -40px 120px rgba(0,229,255,.15); z-index: 1;
    animation: floatPlanet 8s ease-in-out infinite;
}
@media (min-width: 768px) { .planet-curve { bottom: -380px; height: 500px; } }
@keyframes floatPlanet { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(12px); } }

/* ---- FAQ accordion ---- */
.faq-content { max-height: 0; overflow: hidden; transition: max-height .35s ease-out, padding .3s ease; }
.faq-card.faq-open .faq-content { max-height: 600px; padding-bottom: 1.25rem; }
.faq-card.faq-open .ph-caret-down { transform: rotate(180deg); }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(40px); transition: all .9s cubic-bezier(.16,1,.3,1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ---- Collaboration steps: animated walkthrough timeline ---- */
.cstep-dot { transition: border-color .5s ease, background-color .5s ease, box-shadow .5s ease, transform .5s cubic-bezier(.16,1,.3,1); }
.cstep .cstep-num, .cstep .cstep-check, .cstep .cstep-label { transition: color .5s ease; }
.cstep.is-done .cstep-dot { border-color: rgba(0,229,255,.5); background-color: rgba(0,229,255,.07); }
.cstep.is-done .cstep-num { color: rgba(0,229,255,.85); }
.cstep.is-done .cstep-label { color: rgba(255,255,255,.78); }
.cstep.is-active .cstep-dot { border-color: var(--accent); box-shadow: 0 0 20px rgba(0,229,255,.45); transform: scale(1.09); }
.cstep.is-active .cstep-num { color: var(--accent); }
.cstep.is-active .cstep-label { color: #fff; }
.cstep-final.is-active .cstep-dot, .cstep-final.is-done .cstep-dot { background-color: var(--accent); border-color: var(--accent); box-shadow: 0 0 26px rgba(0,229,255,.55); }
.cstep-final.is-active .cstep-check, .cstep-final.is-done .cstep-check { color: var(--bg); }
.cstep-final.is-active .cstep-label, .cstep-final.is-done .cstep-label { color: var(--accent); }
#collabProgress { transition: height .7s cubic-bezier(.16,1,.3,1); }

/* ---- Glass form inputs (shared by the contact form AND the newsletter modal,
   which is injected on every page — so this must live in the shared stylesheet,
   otherwise the input/select text renders in the default dark colour and the
   selected value is invisible on the dark modal). ---- */
.glass-input { background: rgba(2,6,23,.5); border: 1px solid rgba(255,255,255,.1); color: #fff; -webkit-text-fill-color: #fff; caret-color: #00e5ff; transition: all .3s ease; }
.glass-input:focus { outline: none; border-color: rgba(0,229,255,.5); box-shadow: 0 0 15px rgba(0,229,255,.1); background: rgba(2,6,23,.7); }
.glass-input::placeholder { color: rgba(255,255,255,.35); -webkit-text-fill-color: rgba(255,255,255,.35); }

/* ---- Native selects styled as glass inputs (forms + newsletter) ---- */
.glass-select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e5ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; background-size: 1rem; padding-right: 2.75rem;
}
.glass-select option { background-color: #0b1220; color: #fff; }

/* ---- Newsletter modal ---- */
#nlModal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
#nlModal.is-open { opacity: 1; visibility: visible; }
#nlModal .nl-card { transform: translateY(14px) scale(.96); transition: transform .4s cubic-bezier(.16,1,.3,1); }
#nlModal.is-open .nl-card { transform: translateY(0) scale(1); }
body.nl-lock { overflow: hidden; }

/* ---- Footer decoration ---- */
.digital-particle { position: absolute; border-radius: 9999px; pointer-events: none; }
@keyframes floatUpParticles { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: .8; } 100% { transform: translateY(-220px); opacity: 0; } }
.animated-grid { animation: gridPan 40s linear infinite; }
@keyframes gridPan { from { background-position: 0 0; } to { background-position: 30px 30px; } }
.float-c-1 { animation: floatY 6s ease-in-out infinite; }
.float-c-2 { animation: floatY 7s ease-in-out .4s infinite; }
.float-c-3 { animation: floatY 8s ease-in-out .8s infinite; }
.float-c-vip { animation: floatY 6.5s ease-in-out .2s infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---- Back to top ---- */
#back-to-top {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
    width: 46px; height: 46px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
    background: rgba(15,23,42,.9); border: 1px solid rgba(0,229,255,.35); color: #00e5ff;
    box-shadow: 0 8px 24px rgba(0,0,0,.5); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s ease;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: rgba(0,229,255,.12); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
    body { animation: none !important; opacity: 1 !important; }
    #star-canvas { display: none; }
}
