/* =========================================================
   SATECH — Sphere Affairs Technologies
   Cyber / IT design system · v4 (Red & White)
   ========================================================= */
:root {
  /* SATECH Red — dark variant (white is the default, see html.light) */
  --bg: #0a0506; --bg-2: #140809; --bg-3: #1e0b0e;
  --panel: rgba(30, 10, 13, .76); --panel-solid: #170a0c;
  --line: rgba(255, 45, 70, .16); --line-strong: rgba(255, 45, 70, .34);
  --text: #fff4f5; --muted: #d2b1b4; --soft: #9a7377;
  --cyan: #ff2d46; --blue: #ff5a5f; --violet: #c1121f; --green: #4ade80; --amber: #ffc94a; --red: #ff6b6b; --orange: #ff4d4d;
  --grad: linear-gradient(120deg, #ff4d5a 0%, #e10600 50%, #9d0208 100%);
  --grad-warm: linear-gradient(120deg, #ff1f3d 0%, #9d0208 100%);
  --grad-soft: linear-gradient(120deg, rgba(255,45,70,.14), rgba(157,2,8,.18));
  --glow: 0 0 0 1px rgba(255,45,70,.28), 0 18px 50px -12px rgba(255,31,61,.45);
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  --radius: 20px; --radius-lg: 28px;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --nav-h: 72px; --tab-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
html.light {
  /* SATECH Red — white (default) */
  --bg: #ffffff; --bg-2: #fff4f5; --bg-3: #ffe6e8;
  --panel: rgba(255,255,255,.9); --panel-solid: #ffffff;
  --line: rgba(217, 4, 41, .13); --line-strong: rgba(217, 4, 41, .30);
  --text: #1c0a0d; --muted: #5e4447; --soft: #8a6c70;
  --cyan: #d90429; --blue: #ef233c; --violet: #9d0208; --green: #059669; --amber: #b7791f; --red: #d90429; --orange: #e5383b;
  --grad: linear-gradient(120deg, #ef233c 0%, #d90429 50%, #9d0208 100%);
  --grad-warm: linear-gradient(120deg, #ff1f3d 0%, #9d0208 100%);
  --grad-soft: linear-gradient(120deg, rgba(239,35,60,.08), rgba(157,2,8,.10));
  --glow: 0 0 0 1px rgba(217,4,41,.20), 0 18px 40px -16px rgba(217,4,41,.38);
  --shadow: 0 20px 50px -24px rgba(90,10,20,.22);
  color-scheme: light;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}
body::before { /* tech grid backdrop */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  opacity: .55;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, h5 { font-family: var(--head); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: var(--text); }
p { color: var(--muted); }
strong { color: var(--text); }
::selection { background: rgba(255,31,61,.35); color: #fff; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 3000; background: var(--cyan); color: #001; padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Ambient effects ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: var(--grad); box-shadow: 0 0 12px var(--cyan); }
.cursor-glow { position: fixed; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255,31,61,.10), transparent 60%); transform: translate(-50%, -50%); left: -600px; top: -600px; transition: opacity .3s; }
html.light .cursor-glow { background: radial-gradient(circle, rgba(217,4,41,.08), transparent 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; pointer-events: none; z-index: 0; animation: blobMove 18s ease-in-out infinite alternate; }
.blob.b1 { width: 460px; height: 460px; background: #b5121b; top: -120px; left: -120px; }
.blob.b2 { width: 380px; height: 380px; background: #7f0d15; bottom: -140px; right: -80px; animation-delay: -6s; }
.blob.b3 { width: 260px; height: 260px; background: #e5383b; top: 40%; left: 45%; animation-delay: -12s; }
html.light .blob { opacity: .18; }
@keyframes blobMove { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.12); } 100% { transform: translate(-40px,20px) scale(.95); } }

/* ---------- Boot loader ---------- */
.loader { position: fixed; inset: 0; z-index: 5000; background: #0a0506; display: flex; align-items: center; justify-content: center; transition: opacity .5s ease, visibility .5s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-box { width: min(440px, 88vw); font-family: var(--mono); font-size: 13px; color: #ffb3b8; }
.loader-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: #e8eefc; font-family: var(--head); font-weight: 700; font-size: 18px; }
.loader-lines div { opacity: 0; transform: translateX(-6px); animation: lineIn .25s forwards; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loader-lines div span { color: #4ade80; }
.loader-bar { margin-top: 16px; height: 4px; border-radius: 4px; background: rgba(125,211,252,.15); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#ff1f3d,#9d0208); animation: loadBar 1.3s ease forwards; }
@keyframes lineIn { to { opacity: 1; transform: none; } }
@keyframes loadBar { to { width: 100%; } }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 14px;
  font-family: var(--head); font-weight: 600; font-size: .95rem; letter-spacing: .01em; white-space: nowrap; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease; isolation: isolate; overflow: hidden; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(225,6,0,.7); }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255,31,61,.8); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,.03); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--glow); }
.btn-sm { padding: 10px 18px; font-size: .85rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1500; height: var(--nav-h); display: flex; align-items: center;
  transition: background .3s, border-color .3s, height .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); height: 64px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; }
.brand-mark .ring { transform-origin: 50% 50%; animation: spin 12s linear infinite; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name b { font-family: var(--head); font-size: 1.08rem; letter-spacing: -.01em; }
.brand-name small { font-family: var(--mono); font-size: .62rem; letter-spacing: .22em; color: var(--cyan); text-transform: uppercase; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { position: relative; padding: 8px 13px; border-radius: 10px; color: var(--muted); font-size: .9rem; font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: rgba(148,163,184,.08); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px var(--cyan); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03); transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-btn .sun { display: none; } html.light .theme-btn .sun { display: block; } html.light .theme-btn .moon { display: none; }
.menu-btn { display: none; }
.menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-btn span + span { margin-top: 5px; }
.menu-btn { flex-direction: column; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer { position: fixed; inset: 0; z-index: 1400; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center; padding: 90px 28px 40px; gap: 6px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
body.menu-open .drawer { opacity: 1; visibility: visible; }
.drawer a { font-family: var(--head); font-size: 1.6rem; font-weight: 600; color: var(--text); padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center;
  opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .4s; }
.drawer a small { font-family: var(--mono); font-size: .75rem; color: var(--cyan); }
body.menu-open .drawer a { opacity: 1; transform: none; }
.drawer .btn { margin-top: 20px; border-bottom: 0; font-size: 1rem; justify-content: center; }

/* ---------- Sections ---------- */
main { position: relative; }
.section { position: relative; padding: 110px 0; }
.section-sm { padding: 70px 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(255,31,61,.18), 0 0 14px var(--cyan); animation: blink 1.6s ease-in-out infinite; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: 16px; }
.section-head p { font-size: 1.08rem; }

/* ---------- Hero / banner slider ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; padding: calc(var(--nav-h) + 30px) 0 70px; display: flex; align-items: center; overflow: hidden; }
#netCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .8; }
.hero .container { position: relative; z-index: 2; }
.slider { position: relative; }
.slide { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
.slide:not(.active) { position: absolute; inset: 0; pointer-events: none; }
.slide .copy > * { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.slide.active .copy > * { opacity: 1; transform: none; }
.slide.active .copy > *:nth-child(2) { transition-delay: .08s; } .slide.active .copy > *:nth-child(3) { transition-delay: .16s; }
.slide.active .copy > *:nth-child(4) { transition-delay: .24s; } .slide.active .copy > *:nth-child(5) { transition-delay: .32s; }
.slide .art { opacity: 0; transform: scale(.94) translateY(10px); transition: opacity .8s ease .1s, transform .8s ease .1s; }
.slide.active .art { opacity: 1; transform: none; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,31,61,.06); font-size: .82rem; color: var(--text); margin-bottom: 22px; }
.hero-tag b { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; background: var(--grad); color: #fff; padding: 3px 9px; border-radius: 999px; }
.hero h1, .hero .h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 22px; }
.hero .lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.typed { font-family: var(--mono); font-size: .9rem; color: var(--green); min-height: 1.6em; }
.typed::before { content: "$ "; color: var(--soft); }
.typed::after { content: "▋"; animation: blink 1s steps(1) infinite; margin-left: 2px; }
.slider-ui { display: flex; align-items: center; gap: 16px; margin-top: 44px; }
.dots { display: flex; gap: 8px; }
.dots button { width: 34px; height: 5px; border-radius: 5px; background: var(--line-strong); overflow: hidden; position: relative; }
.dots button i { position: absolute; inset: 0; width: 0; background: var(--grad); }
.dots button.active i { animation: dotFill 7s linear forwards; }
.slider.paused .dots button.active i { animation-play-state: paused; }
@keyframes dotFill { to { width: 100%; } }
.arrows { display: flex; gap: 8px; }
.slide-count { font-family: var(--mono); font-size: .8rem; color: var(--soft); }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; color: var(--soft); }
.scroll-hint i { width: 22px; height: 34px; border: 2px solid var(--line-strong); border-radius: 12px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; border-radius: 2px; background: var(--cyan); transform: translateX(-50%); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 5px; } 40% { opacity: 1; } 100% { opacity: 0; top: 18px; } }

/* art frame */
.art-frame { position: relative; aspect-ratio: 1 / .92; width: 100%; max-width: 560px; margin-left: auto; }
.art-frame svg { width: 100%; height: 100%; overflow: visible; }
.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); font-size: .8rem; color: var(--text); animation: floatY 6s ease-in-out infinite; z-index: 2; }
.float-chip svg { width: 18px; height: 18px; color: var(--green); }
.float-chip small { display: block; font-family: var(--mono); font-size: .66rem; color: var(--soft); }
.float-chip.c1 { top: 8%; left: -2%; } .float-chip.c2 { bottom: 10%; right: -2%; animation-delay: -3s; } .float-chip.c3 { bottom: 26%; left: -6%; animation-delay: -1.5s; }

/* ---------- Marquee ---------- */
.marquee { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 70%, transparent); overflow: hidden; padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .9rem; color: var(--muted); white-space: nowrap; }
.marquee-track span::before { content: "◆"; color: var(--cyan); font-size: .6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 1.2s ease .2s; }
.stat.in::after { transform: scaleX(1); }
.stat b { display: block; font-family: var(--head); font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1; margin-bottom: 8px; }
.stat span { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.stat svg { position: absolute; right: 18px; top: 18px; width: 28px; height: 28px; color: var(--cyan); opacity: .7; }

/* ---------- Cards ---------- */
.card { position: relative; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); padding: 30px 26px; overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transform-style: preserve-3d; }
.card::before { /* mouse-follow glow */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,31,61,.14), transparent 45%); }
.card:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--glow); }
.card h3 { font-size: 1.22rem; margin: 18px 0 10px; }
.card p { font-size: .95rem; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-family: var(--mono); font-size: .8rem; color: var(--cyan); }
.card .more svg { width: 15px; height: 15px; transition: transform .25s; }
.card:hover .more svg { transform: translateX(4px); }
.icon-tile { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; position: relative;
  background: var(--grad-soft); border: 1px solid var(--line-strong); color: var(--cyan); }
.icon-tile svg { width: 28px; height: 28px; }
.icon-tile::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--cyan); opacity: 0; transform: scale(1); }
.card:hover .icon-tile::after { animation: ping 1.2s ease-out infinite; }
.card:hover .icon-tile svg { animation: wiggle .6s ease; }
@keyframes ping { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.1); } 75% { transform: rotate(8deg) scale(1.05); } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.tag { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--cyan); background: rgba(255,31,61,.06); }
.tag.hot { background: var(--grad); color: #fff; border-color: transparent; }
.card .tag { position: absolute; top: 22px; right: 22px; }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.rev .split-art { order: -1; }
.checklist { display: grid; gap: 12px; margin: 24px 0 30px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.checklist li svg { flex-shrink: 0; width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: rgba(74,222,128,.14); color: var(--green); margin-top: 1px; }

/* ---------- SOC / terminal ---------- */
.soc { border-radius: var(--radius-lg); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--panel-solid) 92%, transparent); box-shadow: var(--shadow); overflow: hidden; }
.soc-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .75rem; color: var(--soft); }
.soc-top i { width: 11px; height: 11px; border-radius: 50%; background: #fb7185; } .soc-top i:nth-child(2) { background: #fbbf24; } .soc-top i:nth-child(3) { background: #4ade80; }
.soc-top span { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--green); }
.soc-top span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.2s infinite; }
.soc-body { display: grid; grid-template-columns: 1fr 200px; }
.term { padding: 18px; font-family: var(--mono); font-size: .78rem; line-height: 1.75; height: 300px; overflow: hidden; color: var(--muted); display: flex; flex-direction: column; justify-content: flex-end; }
.term div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: lineIn .3s forwards; }
.term .ok { color: var(--green); } .term .warn { color: var(--amber); } .term .bad { color: var(--red); } .term .info { color: var(--cyan); }
.soc-side { border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.radar { width: 100%; aspect-ratio: 1; }
.radar .sweep { transform-origin: 50px 50px; animation: spin 3.2s linear infinite; }
.meter { font-family: var(--mono); font-size: .7rem; color: var(--soft); }
.meter b { display: flex; justify-content: space-between; color: var(--text); font-weight: 500; margin-bottom: 5px; }
.meter i { display: block; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; position: relative; }
.meter i::after { content: ""; position: absolute; inset: 0; width: var(--v, 60%); background: var(--grad); border-radius: 5px; animation: meterWave 3s ease-in-out infinite alternate; }
@keyframes meterWave { from { width: calc(var(--v) - 18%); } to { width: var(--v); } }
.sim-note { font-family: var(--mono); font-size: .7rem; color: var(--soft); text-align: center; margin-top: 10px; }

/* ---------- Pipeline ---------- */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pipeline::before { content: ""; position: absolute; top: 38px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 16px); }
.pipeline::after { content: ""; position: absolute; top: 34px; left: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px 4px var(--cyan); animation: packet 5s linear infinite; }
@keyframes packet { 0% { left: 12%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 87%; opacity: 0; } }
.step { position: relative; text-align: center; padding: 0 8px; }
.step .node { position: relative; z-index: 1; width: 78px; height: 78px; margin: 0 auto 20px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: var(--panel-solid); border: 1px solid var(--line-strong); color: var(--cyan); box-shadow: var(--glow); }
.step .node svg { width: 32px; height: 32px; }
.step .node b { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-family: var(--mono); font-size: .75rem; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { font-size: .92rem; }
.step:nth-child(1) .node { animation: nodePulse 5s infinite 0s; } .step:nth-child(2) .node { animation: nodePulse 5s infinite 1.25s; }
.step:nth-child(3) .node { animation: nodePulse 5s infinite 2.5s; } .step:nth-child(4) .node { animation: nodePulse 5s infinite 3.75s; }
@keyframes nodePulse { 0%, 30%, 100% { box-shadow: var(--glow); transform: none; } 12% { box-shadow: 0 0 0 6px rgba(255,31,61,.18), 0 0 40px rgba(255,31,61,.6); transform: translateY(-4px); } }

/* ---------- Hardware ---------- */
.hw-wrap { position: relative; border-radius: var(--radius-lg); border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, rgba(225,6,0,.12), transparent 60%), var(--panel); padding: 26px; }
.hw-wrap svg { width: 100%; height: auto; }
.hotspot { cursor: pointer; }
.hotspot circle.pulse { transform-box: fill-box; transform-origin: center; animation: hotPulse 2s ease-out infinite; }
@keyframes hotPulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
.hw-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.hw-legend div { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: .86rem; color: var(--muted); transition: border-color .2s, background .2s; }
.hw-legend div.on { border-color: var(--cyan); background: rgba(255,31,61,.07); }
.hw-legend b { display: block; color: var(--text); font-family: var(--head); font-size: .95rem; }
.hw-legend i { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; background: var(--grad); color: #fff; font-style: normal; font-family: var(--mono); font-size: .7rem; display: flex; align-items: center; justify-content: center; margin-top: 2px; }

/* ---------- Globe ---------- */
.globe-wrap { position: relative; aspect-ratio: 1; max-width: 520px; margin: 0 auto; }
#globe { width: 100%; height: 100%; }
.globe-wrap::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255,31,61,.18), transparent 65%); filter: blur(20px); }
.region-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.region-list li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-size: .9rem; color: var(--text); }
.region-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex-shrink: 0; }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 34px; }
.filters button { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .86rem; color: var(--muted); transition: all .25s; }
.filters button:hover { color: var(--text); border-color: var(--cyan); }
.filters button.active { background: var(--grad); color: #fff; border-color: transparent; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 16px; }
.g-item { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: var(--bg-3); transition: opacity .4s, transform .4s; }
.g-item.wide { grid-column: span 2; } .g-item.tall { grid-row: span 2; }
.g-item.hide { display: none; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, filter .5s; }
.g-item:hover img { transform: scale(1.08); }
.g-item figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(3,6,20,.9)); color: #fff; transform: translateY(30%); opacity: 0; transition: all .35s ease; }
.g-item:hover figcaption, .g-item:focus-visible figcaption { transform: none; opacity: 1; }
.g-item figcaption b { display: block; font-family: var(--head); font-size: 1rem; }
.g-item figcaption small { font-family: var(--mono); font-size: .7rem; color: #ffb3b8; letter-spacing: .1em; text-transform: uppercase; }
.g-item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--cyan); transition: box-shadow .3s; pointer-events: none; }
.g-item:hover::after { box-shadow: inset 0 0 0 2px var(--cyan); }
.lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(2,4,14,.92); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 60px 70px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox figcaption { color: #cbd5e1; margin-top: 16px; font-size: .95rem; }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.06); }
.lb-btn:hover { border-color: #ff1f3d; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 18px; right: 18px; } .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); } .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Achievements / timeline ---------- */
.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 26px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--cyan), var(--violet)); opacity: .5; }
.t-item { position: relative; display: flex; gap: 20px; align-items: flex-start; padding: 20px 22px 20px 0; }
.t-item .icon-tile { flex-shrink: 0; width: 54px; height: 54px; background: var(--panel-solid); z-index: 1; }
.t-item h4 { font-size: 1.08rem; margin-bottom: 4px; }
.t-item p { font-size: .93rem; }

/* ---------- Team ---------- */
.team-card { text-align: center; padding: 34px 28px; }
.avatar { position: relative; width: 170px; height: 170px; margin: 0 auto 22px; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); position: relative; z-index: 1; }
.avatar::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: conic-gradient(from 0deg, var(--cyan), var(--violet), transparent 60%, var(--cyan)); animation: spin 6s linear infinite; }
.team-card .role { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin: 6px 0 14px; }
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }

/* ---------- Offices ---------- */
.office { padding: 0; }
.office .map { height: 260px; border-bottom: 1px solid var(--line); filter: saturate(.8); }
html:not(.light) .office .map { filter: invert(.9) hue-rotate(180deg) saturate(.7) brightness(.95); }
.office .map iframe { width: 100%; height: 100%; border: 0; }
.office .info { padding: 24px 26px 28px; }
.office h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.office h3 svg { width: 22px; height: 22px; color: var(--cyan); }

/* ---------- Page hero ---------- */
.page-hero { position: relative; padding: calc(var(--nav-h) + 70px) 0 80px; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; align-items: center; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin: 14px 0 18px; letter-spacing: -.03em; }
.page-hero p.lead { font-size: 1.12rem; max-width: 620px; }
.page-hero .ph-art { max-width: 380px; margin-left: auto; width: 100%; }
.crumbs { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: .78rem; color: var(--soft); }
.crumbs a { color: var(--cyan); }

/* ---------- Detail rows (services/products pages) ---------- */
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; padding: 0; margin-bottom: 26px; scroll-margin-top: 90px; }
.detail-main { padding: 36px; }
.detail-side { padding: 36px 30px; border-left: 1px solid var(--line); background: rgba(255,31,61,.03); display: flex; flex-direction: column; gap: 14px; }
.detail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.detail-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.detail .tag { position: static; }
.side-item { display: flex; gap: 10px; align-items: center; font-size: .92rem; color: var(--text); }
.side-item svg { width: 18px; height: 18px; color: var(--cyan); flex-shrink: 0; }
.side-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.mini-anim { width: 100%; height: 120px; margin-top: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-top: 14px; }
.feat-grid li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--muted); }
.feat-grid li svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 3px; }
.subnav { position: sticky; top: 64px; z-index: 50; display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; margin-bottom: 30px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex-shrink: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.subnav a:hover { color: var(--text); border-color: var(--cyan); }

/* ---------- Training ---------- */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.perk { text-align: center; padding: 26px 16px; }
.perk .icon-tile { margin: 0 auto; }
.perk h4 { margin-top: 14px; font-size: 1.05rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--glow); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--head); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line-strong); position: relative; transition: transform .3s, background .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--cyan); transform: translate(-50%,-50%); }
.faq summary i::after { transform: translate(-50%,-50%) rotate(90deg); transition: transform .3s; }
.faq details[open] summary i { background: var(--grad); border-color: transparent; }
.faq details[open] summary i::before, .faq details[open] summary i::after { background: #fff; }
.faq details[open] summary i::after { transform: translate(-50%,-50%) rotate(0); }
.faq .ans { padding: 0 24px 22px; animation: lineIn .35s ease; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; }
.field label { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s; }
.field select option { background: var(--panel-solid); color: var(--text); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(255,31,61,.15); }
.form-status { font-family: var(--mono); font-size: .82rem; color: var(--green); min-height: 1.2em; text-align: center; }
.contact-line { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line .icon-tile { width: 48px; height: 48px; border-radius: 14px; }
.contact-line .icon-tile svg { width: 22px; height: 22px; }
.contact-line small { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.contact-line a, .contact-line span { color: var(--text); font-weight: 600; }

/* ---------- Prose ---------- */
.prose { max-width: 860px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 26px 0 8px; color: var(--cyan); }
.prose p, .prose li { color: var(--muted); margin-bottom: 12px; }
.prose ul { list-style: none; margin: 10px 0 18px; display: grid; gap: 6px; }
.prose ul li { position: relative; padding-left: 22px; margin: 0; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); transform: rotate(45deg); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.updated { display: inline-block; font-family: var(--mono); font-size: .76rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--cyan); margin-bottom: 26px; }

/* ---------- CTA ---------- */
.cta { position: relative; border-radius: 32px; padding: 70px 40px; text-align: center; overflow: hidden; border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 20% 20%, rgba(255,31,61,.22), transparent 45%), radial-gradient(circle at 80% 80%, rgba(157,2,8,.28), transparent 45%), var(--panel-solid); }
.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 14px; }
.cta p { max-width: 620px; margin: 0 auto 30px; font-size: 1.08rem; }
.cta .hero-actions { justify-content: center; margin: 0; }
.cta-lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 60px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 80px 0 30px; overflow: hidden; }
.footer-circuit { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; pointer-events: none; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-grid h5 { font-family: var(--mono); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin-bottom: 18px; }
.footer-grid a { display: block; color: var(--muted); font-size: .93rem; padding: 4px 0; transition: color .2s, transform .2s; }
.footer-grid a:hover { color: var(--text); transform: translateX(3px); }
.footer-grid p { font-size: .93rem; margin: 16px 0 20px; max-width: 320px; }
.footer-bottom { position: relative; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--soft); }
.footer-bottom .motto { font-family: var(--mono); color: var(--cyan); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .72rem; color: var(--green); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(74,222,128,.3); background: rgba(74,222,128,.07); }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.4s infinite; }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 1300; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(37,211,102,.4); }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: ping 2s ease-out infinite; }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.to-top { position: fixed; right: 26px; bottom: 90px; z-index: 1300; width: 46px; height: 46px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s; backdrop-filter: blur(8px); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- 404 ---------- */
.nf { min-height: 80vh; display: flex; align-items: center; text-align: center; padding-top: var(--nav-h); }
.nf .code { font-family: var(--mono); font-size: clamp(5rem, 16vw, 10rem); font-weight: 700; line-height: 1; position: relative; display: inline-block; }
.glitch { position: relative; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.glitch::before { color: var(--cyan); animation: glitch1 2.4s infinite steps(2); clip-path: inset(0 0 55% 0); }
.glitch::after { color: var(--violet); animation: glitch2 2.4s infinite steps(2); clip-path: inset(55% 0 0 0); }
@keyframes glitch1 { 0%,90%,100% { transform: none; } 92% { transform: translate(-4px, 2px); } 96% { transform: translate(4px,-1px); } }
@keyframes glitch2 { 0%,88%,100% { transform: none; } 91% { transform: translate(4px,-2px); } 95% { transform: translate(-3px,1px); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.from-left { transform: translateX(-40px); } .reveal.from-right { transform: translateX(40px); } .reveal.zoom { transform: scale(.92); }
.reveal.in { opacity: 1; transform: none; }
.stagger > .reveal:nth-child(2) { transition-delay: .08s; } .stagger > .reveal:nth-child(3) { transition-delay: .16s; } .stagger > .reveal:nth-child(4) { transition-delay: .24s; }
.stagger > .reveal:nth-child(5) { transition-delay: .32s; } .stagger > .reveal:nth-child(6) { transition-delay: .4s; } .stagger > .reveal:nth-child(7) { transition-delay: .48s; } .stagger > .reveal:nth-child(8) { transition-delay: .56s; }

/* ---------- SVG animation helpers ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinRev { to { transform: rotate(-360deg); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes dash { to { stroke-dashoffset: -200; } }
@keyframes draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes pulseScale { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .85; } }
@keyframes barGrow { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(var(--scan, 220px)); opacity: 0; } }
@keyframes ledBlink { 0%,100% { opacity: 1; } 40% { opacity: .2; } 60% { opacity: 1; } 75% { opacity: .4; } }
@keyframes typeLine { 0% { transform: scaleX(0); } 40%,100% { transform: scaleX(1); } }
.a-spin { transform-box: fill-box; transform-origin: center; animation: spin 10s linear infinite; }
.a-spin-fast { transform-box: fill-box; transform-origin: center; animation: spin 1.2s linear infinite; }
.a-spin-rev { transform-box: fill-box; transform-origin: center; animation: spinRev 16s linear infinite; }
.a-float { animation: floatY 6s ease-in-out infinite; }
.a-float-2 { animation: floatY 7.5s ease-in-out infinite -2s; }
.a-blink { animation: blink 1.6s ease-in-out infinite; }
.a-led { animation: ledBlink 1.3s steps(1) infinite; }
.a-led-2 { animation: ledBlink 2.1s steps(1) infinite -.7s; }
.a-led-3 { animation: ledBlink .9s steps(1) infinite -.3s; }
.a-dash { stroke-dasharray: 6 10; animation: dash 6s linear infinite; }
.a-flow { stroke-dasharray: 14 200; animation: dash 3s linear infinite; }
.a-flow-2 { stroke-dasharray: 10 140; animation: dash 2.2s linear infinite -1s; }
.a-draw { stroke-dasharray: 600; animation: draw 2.4s ease forwards; }
.a-pulse { transform-box: fill-box; transform-origin: center; animation: pulseScale 2.6s ease-in-out infinite; }
.a-bar { transform-box: fill-box; transform-origin: bottom; animation: barGrow 2.2s ease-in-out infinite; }
.a-scan { animation: scan 3.2s ease-in-out infinite; }
.a-type { transform-box: fill-box; transform-origin: left; animation: typeLine 3.5s ease-in-out infinite; }
.a-ping { transform-box: fill-box; transform-origin: center; animation: hotPulse 2.2s ease-out infinite; }
.d1 { animation-delay: -.4s !important; } .d2 { animation-delay: -.9s !important; } .d3 { animation-delay: -1.4s !important; } .d4 { animation-delay: -1.9s !important; } .d5 { animation-delay: -2.4s !important; }
svg .stroke-c { stroke: var(--cyan); } svg .stroke-v { stroke: var(--violet); } svg .stroke-b { stroke: var(--blue); } svg .stroke-g { stroke: var(--green); }
svg .stroke-l { stroke: var(--line-strong); } svg .fill-c { fill: var(--cyan); } svg .fill-v { fill: var(--violet); } svg .fill-g { fill: var(--green); } svg .fill-b { fill: var(--blue); }
svg .fill-panel { fill: var(--panel-solid); } svg .fill-bg { fill: var(--bg-2); } svg .fill-bg3 { fill: var(--bg-3); } svg .fill-text { fill: var(--text); } svg .fill-muted { fill: var(--soft); }
svg .fill-r { fill: var(--red); } svg .fill-a { fill: var(--amber); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links a { padding: 8px 9px; font-size: .86rem; }
  .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .nav-links, .nav-actions .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .slide, .split, .page-hero .container { grid-template-columns: 1fr; }
  .slide { gap: 20px; text-align: center; }
  .hero .lead, .hero-actions { margin-left: auto; margin-right: auto; justify-content: center; }
  .slider-ui { justify-content: center; }
  .art-frame { margin: 0 auto; max-width: 420px; }
  .split.rev .split-art { order: 0; }
  .split { gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .page-hero .ph-art { margin: 0 auto; max-width: 300px; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { border-left: 0; border-top: 1px solid var(--line); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .soc-body { grid-template-columns: 1fr; }
  .soc-side { border-left: 0; border-top: 1px solid var(--line); flex-direction: row; align-items: center; }
  .radar { width: 120px; flex-shrink: 0; }
  .soc-side .meters { flex: 1; display: grid; gap: 12px; }
  .pipeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .pipeline::before, .pipeline::after { display: none; }
  .scroll-hint { display: none; }
}
@media (max-width: 680px) {
  .container { padding: 0 18px; }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 38px; }
  .grid-3, .grid-2, .grid-4, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 20px 16px; }
  .stat svg { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; gap: 10px; }
  .g-item.wide { grid-column: span 2; }
  .g-item figcaption { transform: none; opacity: 1; padding: 30px 12px 10px; }
  .g-item figcaption b { font-size: .86rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form .row, .feat-grid, .hw-legend, .region-list { grid-template-columns: 1fr; }
  .detail-main, .detail-side { padding: 26px 22px; }
  .cta { padding: 50px 22px; border-radius: 24px; }
  .hero { padding-top: calc(var(--nav-h) + 16px); min-height: auto; }
  .float-chip { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .lightbox { padding: 60px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
  .pipeline { grid-template-columns: 1fr; }
  .term { height: 230px; font-size: .7rem; }
  .brand-name small { letter-spacing: .14em; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .to-top { right: 18px; bottom: 76px; }
}
@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, .slide .copy > *, .slide .art { opacity: 1 !important; transform: none !important; }
  .loader { display: none; }
}
.gallery.preview { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; }
@media (max-width: 680px) { .gallery.preview { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; } }
.float-chip.c1 { top: -4%; left: 0; }
.h1 { font-family: var(--head); font-weight: 700; color: var(--text); }
.g-item img { object-position: center 40%; }

/* =========================================================
   v3 additions — app-style mobile nav, login, academy, motion
   ========================================================= */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes rotAng { to { --ang: 360deg; } }

/* ---- header ---- */
.btn-login { border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,.03); }
.btn-login:hover { border-color: var(--cyan); box-shadow: var(--glow); transform: translateY(-2px); }
.m-only { display: none !important; }
.site-header .nav-actions .btn { padding: 10px 16px; }

/* ---- page transition ---- */
body { animation: pageIn .6s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.page-wipe { position: fixed; inset: 0; z-index: 6000; pointer-events: none; background: var(--bg); opacity: 0; transition: opacity .28s ease; }
.page-wipe.on { opacity: 1; }

/* ---- word reveal ---- */
.wsplit .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.wsplit .w > span { display: inline-block; transform: translateY(105%); opacity: 0; transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .6s ease; transition-delay: calc(var(--i) * 45ms); }
.wsplit.in .w > span, .slide.active .wsplit .w > span { transform: none; opacity: 1; }
.wsplit .grad-text .w > span, .wsplit .w > span.grad-text { -webkit-text-fill-color: transparent; }

/* ---- animated gradient border ---- */
.glow-border { position: relative; }
.glow-border::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 60%, var(--cyan), var(--blue), var(--violet), transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotAng 5s linear infinite; opacity: .9; }

/* ---- warm accent / free badges ---- */
.free-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--grad-warm); padding: 6px 12px; border-radius: 999px; box-shadow: 0 8px 22px -8px rgba(225,6,30,.7); animation: freePulse 2.4s ease-in-out infinite; }
.free-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes freePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.btn-warm { background: var(--grad-warm); color: #fff; box-shadow: 0 10px 30px -10px rgba(225,6,30,.7); }
.btn-warm:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(225,6,30,.85); }
.text-warm { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---- academy ---- */
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.course { padding: 0; display: flex; flex-direction: column; }
.course .c-art { position: relative; aspect-ratio: 16/11; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, rgba(255,31,61,.14), transparent 65%), var(--bg-2); overflow: hidden; }
.course .c-art svg { width: 100%; height: 100%; }
.course .free-badge { position: absolute; top: 14px; left: 14px; z-index: 2; }
.course .c-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.course h3 { margin: 0 0 8px; font-size: 1.2rem; }
.course p { font-size: .92rem; }
.course .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
.chip { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.02); }
.course .btn { margin-top: auto; }
.course-detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; padding: 0; margin-bottom: 28px; scroll-margin-top: 90px; }
.course-detail .c-art { border-right: 1px solid var(--line); border-bottom: 0; aspect-ratio: auto; min-height: 100%; display: flex; align-items: center; }
.course-detail .c-body { padding: 36px; }
.course-detail h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 14px 0 10px; }
.modules { display: grid; gap: 10px; margin: 20px 0 24px; counter-reset: mod; }
.modules li { counter-increment: mod; display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--muted); font-size: .93rem;
  transition: border-color .25s, transform .25s, background .25s; }
.modules li:hover { border-color: var(--cyan); transform: translateX(4px); background: rgba(255,31,61,.05); }
.modules li::before { content: counter(mod, decimal-leading-zero); flex-shrink: 0; font-family: var(--mono); font-size: .75rem; font-weight: 700; color: var(--cyan); width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--grad-soft); border: 1px solid var(--line-strong); }
.modules li b { display: block; color: var(--text); font-family: var(--head); font-weight: 600; }
.learn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.learn-row span { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text); padding: 8px 12px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--line); }
.learn-row svg { width: 16px; height: 16px; color: var(--cyan); }
.academy-band { position: relative; border-radius: 32px; overflow: hidden; border: 1px solid var(--line-strong); padding: 56px 48px;
  background: radial-gradient(circle at 15% 15%, rgba(255,77,77,.18), transparent 40%), radial-gradient(circle at 85% 85%, rgba(255,31,61,.18), transparent 45%), var(--panel-solid); }
.big-free { font-family: var(--head); font-weight: 700; font-size: clamp(3.4rem, 9vw, 7rem); line-height: .9; letter-spacing: -.04em; }
.counter-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.counter-strip div { text-align: center; padding: 18px 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.counter-strip b { display: block; font-family: var(--head); font-size: 1.7rem; }
.counter-strip span { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
#codeRain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; pointer-events: none; }

/* ---- login ---- */
.auth { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; padding-top: var(--nav-h); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 60px 56px; border-right: 1px solid var(--line);
  background: radial-gradient(circle at 30% 30%, rgba(255,31,61,.16), transparent 50%), radial-gradient(circle at 80% 80%, rgba(157,2,8,.2), transparent 50%), var(--bg-2); }
.auth-art svg.scan { width: min(360px, 80%); margin: 0 auto 30px; }
.auth-art h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 12px; }
.auth-art ul { display: grid; gap: 10px; margin-top: 20px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.auth-art li svg { width: 20px; height: 20px; color: var(--cyan); flex-shrink: 0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 50px 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px 32px; border-radius: 26px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin: 22px 0 24px; position: relative; }
.seg button { position: relative; z-index: 1; padding: 10px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--muted); transition: color .25s; }
.seg button.active { color: #fff; }
.seg i { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 10px; background: var(--grad); transition: transform .35s cubic-bezier(.2,.8,.2,1); box-shadow: 0 6px 18px -6px rgba(255,31,61,.6); }
.seg.right i { transform: translateX(100%); }
.input-ic { position: relative; }
.input-ic > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--soft); pointer-events: none; transition: color .2s; }
.input-ic input { padding-left: 44px !important; }
.input-ic:focus-within > svg { color: var(--cyan); }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--soft); }
.pw-toggle:hover { color: var(--cyan); }
.pw-toggle svg { width: 18px; height: 18px; }
.form-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .86rem; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cyan); }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-family: var(--mono); font-size: .72rem; color: var(--soft); margin-top: 18px; }
.secure-note svg { width: 14px; height: 14px; color: var(--green); }

/* ---- bottom tab bar (app style) ---- */
.tabbar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 1600; height: var(--tab-h); display: none;
  align-items: center; justify-content: space-around; padding: 0 6px; border-radius: 24px; border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--panel-solid) 86%, transparent); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.55); transition: transform .35s ease; }
.tabbar.hide { transform: translateY(140%); }
.tab { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--soft); font-size: .66rem; font-weight: 600; letter-spacing: .02em; -webkit-tap-highlight-color: transparent; }
.tab svg { width: 22px; height: 22px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.tab.active { color: var(--text); }
.tab.active svg { transform: translateY(-2px) scale(1.08); color: var(--cyan); }
.tab.active::before { content: ""; position: absolute; top: 7px; width: 34px; height: 30px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--line-strong); z-index: -1; animation: tabPop .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes tabPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.tab:active svg { transform: scale(.88); }
.tab-fab { flex: 0 0 auto; width: 62px; }
.tab-fab span.fab { width: 56px; height: 56px; margin-top: -30px; border-radius: 20px; background: var(--grad-warm); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px -8px rgba(225,6,30,.75), 0 0 0 5px var(--bg); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.tab-fab span.fab svg { width: 26px; height: 26px; color: #fff !important; }
.tab-fab.active span.fab { transform: translateY(-3px) rotate(-6deg); }
.tab-fab.active::before { display: none; }
.tab-fab small { margin-top: 3px; }

/* ---- bottom sheet ---- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 1700; background: rgba(2,6,10,.55); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1710; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 18px calc(24px + var(--safe-b)); border-radius: 28px 28px 0 0; background: var(--panel-solid); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -20px 60px rgba(0,0,0,.5); transform: translateY(105%); transition: transform .45s cubic-bezier(.2,.9,.2,1); }
body.sheet-open .sheet-backdrop { opacity: 1; visibility: visible; }
body.sheet-open .sheet { transform: translateY(var(--drag, 0px)); }
.sheet-handle { width: 44px; height: 5px; border-radius: 5px; background: var(--line-strong); margin: 4px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head .brand-name b { font-size: 1rem; }
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; margin-bottom: 18px; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text); font-size: .72rem; font-weight: 500; text-align: center; opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .35s, transform .45s cubic-bezier(.3,1.5,.5,1); }
body.sheet-open .app-icon { opacity: 1; transform: none; }
.app-icon i { width: 58px; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 10px 20px -10px rgba(0,0,0,.6); position: relative; overflow: hidden; }
.app-icon i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 50%); }
.app-icon i svg { width: 26px; height: 26px; position: relative; z-index: 1; }
.app-icon.current i { outline: 2px solid var(--cyan); outline-offset: 3px; }
.ai1 { background: linear-gradient(135deg,#ff4d5a,#d90429); } .ai2 { background: linear-gradient(135deg,#e10600,#8d0801); } .ai3 { background: linear-gradient(135deg,#2b2b2f,#0d0d0f); }
.ai4 { background: linear-gradient(135deg,#ff1f3d,#9d0208); } .ai5 { background: linear-gradient(135deg,#ff7b7b,#e5383b); } .ai6 { background: linear-gradient(135deg,#c1121f,#5c0a10); }
.ai7 { background: linear-gradient(135deg,#ff5a5f,#b5121b); } .ai8 { background: linear-gradient(135deg,#6b6b73,#35353b); } .ai9 { background: linear-gradient(135deg,#25d366,#128c7e); }
.sheet-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.sheet-quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); font-size: .74rem; color: var(--text); }
.sheet-quick svg { width: 20px; height: 20px; color: var(--cyan); }
.sheet-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 12px; font-weight: 500; }
.switch { position: relative; width: 52px; height: 30px; border-radius: 30px; background: var(--line-strong); transition: background .3s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
html:not(.light) .switch { background: var(--grad); } html:not(.light) .switch::after { transform: translateX(22px); }
.sheet .btn { width: 100%; }

/* ---- responsive (app mode) ---- */
@media (max-width: 1180px) {
  .nav-links a { padding: 8px 8px; font-size: .84rem; }
  .site-header .nav-actions .btn-login span.lbl { display: none; }
}
@media (max-width: 1024px) {
  .nav-links, .nav-actions .d-only { display: none !important; }
  .m-only { display: inline-flex !important; }
  .menu-btn { display: none !important; }
  .tabbar { display: flex; }
  body { padding-bottom: calc(var(--tab-h) + 20px + var(--safe-b)); }
  .wa-float { bottom: calc(var(--tab-h) + 24px + var(--safe-b)); }
  .to-top { bottom: calc(var(--tab-h) + 90px + var(--safe-b)); }
  .site-header { height: 62px; } .site-header.scrolled { height: 58px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .course-detail { grid-template-columns: 1fr; }
  .course-detail .c-art { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16/9; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { border-right: 0; border-bottom: 1px solid var(--line); padding: 40px 24px; text-align: center; }
  .auth-art ul { justify-items: center; }
  .auth-art svg.scan { width: 200px; margin-bottom: 18px; }
  .counter-strip { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding-bottom: 20px; }
}
@media (max-width: 680px) {
  .course-grid { grid-template-columns: 1fr; }
  .course-detail .c-body { padding: 24px 20px; }
  .academy-band { padding: 36px 20px; border-radius: 24px; }
  .auth-card { padding: 28px 20px; }
  .sheet-grid { gap: 14px 4px; }
  .app-icon i { width: 54px; height: 54px; border-radius: 16px; }
  .hero h1, .hero .h1 { font-size: clamp(2.1rem, 9.5vw, 2.8rem); }
  .section-head h2 { font-size: clamp(1.75rem, 7.5vw, 2.3rem); }
  .page-hero { padding: calc(62px + 36px) 0 50px; }
  .page-hero h1 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
  .btn { padding: 13px 20px; }
}
@media (max-width: 360px) { .tab { font-size: .6rem; } .tab svg { width: 20px; height: 20px; } .sheet-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1025px) { .tabbar, .sheet, .sheet-backdrop { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .wsplit .w > span { transform: none !important; opacity: 1 !important; } body { animation: none; } }
/* never allow sideways scroll on phones (keeps app tab bar pinned) */
html, body { overflow-x: clip; }
@media (max-width: 1024px) { .reveal.from-left, .reveal.from-right { transform: translateY(30px); } .reveal.in.from-left, .reveal.in.from-right { transform: none; } }
.course-detail .tag { position: static; }
.sheet { visibility: hidden; transition: transform .45s cubic-bezier(.2,.9,.2,1), visibility 0s linear .45s; }
body.sheet-open .sheet { visibility: visible; transition: transform .45s cubic-bezier(.2,.9,.2,1), visibility 0s; }
.tabbar { left: max(10px, calc(50% - 280px)); right: max(10px, calc(50% - 280px)); }

/* =========================================================
   v4 — extra motion layer (red & white)
   ========================================================= */
/* living gradients */
.grad-text, .wsplit .w > span.grad-text { background-size: 220% auto; animation: gradMove 6s linear infinite; }
.btn-primary, .btn-warm, .free-badge, .tab-fab span.fab { background-size: 200% 200%; animation: gradShift 5s ease infinite; }
.free-badge { animation: gradShift 5s ease infinite, freePulse 2.4s ease-in-out infinite; }
@keyframes gradMove { to { background-position: 220% center; } }
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* rising particles */
.particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.particles i { position: absolute; bottom: -20px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: var(--cyan); opacity: 0;
  box-shadow: 0 0 10px var(--cyan); animation: rise var(--d) linear infinite; animation-delay: var(--dl); }
.particles i:nth-child(3n) { background: transparent; border: 1.5px solid var(--cyan); box-shadow: none; }
.particles i:nth-child(4n) { border-radius: 2px; transform: rotate(45deg); }
@keyframes rise { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .55; } 90% { opacity: .35; } 100% { transform: translateY(-105vh) rotate(260deg); opacity: 0; } }
html.light .particles i { opacity: 0; } html.light .particles i { animation-name: riseLight; }
@keyframes riseLight { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .35; } 90% { opacity: .2; } 100% { transform: translateY(-105vh) rotate(260deg); opacity: 0; } }

/* custom cursor ring (desktop) */
.cursor-ring { position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--cyan); pointer-events: none; z-index: 7000;
  transition: width .25s, height .25s, margin .25s, background .25s, opacity .3s; opacity: 0; mix-blend-mode: normal; }
.cursor-dot { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--cyan); pointer-events: none; z-index: 7001; opacity: 0; }
body.has-cursor .cursor-ring, body.has-cursor .cursor-dot { opacity: 1; }
.cursor-ring.hover { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(255,31,61,.12); }

/* click ripple */
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); pointer-events: none; animation: rippleOut .65s ease-out forwards; }
@keyframes rippleOut { to { transform: scale(4); opacity: 0; } }

/* hero scan beam + rotating badge */
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 160px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,31,61,.10) 85%, rgba(255,31,61,.55) 99%, transparent); animation: heroScan 7s ease-in-out infinite; }
@keyframes heroScan { 0% { transform: translateY(-170px); } 60%,100% { transform: translateY(110vh); } }
.spin-badge { position: absolute; right: 3%; bottom: 9%; width: 130px; height: 130px; z-index: 3; pointer-events: none; }
.spin-badge .ring-text { transform-origin: 50% 50%; animation: spin 14s linear infinite; }
.spin-badge text { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2.6px; fill: var(--text); font-weight: 700; }

/* heading underline draw */
.section-head h2 { position: relative; padding-bottom: 14px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 90px; height: 4px; border-radius: 4px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.2,.8,.2,1) .3s; }
.section-head.center h2::after { left: calc(50% - 45px); transform-origin: center; }
.section-head.in h2::after { transform: scaleX(1); }

/* 3D card entrance + shine sweep */
.card.reveal { transform: perspective(1000px) rotateX(14deg) translateY(40px); transform-origin: top center; }
.card.reveal.in { transform: none; }
.card { background-image: linear-gradient(110deg, transparent 42%, rgba(255,255,255,.07) 50%, transparent 58%); background-size: 260% 100%; background-position: 130% 0; background-repeat: no-repeat; }
html.light .card { background-image: linear-gradient(110deg, transparent 42%, rgba(217,4,41,.06) 50%, transparent 58%); }
.card:hover { animation: cardShine 1.2s ease; }
@keyframes cardShine { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* reverse marquee row */
.marquee.rev .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee.rev { border-top: 0; }
.marquee.rev .marquee-track span::before { content: "✦"; }

/* stat icon pulse + logo heartbeat */
.stat svg { animation: pulseScale 2.4s ease-in-out infinite; }
.brand-mark { filter: drop-shadow(0 0 6px rgba(255,31,61,.5)); animation: heartbeat 2.8s ease-in-out infinite; }
@keyframes heartbeat { 0%,100% { transform: scale(1); } 10% { transform: scale(1.08); } 20% { transform: scale(1); } 30% { transform: scale(1.05); } 40% { transform: scale(1); } }

/* nav link hover bar */
.nav-links a::before { content: ""; position: absolute; left: 50%; bottom: 2px; width: 0; height: 2px; background: var(--grad); border-radius: 2px; transition: width .3s, left .3s; }
.nav-links a:hover::before { width: calc(100% - 26px); left: 13px; }

/* eyebrow typing caret + section blobs drift */
.eyebrow::after { content: "_"; color: var(--cyan); animation: blink 1s steps(1) infinite; margin-left: -4px; }

/* light-mode polish for white theme */
html.light .site-header.scrolled { box-shadow: 0 8px 30px -18px rgba(157,2,8,.35); }
html.light .hero { background: radial-gradient(ellipse at 80% 20%, rgba(239,35,60,.10), transparent 55%), radial-gradient(ellipse at 10% 90%, rgba(157,2,8,.07), transparent 50%); }
html.light body::before { opacity: .45; }
html.light .card { box-shadow: 0 10px 30px -22px rgba(157,2,8,.35); }
html.light .soc, html.light .term { background: #1a0a0d; color: #e7c9cc; }
html.light .soc { --text: #fff4f5; --soft: #b79195; --line: rgba(255,45,70,.2); }
html.light .tabbar { box-shadow: 0 18px 40px -16px rgba(157,2,8,.35); }

@media (max-width: 1024px) { .spin-badge { display: none; } .cursor-ring, .cursor-dot { display: none; } }
@media (prefers-reduced-motion: reduce) { .particles, .cursor-ring, .cursor-dot, .hero::after { display: none !important; } }
html.light .hero::after { opacity: .45; }
