:root {
  --bg: #05080d;
  --bg-2: #0a0f17;
  --panel: #0c1320;
  --line: rgba(120, 200, 255, 0.10);
  --line-strong: rgba(120, 200, 255, 0.22);
  --text: #e7eef7;
  --muted: #93a4ba;
  --brand: #1ea7ff;
  --brand-2: #00d4ff;
  --brand-deep: #0a78c2;
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Background decoration */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(to right, rgba(30, 167, 255, 0.06) 1px, transparent 1px) 0 0/56px 56px,
    linear-gradient(to bottom, rgba(30, 167, 255, 0.06) 1px, transparent 1px) 0 0/56px 56px,
    radial-gradient(ellipse at top, #0a1422 0%, #05080d 60%);
  mask-image: radial-gradient(ellipse at center top, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: -1;
  width: 720px; height: 720px;
  top: -260px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  backdrop-filter: blur(12px);
  background: rgba(5, 8, 13, 0.6);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.2px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.brand b { color: var(--brand-2); font-weight: 700; }
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a { color: var(--muted); font-size: 14px; transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.cta-mini {
  border: 1px solid var(--line-strong);
  padding: 8px 14px; border-radius: 999px; color: var(--text) !important;
}
.cta-mini:hover { background: rgba(30, 167, 255, 0.08); }

/* Layout helpers */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 110px 0; }
.section.alt { background:
  linear-gradient(180deg, transparent, rgba(10, 20, 34, 0.5), transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2, .intro h2 { font-size: clamp(28px, 4vw, 42px); margin: 8px 0 0; letter-spacing: -0.02em; }
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--brand-2); letter-spacing: 0.14em; text-transform: lowercase;
}
.grad {
  background: linear-gradient(90deg, #00d4ff, #1ea7ff 50%, #7ad6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* HERO */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 64px; align-items: center;
  padding: 110px 0 90px;
}
.hero-text h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05; margin: 18px 0 22px;
  letter-spacing: -0.03em;
}
.hero-text p { color: var(--muted); max-width: 560px; font-size: 17px; }
.cta-row { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px;
  font-weight: 500; font-size: 15px; transition: transform .15s ease, background .2s, border-color .2s;
}
.btn.primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #001a2c; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.25);
}
.btn.primary:hover { transform: translateY(-1px); }
.btn.ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn.ghost:hover { background: rgba(30, 167, 255, 0.08); border-color: var(--brand); }
.btn.big { padding: 16px 28px; font-size: 16px; }

.hero-logo {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1/1; max-width: 440px; margin-left: auto;
}
.hero-logo img {
  width: 100%; border-radius: 28px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 212, 255, 0.15);
}
.hero-logo .ring {
  position: absolute; inset: -6%;
  border-radius: 50%;
  background: conic-gradient(from 90deg, transparent, rgba(0, 212, 255, 0.5), transparent 30%);
  filter: blur(28px); opacity: .55;
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* INTRO */
.intro {
  max-width: 880px; margin: 0 auto;
  text-align: center; padding: 40px 0 20px;
}
.intro p { color: var(--muted); margin-top: 18px; font-size: 17px; }

/* CARD GRID */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card, .row {
  background: linear-gradient(180deg, rgba(12, 19, 32, 0.9), rgba(8, 13, 22, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .25s, transform .25s, background .25s;
}
.card:hover, .row:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.card .ico {
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--brand-2);
  font-size: 18px; font-weight: 700;
  margin-bottom: 16px;
}
.card h3, .row h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.card p, .row p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ABOUT */
.about { max-width: 920px; margin: 0 auto; }
.about > p { color: var(--muted); font-size: 16.5px; }
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 36px 0; }
.mv-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(12, 19, 32, 0.6);
}
.mv-card h4 { margin: 0 0 8px; color: var(--brand-2); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.mv-card p { margin: 0; color: var(--text); }

.values-title { text-align: center; margin: 50px 0 20px; font-size: 22px; }
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.values > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: rgba(12, 19, 32, 0.5);
}
.values b { display: block; font-size: 14px; margin-bottom: 6px; }
.values span { color: var(--muted); font-size: 13px; }

/* CONTACT */
.contact { padding-bottom: 140px; }
.contact-card {
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 64px 28px;
  background:
    radial-gradient(circle at top, rgba(0, 212, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(12, 19, 32, 0.9), rgba(8, 13, 22, 0.9));
}
.contact-card h2 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 14px; letter-spacing: -0.02em; }
.contact-card p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

/* FOOTER */
footer { border-top: 1px solid var(--line); }
.foot {
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.foot-brand img { width: 26px; height: 26px; border-radius: 6px; }
.foot small { color: var(--muted); font-size: 13px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav { padding: 12px 18px; }
  .nav nav a:not(.cta-mini) { display: none; }
  main { padding: 0 18px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 60px 0; }
  .hero-logo { max-width: 280px; margin: 0 auto; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .mv { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .section { padding: 70px 0; }
  .foot { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .values { grid-template-columns: 1fr; }
}

/* ===========================
   CINEMATIC PRELOADER
   =========================== */
body.is-loading { overflow: hidden; }
body.is-loading .nav,
body.is-loading main,
body.is-loading footer { opacity: 0; }

#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at center, #07111c 0%, #03060a 70%);
  display: grid; place-items: center;
  overflow: hidden;
  transition: opacity .45s ease, transform .5s ease, filter .45s ease;
}
#preloader.done {
  opacity: 0;
  transform: scale(1.04);
  filter: blur(4px);
  pointer-events: none;
}

.pl-grid {
  position: absolute; inset: -10%;
  background:
    linear-gradient(to right, rgba(0,212,255,0.08) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(to bottom, rgba(0,212,255,0.08) 1px, transparent 1px) 0 0/48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
  animation: pl-grid-pan 14s linear infinite;
}
@keyframes pl-grid-pan {
  to { background-position: 480px 0, 0 480px; }
}

.pl-scan {
  position: absolute; left: 0; right: 0; height: 220px;
  background: linear-gradient(to bottom, transparent, rgba(0,212,255,0.12), transparent);
  filter: blur(2px);
  animation: pl-scan-move 3.6s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes pl-scan-move {
  0%   { top: -220px; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.pl-stage {
  position: relative;
  width: min(420px, 86vw);
  text-align: center;
  animation: pl-stage-in .9s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes pl-stage-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pl-logo-wrap {
  position: relative;
  width: 260px; height: 260px;
  margin: 0 auto;
}
.pl-logo {
  position: absolute; inset: 18%;
  display: grid; place-items: center;
  filter: drop-shadow(0 0 30px rgba(0,212,255,0.45));
  animation: pl-logo-pop 1s cubic-bezier(.2,.9,.2,1.1) both;
}
.pl-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  animation: pl-logo-glow 2.4s ease-in-out infinite alternate;
}
@keyframes pl-logo-pop {
  from { transform: scale(.6); opacity: 0; filter: blur(8px); }
  to   { transform: scale(1);   opacity: 1; filter: blur(0); }
}
@keyframes pl-logo-glow {
  from { filter: brightness(1) saturate(1); }
  to   { filter: brightness(1.25) saturate(1.2); }
}

.pl-pulse {
  position: absolute; inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.45);
  animation: pl-pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes pl-pulse {
  0%   { transform: scale(1);    opacity: .9; }
  100% { transform: scale(1.9);  opacity: 0; }
}

.pl-ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  fill: none;
  stroke: url(#noop); /* fallback if not supported */
}
.pl-ring circle {
  fill: none;
  stroke-linecap: round;
}
.pl-ring.r1 circle {
  stroke: rgba(0,212,255,0.85);
  stroke-width: 1.2;
  stroke-dasharray: 40 600;
  transform-origin: 50% 50%;
  animation: pl-spin 2.8s linear infinite;
  filter: drop-shadow(0 0 6px rgba(0,212,255,0.7));
}
.pl-ring.r2 circle {
  stroke: rgba(30,167,255,0.6);
  stroke-width: 1;
  stroke-dasharray: 6 14;
  transform-origin: 50% 50%;
  animation: pl-spin 5s linear infinite reverse;
}
.pl-ring.r3 circle {
  stroke: rgba(122,214,255,0.4);
  stroke-width: 0.8;
  stroke-dasharray: 80 380;
  transform-origin: 50% 50%;
  animation: pl-spin 4s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }

.pl-title {
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: 0.18em;
  margin-bottom: 8px;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.pl-title span {
  color: var(--text);
  position: relative;
  animation: pl-glitch 3.4s steps(1) infinite;
}
.pl-title span::before,
.pl-title span::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.pl-title span::before {
  color: #00d4ff; transform: translate(-2px, 0);
  animation: pl-glitch-a 3.4s steps(1) infinite;
}
.pl-title span::after {
  color: #ff3aa3; transform: translate(2px, 0);
  animation: pl-glitch-b 3.4s steps(1) infinite;
}
.pl-title i {
  font-style: normal;
  background: linear-gradient(90deg, #00d4ff, #1ea7ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes pl-glitch    { 0%,92%,100% { clip-path: inset(0 0 0 0); } 93% { clip-path: inset(20% 0 60% 0); } 95% { clip-path: inset(70% 0 10% 0); } 97% { clip-path: inset(40% 0 40% 0); } }
@keyframes pl-glitch-a  { 0%,92%,100% { transform: translate(0,0); opacity: 0; } 93% { transform: translate(-3px,0); opacity:.9; } 95% { transform: translate(2px,1px); opacity:.7; } 97% { transform: translate(-1px,0); opacity:.8; } }
@keyframes pl-glitch-b  { 0%,92%,100% { transform: translate(0,0); opacity: 0; } 93% { transform: translate(2px,-1px); opacity:.7; } 95% { transform: translate(-2px,0); opacity:.6; } 97% { transform: translate(1px,1px); opacity:.7; } }

.pl-sub {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--brand-2);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  opacity: .85;
  margin-bottom: 22px;
}

.pl-bar {
  height: 2px;
  width: 100%;
  background: rgba(0,212,255,0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.pl-bar-fill {
  position: absolute; inset: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, #00d4ff, #1ea7ff, transparent);
  animation: pl-bar 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(0,212,255,0.6));
}
@keyframes pl-bar {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

.pl-status {
  display: flex; justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-top: 10px;
  text-transform: lowercase;
}
.pl-status #pl-pct { color: var(--brand-2); }

/* Page reveal after preloader */
body.is-ready .nav,
body.is-ready main,
body.is-ready footer {
  opacity: 1;
  transition: opacity .8s ease;
}
body.is-ready .hero-text > * { animation: hero-in .9s cubic-bezier(.2,.8,.2,1) both; }
body.is-ready .hero-text .eyebrow   { animation-delay: .05s; }
body.is-ready .hero-text h1         { animation-delay: .15s; }
body.is-ready .hero-text p          { animation-delay: .30s; }
body.is-ready .hero-text .cta-row   { animation-delay: .45s; }
body.is-ready .hero-logo            { animation: hero-logo-in 1.1s cubic-bezier(.2,.8,.2,1) .15s both; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes hero-logo-in {
  from { opacity: 0; transform: scale(.85) rotate(-2deg); filter: blur(10px); }
  to   { opacity: 1; transform: scale(1) rotate(0);       filter: blur(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.grid .card.reveal,
.grid .row.reveal,
.mv .mv-card.reveal { transition-delay: 0s; }
.grid .card.reveal:nth-child(2),
.grid .row.reveal:nth-child(2) { transition-delay: .08s; }
.grid .card.reveal:nth-child(3),
.grid .row.reveal:nth-child(3) { transition-delay: .16s; }
.grid .card.reveal:nth-child(4),
.grid .row.reveal:nth-child(4) { transition-delay: .24s; }
.grid .card.reveal:nth-child(5) { transition-delay: .32s; }
.grid .card.reveal:nth-child(6) { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  #preloader, .pl-grid, .pl-scan, .pl-ring circle, .pl-pulse,
  .pl-bar-fill, .pl-title span, .pl-title span::before, .pl-title span::after,
  .pl-logo img { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body.is-ready .hero-text > *, body.is-ready .hero-logo { animation: none !important; }
}

/* Smooth scroll & motion */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  .hero-logo .ring { animation: none; }
  html { scroll-behavior: auto; }
}
