:root {
  --bg: #050505;
  --surface: #0c0c0c;
  --text: #f7f7f5;
  --muted: #a0a09b;
  --faint: rgba(255, 255, 255, .08);
  --grid: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .28);
  --button-bg: #f7f7f5;
  --button-text: #090909;
  --shadow: rgba(255, 255, 255, .18);
  --particle: 255, 255, 255;
  --header-h: 116px;
}

html[data-theme="light"] {
  --bg: #f4f5f6;
  --surface: #ffffff;
  --text: #080808;
  --muted: #626266;
  --faint: rgba(0, 0, 0, .07);
  --grid: rgba(0, 0, 0, .055);
  --line: rgba(0, 0, 0, .34);
  --button-bg: #080808;
  --button-text: #ffffff;
  --shadow: rgba(0, 0, 0, .23);
  --particle: 8, 8, 8;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, Tahoma, sans-serif;
  transition: background-color .7s cubic-bezier(.2,.75,.2,1), color .7s cubic-bezier(.2,.75,.2,1);
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.particles { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.noise {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.page-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: clamp(120px, 10.4vw, 200px) clamp(120px, 10.4vw, 200px);
  transition: background-image .7s ease;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 73% 38%, rgba(255,255,255,.085), transparent 33%),
    linear-gradient(180deg, transparent 62%, var(--faint));
  pointer-events: none;
}
html[data-theme="light"] .page-shell::before {
  background:
    radial-gradient(circle at 73% 38%, rgba(255,255,255,.92), transparent 35%),
    linear-gradient(180deg, transparent 62%, rgba(0,0,0,.045));
}

.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 22px clamp(28px, 5vw, 92px) 0;
}
.brand { position: relative; z-index: 4; width: 128px; height: 92px; display: block; }
.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
  filter: invert(1) grayscale(1) contrast(1.04);
  transition: filter .7s ease, transform .4s ease;
}
html[data-theme="light"] .brand img { filter: grayscale(1) contrast(1.06); }
.brand:hover img { transform: translateY(-3px); }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.3vw, 38px); }
.nav-link {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .24em;
  cursor: pointer;
  opacity: .72;
  transition: opacity .25s ease, color .7s ease;
}
.nav-link:hover, .nav-link:focus-visible { opacity: 1; }
.nav-separator { width: 1px; height: 16px; background: var(--line); }
.theme-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .7s ease;
}
.theme-icon { position: absolute; top: 50%; transform: translateY(-55%); font-size: 15px; transition: opacity .35s ease, transform .35s ease; }
.theme-icon-dark { left: 8px; }
.theme-icon-light { right: 8px; opacity: .32; }
html[data-theme="light"] .theme-icon-dark { opacity: .25; }
html[data-theme="light"] .theme-icon-light { opacity: 1; transform: translateY(-55%) scale(1.15); }

.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: clamp(38px, 6.5vh, 76px) clamp(28px, 5vw, 92px) 46px;
  display: grid;
  grid-template-columns: minmax(480px, .9fr) minmax(520px, 1.1fr);
  grid-template-rows: 1fr auto;
  gap: 26px 4vw;
  align-items: center;
}

.hero-copy { position: relative; z-index: 5; max-width: 710px; }
.studio-label {
  margin: 0 0 26px;
  color: var(--muted);
  font: 500 13px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .7em;
  transition: color .7s ease;
}
.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-family: Impact, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(58px, 5.3vw, 102px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-wrap: balance;
  transition: color .7s ease;
}
[dir="rtl"] .hero h1 { font-family: Tahoma, Arial, sans-serif; line-height: 1.22; letter-spacing: -.035em; }
.status-line {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text);
  font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .5em;
}
.status-rule { width: 54px; height: 1px; background: var(--text); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text); animation: statusPulse 1.5s ease-in-out infinite; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.button {
  position: relative;
  min-height: 58px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 800 14px/1 Impact, "Arial Black", Arial, sans-serif;
  letter-spacing: .04em;
  will-change: transform;
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .3s ease;
}
[dir="rtl"] .button { font-family: Tahoma, Arial, sans-serif; }
.button-primary { background: var(--button-bg); color: var(--button-text); border-color: var(--button-bg); box-shadow: 0 16px 42px rgba(0,0,0,.18); }
.button-secondary { background: transparent; color: var(--text); }
.button:hover { box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.button-arrow { font-family: Arial, sans-serif; font-size: 20px; }

.visual-stage {
  position: relative;
  z-index: 2;
  width: min(58vw, 950px);
  height: min(68vh, 760px);
  min-height: 520px;
  justify-self: end;
  perspective: 1400px;
}
.parallax-layer {
  --px: 0px;
  --py: 0px;
  --rx: 0deg;
  --ry: 0deg;
  position: absolute;
  inset: -5% -2%;
  transform-style: preserve-3d;
  transform: translate3d(var(--px), var(--py), 0) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .16s ease-out;
  will-change: transform;
}
.mark-float { position: absolute; inset: 0; display: grid; place-items: center; animation: markFloat 6.5s ease-in-out infinite; transform-style: preserve-3d; }
.cgi-mark {
  position: relative;
  z-index: 3;
  width: min(84%, 760px);
  height: auto;
  user-select: none;
  filter: drop-shadow(0 44px 34px rgba(0,0,0,.55)) drop-shadow(0 0 34px var(--shadow));
  transition: filter .7s ease;
}
html[data-theme="light"] .cgi-mark { filter: drop-shadow(0 42px 32px rgba(0,0,0,.22)) drop-shadow(0 0 25px rgba(255,255,255,.75)); }
.floor-glow {
  position: absolute;
  left: 13%;
  right: 4%;
  bottom: 6%;
  height: 17%;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--shadow), transparent 70%);
  filter: blur(16px);
  transform: scaleY(.34);
  animation: floorPulse 6.5s ease-in-out infinite;
}
.orbit {
  position: absolute;
  z-index: 4;
  left: 5%;
  top: 43%;
  width: 96%;
  height: 31%;
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 16px var(--shadow), 0 0 18px var(--shadow);
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color .7s ease, box-shadow .7s ease;
}
.orbit::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  top: 48%;
  left: -7px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 18px var(--text);
}
.orbit-one { animation: orbitOne 11s linear infinite; }
.orbit-two { width: 79%; height: 24%; left: 15%; top: 47%; opacity: .4; animation: orbitTwo 15s linear infinite reverse; }
.spark { position: absolute; z-index: 5; width: 7px; height: 7px; border-radius: 50%; background: var(--text); box-shadow: 0 0 18px var(--text); }
.spark-one { left: 17%; top: 61%; animation: sparkOne 4.8s ease-in-out infinite; }
.spark-two { right: 8%; top: 44%; animation: sparkTwo 5.7s ease-in-out infinite; }

.build-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding-top: 12px;
  color: var(--text);
  font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .2em;
}
.domain { transition: opacity .2s ease; }
.domain:hover { opacity: .55; }
.progress-track { position: relative; height: 4px; overflow: hidden; background: var(--faint); border-radius: 999px; }
.progress-value { position: absolute; inset: 0 auto 0 0; width: 74%; background: var(--text); border-radius: inherit; transition: background .7s ease; }
[dir="rtl"] .progress-value { inset: 0 0 0 auto; }
.progress-scan { position: absolute; inset: 0; width: 24%; background: linear-gradient(90deg, transparent, var(--text), transparent); opacity: .42; animation: scan 2.8s ease-in-out infinite; }
.progress-number { white-space: nowrap; }

.about-dialog {
  width: min(650px, calc(100vw - 36px));
  padding: clamp(34px, 5vw, 66px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  box-shadow: 0 34px 100px rgba(0,0,0,.45);
  backdrop-filter: blur(22px);
}
.about-dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text); font-size: 24px; cursor: pointer; }
[dir="rtl"] .dialog-close { right: auto; left: 18px; }
.dialog-index { color: var(--muted); font: 12px/1 ui-monospace, monospace; letter-spacing: .25em; }
.about-dialog h2 { margin: 24px 0; font-family: Impact, "Arial Black", Arial, sans-serif; font-size: clamp(38px, 5vw, 68px); line-height: .95; letter-spacing: -.035em; }
[dir="rtl"] .about-dialog h2 { font-family: Tahoma, Arial, sans-serif; line-height: 1.3; }
.about-dialog > p:not(.dialog-index) { color: var(--muted); font-size: 17px; line-height: 1.8; }
.dialog-email { display: inline-block; margin-top: 20px; padding-bottom: 5px; border-bottom: 1px solid currentColor; font: 12px/1.4 ui-monospace, monospace; letter-spacing: .08em; }

@keyframes markFloat { 0%,100% { transform: translate3d(0, -3px, 35px) rotateZ(-.6deg); } 50% { transform: translate3d(0, 15px, 55px) rotateZ(.8deg); } }
@keyframes floorPulse { 0%,100% { opacity: .45; transform: scale(1) scaleY(.34); } 50% { opacity: .72; transform: scale(1.08) scaleY(.38); } }
@keyframes orbitOne { from { transform: rotateX(68deg) rotateY(-7deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateY(-7deg) rotateZ(360deg); } }
@keyframes orbitTwo { from { transform: rotateX(73deg) rotateY(8deg) rotateZ(0deg); } to { transform: rotateX(73deg) rotateY(8deg) rotateZ(360deg); } }
@keyframes sparkOne { 0%,100% { transform: translate(0,0) scale(.65); opacity: .25; } 50% { transform: translate(36vw,-11vh) scale(1.2); opacity: 1; } }
@keyframes sparkTwo { 0%,100% { transform: translate(0,0) scale(1); opacity: 1; } 50% { transform: translate(-33vw,14vh) scale(.5); opacity: .18; } }
@keyframes statusPulse { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.3); } }
@keyframes scan { 0% { transform: translateX(-120%); } 65%,100% { transform: translateX(520%); } }

@media (max-width: 1060px) {
  :root { --header-h: 92px; }
  .site-header { padding-top: 14px; }
  .brand { width: 96px; height: 70px; }
  .hero { grid-template-columns: 1fr 1fr; padding-top: 26px; }
  .hero h1 { font-size: clamp(52px, 6.9vw, 76px); }
  .visual-stage { width: 54vw; min-height: 460px; }
}

@media (max-width: 760px) {
  :root { --header-h: 78px; }
  .site-header { padding: 9px 18px 0; }
  .brand { width: 76px; height: 58px; }
  .site-nav { gap: 14px; }
  .site-nav .nav-link:not(.language-toggle), .nav-separator { display: none; }
  .nav-link { font-size: 10px; }
  .hero {
    min-height: calc(100svh - var(--header-h));
    padding: 28px 20px 26px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(310px, 44vh) auto;
    gap: 10px;
    align-items: start;
  }
  .hero-copy { z-index: 5; }
  .studio-label { margin-bottom: 16px; font-size: 10px; letter-spacing: .52em; }
  .hero h1 { max-width: 640px; font-size: clamp(44px, 12.4vw, 64px); line-height: .93; }
  .status-line { margin-top: 18px; }
  .hero-actions { margin-top: 22px; gap: 9px; }
  .button { min-height: 48px; padding: 0 16px; gap: 12px; font-size: 11px; }
  .visual-stage { grid-row: 2; width: 100%; height: 100%; min-height: 310px; justify-self: stretch; }
  .parallax-layer { inset: -8% -12%; }
  .cgi-mark { width: min(78%, 480px); }
  .orbit { left: 4%; width: 94%; top: 44%; }
  .build-progress { grid-row: 3; grid-column: 1; grid-template-columns: 1fr auto; gap: 12px; font-size: 9px; padding-top: 4px; }
  .progress-track { grid-column: 1 / -1; grid-row: 1; }
  .domain { grid-row: 2; }
  .progress-number { grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .parallax-layer { transition: none; }
}
