:root {
  --navy-900: #060a1c;
  --navy-800: #0b1130;
  --gold-400: #ffb020;
  --cyan-300: #5fe4ff;
  --paper: #eef1f8;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 56px);
  overflow-x: hidden;
  background: var(--navy-900);
  color: var(--paper);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, #1d2a63 0%, var(--navy-800) 55%, var(--navy-900) 100%);
}

.bg__image {
  position: absolute;
  inset: -10%;
  background-image: url("assets/naras-bg.png");
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(125%) brightness(.95);
  transform: scale(1.06);
  animation: breathe 26s ease-in-out infinite;
  will-change: transform;
}

@keyframes breathe {
  0%, 100% { transform: scale(1.06); }
  50%      { transform: scale(1.15); }
}

.bg__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 110% at 50% 45%,
      rgba(6, 10, 28, .34) 0%,
      rgba(6, 10, 28, .64) 55%,
      rgba(4, 7, 20, .9) 100%),
    linear-gradient(180deg, rgba(8, 12, 32, .38), rgba(8, 12, 32, .58));
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .8;
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .9s ease;
  background: radial-gradient(circle var(--r, 420px) at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, .16) 0%,
    rgba(120, 190, 255, .11) 28%,
    rgba(255, 176, 32, .07) 52%,
    rgba(255, 176, 32, 0) 72%);
}

.spotlight.is-on { opacity: 1; }

.hero {
  position: relative;
  z-index: 3;
  text-align: center;
}

.code {
  position: relative;
  display: block;
  line-height: .9;
}

.glitch {
  position: relative;
  margin: 0;
  font-size: clamp(120px, 30vw, 260px);
  font-weight: 800;
  letter-spacing: .06em;
  line-height: .92;
  background-image: linear-gradient(100deg,
    #ffffff 0%, #ffffff 38%, #ffe6ad 50%, #ffffff 62%, #ffffff 100%);
  background-size: 260% 100%;
  background-position: 130% 0;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 42px rgba(120, 180, 255, .38));
  animation: sheen 5.2s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes sheen {
  0%, 55%   { background-position: 130% 0; }
  85%, 100% { background-position: -30% 0; }
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-text-fill-color: currentColor;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan-300);
  animation: glitch-a 3.8s steps(1, end) infinite;
}

.glitch::after {
  color: var(--gold-400);
  animation: glitch-b 3.1s steps(1, end) infinite;
}

@keyframes glitch-a {
  0%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  8%       { opacity: 1; transform: translate(-9px, -3px); clip-path: inset(14% 0 76% 0); }
  9.5%     { opacity: 1; transform: translate(7px, 2px);   clip-path: inset(34% 0 58% 0); }
  11%      { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  42%      { opacity: 1; transform: translate(10px, 1px);  clip-path: inset(56% 0 38% 0); }
  43.5%    { opacity: 1; transform: translate(-6px, -2px); clip-path: inset(22% 0 70% 0); }
  45%      { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  70%      { opacity: 1; transform: translate(-8px, 2px);  clip-path: inset(70% 0 22% 0); }
  71.5%    { opacity: 1; transform: translate(5px, -3px);  clip-path: inset(8% 0 84% 0); }
  73%      { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
}

@keyframes glitch-b {
  0%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  24%      { opacity: 1; transform: translate(8px, 2px);   clip-path: inset(48% 0 46% 0); }
  25.5%    { opacity: 1; transform: translate(-7px, -1px); clip-path: inset(64% 0 30% 0); }
  27%      { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  59%      { opacity: 1; transform: translate(-10px, -2px); clip-path: inset(28% 0 66% 0); }
  60.5%    { opacity: 1; transform: translate(6px, 3px);    clip-path: inset(80% 0 12% 0); }
  62%      { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  88%      { opacity: 1; transform: translate(9px, -1px);  clip-path: inset(40% 0 54% 0); }
  89.5%    { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
}

.scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(180deg,
    rgba(160, 210, 255, 0), rgba(160, 210, 255, .2), rgba(255, 230, 173, .12), rgba(160, 210, 255, 0));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  animation: scan 5s linear infinite;
}

@keyframes scan {
  0%   { transform: translateY(-140%); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(460%); opacity: 0; }
}

.sub {
  margin: clamp(14px, 2.6vw, 24px) 0 0;
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 500;
  letter-spacing: .22em;
  color: rgba(238, 241, 248, .62);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: clamp(28px, 5vw, 52px) 0 0;
  padding: 9px 20px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: rgba(238, 241, 248, .78);
  font-size: clamp(12px, 1.4vw, 13px);
  letter-spacing: .08em;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color .25s ease, border-color .25s ease, background .25s ease,
              transform .25s ease, box-shadow .25s ease;
}

.more i {
  font-style: normal;
  transition: transform .25s ease;
}

.more:hover,
.more:focus-visible {
  color: #fff;
  border-color: rgba(255, 176, 32, .55);
  background: rgba(255, 176, 32, .1);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255, 176, 32, .18);
}

.more:hover i { transform: translate(2px, -2px); }

.more:focus-visible {
  outline: 2px solid var(--cyan-300);
  outline-offset: 3px;
}

.more__domain {
  margin: 10px 0 0;
  font-family: ui-monospace, Consolas, "Cascadia Mono", monospace;
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(238, 241, 248, .3);
}

@media (max-width: 560px) {
  .spotlight { --r: 260px; }
  .bg__image { filter: blur(30px) saturate(110%) brightness(.9); }
}


@media (prefers-reduced-motion: reduce) {
  .bg__image,
  .glitch {
    animation: none !important;
  }
  .glitch::before,
  .glitch::after,
  .scan,
  #particles {
    display: none;
  }
}
