:root {
  --bg: #02030c;
  --panel: rgba(8, 15, 42, 0.78);
  --panel-2: rgba(13, 23, 58, 0.92);
  --ink: #f7fbff;
  --muted: #9caed2;
  --cyan: #3bd5ff;
  --violet: #785cff;
  --pink: #ef5cff;
  --line: rgba(102, 218, 255, 0.2);
  --glass: rgba(255, 255, 255, 0.065);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --admin-glow: 0.32;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(120, 92, 255, 0.24), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(59, 213, 255, 0.24), transparent 28%),
    linear-gradient(180deg, #02030c, #06102c 55%, #02030c);
  line-height: 1.6;
  animation: pageIn 600ms ease both;
}

body[data-bg-style="cyber"] {
  background:
    linear-gradient(135deg, rgba(59, 213, 255, calc(var(--admin-glow) * 0.7)), transparent 34%),
    linear-gradient(225deg, rgba(120, 92, 255, calc(var(--admin-glow) * 0.7)), transparent 36%),
    #02030c;
}

body[data-bg-style="deep"] {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.11), transparent 18%),
    radial-gradient(circle at 78% 32%, rgba(59, 213, 255, calc(var(--admin-glow) * 0.65)), transparent 28%),
    #01020a;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin-top: 0; }

.fx-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.fx-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(102, 218, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 218, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  animation: gridShift 18s linear infinite;
}

.fx-bg span {
  position: absolute;
  width: clamp(160px, 24vw, 420px);
  aspect-ratio: 1;
  border-radius: 42%;
  filter: blur(22px);
  opacity: var(--admin-glow);
  background: radial-gradient(circle, rgba(59, 213, 255, 0.75), rgba(59, 213, 255, 0.08) 56%, transparent 72%);
  animation: floatBlob 18s ease-in-out infinite;
}
.fx-bg span:nth-child(1) { left: 5%; top: 14%; }
.fx-bg span:nth-child(2) { right: 7%; top: 10%; background: radial-gradient(circle, rgba(120, 92, 255, 0.75), rgba(120, 92, 255, 0.08) 56%, transparent 72%); animation-delay: -6s; }
.fx-bg span:nth-child(3) { left: 22%; bottom: 8%; background: radial-gradient(circle, rgba(239, 92, 255, 0.6), rgba(239, 92, 255, 0.08) 56%, transparent 72%); animation-delay: -10s; }
.fx-bg span:nth-child(4) { right: 28%; bottom: 18%; animation-delay: -3s; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(16px, 5vw, 72px);
  background: rgba(2, 3, 12, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.admin-login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(59, 213, 255, 0.18), transparent 30%),
    rgba(2, 3, 12, 0.92);
  backdrop-filter: blur(14px);
}

.admin-login[hidden] {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-card img {
  width: 164px;
  border-radius: 8px;
}

.login-card h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.brand { width: 152px; min-width: 152px; display: inline-flex; }
.brand img { width: 100%; display: block; border-radius: 8px; box-shadow: 0 0 28px rgba(59,213,255,0.2); transition: transform 200ms ease; }
.brand:hover img { transform: scale(1.04); }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a {
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); background: var(--glass); border-color: var(--line); transform: translateY(-2px); }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink); }

.hero-os, .section, .page-top, .marquee, .cta-zone, .join-hub, .admin-studio {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero-os {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(32px, 6vw, 70px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: 70px 0 48px;
}

.hero-copy { animation: riseIn 720ms ease both; }
.eyebrow { margin: 0 0 12px; color: var(--cyan); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
h1 { max-width: 900px; margin-bottom: 20px; font-size: clamp(2.55rem, 7vw, 6.4rem); line-height: 0.92; letter-spacing: 0; }
h2 { margin-bottom: 16px; font-size: clamp(1.75rem, 4vw, 3.4rem); line-height: 1.02; letter-spacing: 0; }
h3 { line-height: 1.15; }
.hero-copy p:not(.eyebrow), .page-top p, .cta-zone p, .join-hub > div > p, .section-title + p { color: var(--muted); font-size: 1.06rem; max-width: 720px; }

.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.button.primary { color: #02030c; background: linear-gradient(135deg, #fff, var(--cyan)); box-shadow: 0 18px 42px rgba(59,213,255,0.24); }
.button.ghost { color: var(--ink); background: var(--glass); border-color: var(--line); }

.os-panel, .cta-zone, .request-form, .admin-rail, .admin-hero-new, .site-control {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.os-panel { position: relative; overflow: hidden; min-height: 560px; padding: 22px; animation: panelFloat 6s ease-in-out infinite; }
.os-panel::after, article::after, .site-control::after, .request-form::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-130%);
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
}
.panel-head { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-weight: 900; }
.panel-head strong { color: #85ffbd; }
.console-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.console-grid article { min-height: 118px; }
.signal-map { position: relative; height: 220px; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: radial-gradient(circle, rgba(59,213,255,0.18), transparent 58%); }
.signal-map span { position: absolute; inset: 50%; border: 1px solid rgba(59,213,255,0.28); border-radius: 50%; transform: translate(-50%, -50%); animation: ping 3.5s ease-out infinite; }
.signal-map span:nth-child(2) { animation-delay: 900ms; }
.signal-map span:nth-child(3) { animation-delay: 1800ms; }

.marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee div { display: flex; width: max-content; gap: 12px; animation: marquee 24s linear infinite; }
.marquee span { padding: 10px 14px; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 900; }

.section, .page-top, .join-hub, .admin-studio { padding: 82px 0; }
.page-top { padding-bottom: 34px; }
.section-title { max-width: 780px; margin-bottom: 26px; }

.tile-grid, .service-console, .package-grid, .faq-list, .talent-board, .data-row, .case-grid, .team-command, .department-flow, .check-grid, .metric-wall, .queue-board, .control-grid, .theme-controls {
  display: grid;
  gap: 16px;
}
.tile-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-console { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 82px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.package-grid, .team-command, .check-grid, .metric-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.faq-list, .data-row, .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.talent-board { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 82px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.talent-board .wide { grid-column: span 2; grid-row: span 2; }
.department-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }

article {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 54px rgba(0,0,0,0.22);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
article:hover { transform: translateY(-6px); border-color: rgba(120,230,255,0.5); box-shadow: 0 22px 70px rgba(59,213,255,0.12); }
article span, .service-console article > span { color: var(--cyan); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
article p, article small, article li, .data-row span { color: var(--muted); }
article strong { display: block; color: var(--ink); font-size: 1.12rem; }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: start; }
.step-stack { display: grid; gap: 14px; }
.step-stack article { display: grid; grid-template-columns: 60px 1fr; align-items: center; min-height: 92px; }

.cta-zone { overflow: hidden; margin-bottom: 82px; padding: clamp(30px, 6vw, 58px); }
.join-hub { display: grid; grid-template-columns: 0.86fr 1.14fr; gap: 42px; align-items: start; min-height: calc(100vh - 74px); }
.invite-card { margin-top: 28px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.invite-card span, .invite-card small { display: block; color: var(--muted); font-weight: 800; }
.invite-card strong { display: block; margin: 8px 0; font-size: clamp(1.3rem, 3vw, 2rem); }
.request-form { position: relative; overflow: hidden; display: grid; gap: 16px; padding: 24px; }

.avatar { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #02030c; font-weight: 900; font-size: 1.2rem; animation: glowPulse 3s ease-in-out infinite; }

.admin-studio { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
.admin-rail { position: sticky; top: 94px; align-self: start; display: grid; gap: 10px; padding: 22px; }
.admin-rail h1 { font-size: 2.1rem; line-height: 1; }
.admin-rail a { padding: 12px; background: var(--glass); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-weight: 900; }
.admin-workspace { display: grid; gap: 18px; }
.admin-hero-new { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 24px; }
.admin-hero-new h2 { margin-bottom: 0; }
.metric-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.queue-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.site-control { position: relative; overflow: hidden; padding: 24px; }
.control-heading { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.control-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.theme-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme-controls h3, .theme-controls .form-status { grid-column: 1 / -1; }

label { display: grid; gap: 7px; color: var(--ink); font-weight: 900; }
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  background: rgba(6, 12, 34, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(59,213,255,0.13); transform: translateY(-2px); }
textarea { resize: vertical; }
.form-status { min-height: 24px; margin: 0; color: var(--cyan); font-weight: 900; }

.footer { display: flex; justify-content: space-between; gap: 18px; padding: 28px clamp(16px, 5vw, 72px); color: var(--muted); border-top: 1px solid var(--line); }
.footer div { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink); font-weight: 900; }

.reveal, .animated-cards > * { opacity: 0; transform: translateY(24px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity 720ms ease, transform 720ms ease; }
.animated-cards.visible > *, .visible .animated-cards > *, .reveal.visible.animated-cards > * { animation: cardIn 680ms ease both; }
.animated-cards.visible > *:nth-child(2), .visible .animated-cards > *:nth-child(2), .reveal.visible.animated-cards > *:nth-child(2) { animation-delay: 90ms; }
.animated-cards.visible > *:nth-child(3), .visible .animated-cards > *:nth-child(3), .reveal.visible.animated-cards > *:nth-child(3) { animation-delay: 180ms; }
.animated-cards.visible > *:nth-child(4), .visible .animated-cards > *:nth-child(4), .reveal.visible.animated-cards > *:nth-child(4) { animation-delay: 270ms; }
.animated-cards.visible > *:nth-child(5), .visible .animated-cards > *:nth-child(5), .reveal.visible.animated-cards > *:nth-child(5) { animation-delay: 360ms; }
.animated-cards.visible > *:nth-child(6), .visible .animated-cards > *:nth-child(6), .reveal.visible.animated-cards > *:nth-child(6) { animation-delay: 450ms; }

@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gridShift { to { background-position: 46px 46px; } }
@keyframes floatBlob { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(36px,-34px,0) scale(1.12); } }
@keyframes panelFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ping { from { width: 80px; height: 80px; opacity: 0.8; } to { width: 420px; height: 420px; opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes sheen { 0%,55% { transform: translateX(-130%); } 82%,100% { transform: translateX(130%); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 20px rgba(59,213,255,0.22); } 50% { box-shadow: 0 0 44px rgba(59,213,255,0.48); } }

@media (max-width: 1020px) {
  .hero-os, .split, .join-hub, .admin-studio { grid-template-columns: 1fr; }
  .service-console, .package-grid, .team-command, .check-grid, .metric-wall, .department-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .talent-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-rail { position: static; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(6, 12, 34, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .tile-grid.six, .service-console, .package-grid, .faq-list, .talent-board, .data-row, .case-grid, .team-command, .department-flow, .check-grid, .metric-wall, .queue-board, .control-grid, .theme-controls, .console-grid { grid-template-columns: 1fr; }
  .talent-board .wide { grid-column: auto; grid-row: auto; }
  .admin-hero-new, .control-heading, .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .brand { width: 126px; min-width: 126px; }
  .topbar { padding: 12px 16px; }
  .hero-os, .section, .page-top, .marquee, .cta-zone, .join-hub, .admin-studio, .service-console, .talent-board { width: min(100% - 28px, 1180px); }
  .os-panel { min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .reveal, .animated-cards > * { opacity: 1; transform: none; }
}
