/* ── VARIABLES ── */
:root {
  --bg:      #080e12;
  --accent1: #728c99;
  --accent2: #a8bec9;
  --grid:    rgba(114, 140, 153, 0.08);
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Space Mono', monospace;
  color: #fff;
}

/* ── CANVAS BACKGROUND ── */
canvas#bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* ── GRID OVERLAY ── */
.grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-animation: gridShift 20s linear infinite;
          animation: gridShift 20s linear infinite;
  pointer-events: none;
}
@-webkit-keyframes gridShift {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}
@keyframes gridShift {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}

/* ── SCANLINES ── */
.scan {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  pointer-events: none;
}

/* ── FOG VIGNETTE ── */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(8, 14, 18, 0.88) 100%);
  pointer-events: none;
}

/* ── WAVES BACK (behind text, z4) ── */
.wave-back {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 4;
  height: 200px;
  overflow: hidden;
  pointer-events: none;
}

/* ── CENTER STAGE (z7) ── */
.stage {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 7;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  padding-bottom: 60px;
  pointer-events: none;
}

/* ── WAVES FRONT (in front of text, z9) ── */
.wave-front {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9;
  height: 200px;
  overflow: hidden;
  pointer-events: none;
}

/* shared SVG wave sizing */
.wave-back svg,
.wave-front svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
  display: block;
}

/* back waves — slower, deeper */
.wb1 {
  -webkit-animation: wavemove 14s linear infinite;
          animation: wavemove 14s linear infinite;
  opacity: 0.30;
}
.wb2 {
  -webkit-animation: wavemove 20s linear infinite reverse;
          animation: wavemove 20s linear infinite reverse;
  opacity: 0.18;
}

/* front waves — faster, solid */
.wf1 {
  -webkit-animation: wavemove 7s linear infinite;
          animation: wavemove 7s linear infinite;
  opacity: 0.92;
}
.wf2 {
  -webkit-animation: wavemove 10s linear infinite reverse;
          animation: wavemove 10s linear infinite reverse;
  opacity: 0.80;
}

@-webkit-keyframes wavemove {
  from { -webkit-transform: translateX(0);    transform: translateX(0); }
  to   { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes wavemove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── CORNER MARKERS ── */
.corner {
  position: fixed;
  width: 28px;
  height: 28px;
  z-index: 10;
  opacity: 0.35;
}
.corner::before,
.corner::after {
  content: '';
  position: absolute;
  background: var(--accent1);
}
.corner::before { width: 100%; height: 2px; top: 0; left: 0; }
.corner::after  { width: 2px; height: 100%; top: 0; left: 0; }
.c-tl { top: 24px; left: 24px; }
.c-tr { top: 24px; right: 24px; -webkit-transform: scaleX(-1); transform: scaleX(-1); }
.c-bl { bottom: 24px; left: 24px; -webkit-transform: scaleY(-1); transform: scaleY(-1); }
.c-br { bottom: 24px; right: 24px; -webkit-transform: scale(-1); transform: scale(-1); }

/* ── TICKER ── */
.ticker {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 11;
  height: 32px;
  background: rgba(10, 16, 20, 0.95);
  border-top: 1px solid rgba(114, 140, 153, 0.3);
  overflow: hidden;
  opacity: 0;
  -webkit-animation: fadeUp 0.5s ease forwards 1.8s;
          animation: fadeUp 0.5s ease forwards 1.8s;
}
.ticker-inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  white-space: nowrap;
  will-change: transform;
  -webkit-transform: translateZ(0);
          transform: translateZ(0);
  line-height: 32px;
}
.ticker-inner span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  padding: 0 2rem;
  text-transform: uppercase;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}

/* ── SITE NAME ── */
.sitename {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1rem, 2.8vw, 1.6rem);
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: lowercase;
  margin-bottom: 2.2rem;
  opacity: 0;
  -webkit-transform: translateY(10px);
          transform: translateY(10px);
  -webkit-animation: fadeUp 0.6s ease forwards 0.2s;
          animation: fadeUp 0.6s ease forwards 0.2s;
}

/* ── HEADLINE ── */
.headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 16vw, 16rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-align: center;
  position: relative;
  opacity: 0;
  -webkit-transform: translateY(20px);
          transform: translateY(20px);
  -webkit-animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.45s;
          animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.45s;
}

.headline span.line1 {
  display: block;
  color: #fff;
  text-shadow:
    0 0 40px rgba(168, 190, 201, 0.25),
    0 0 120px rgba(114, 140, 153, 0.15);
  -webkit-animation: sway1 6s ease-in-out infinite;
          animation: sway1 6s ease-in-out infinite;
  will-change: transform;
}

.headline span.line2 {
  display: block;
  -webkit-text-stroke: 2px var(--accent1);
  color: transparent;
  -webkit-animation: sway2 6s ease-in-out infinite;
          animation: sway2 6s ease-in-out infinite;
  will-change: transform;
}

/* ── KEYFRAMES ── */
@-webkit-keyframes fadeUp {
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@-webkit-keyframes sway1 {
  0%   { -webkit-transform: translateY(0px)   rotate(-0.3deg); transform: translateY(0px)   rotate(-0.3deg); }
  25%  { -webkit-transform: translateY(-6px)  rotate( 0.2deg); transform: translateY(-6px)  rotate( 0.2deg); }
  50%  { -webkit-transform: translateY(-10px) rotate( 0.4deg); transform: translateY(-10px) rotate( 0.4deg); }
  75%  { -webkit-transform: translateY(-5px)  rotate(-0.1deg); transform: translateY(-5px)  rotate(-0.1deg); }
  100% { -webkit-transform: translateY(0px)   rotate(-0.3deg); transform: translateY(0px)   rotate(-0.3deg); }
}
@keyframes sway1 {
  0%   { transform: translateY(0px)   rotate(-0.3deg); }
  25%  { transform: translateY(-6px)  rotate( 0.2deg); }
  50%  { transform: translateY(-10px) rotate( 0.4deg); }
  75%  { transform: translateY(-5px)  rotate(-0.1deg); }
  100% { transform: translateY(0px)   rotate(-0.3deg); }
}

@-webkit-keyframes sway2 {
  0%   { -webkit-transform: translateY(0px)  rotate( 0.2deg); transform: translateY(0px)  rotate( 0.2deg); }
  25%  { -webkit-transform: translateY(-4px) rotate(-0.3deg); transform: translateY(-4px) rotate(-0.3deg); }
  50%  { -webkit-transform: translateY(-8px) rotate(-0.5deg); transform: translateY(-8px) rotate(-0.5deg); }
  75%  { -webkit-transform: translateY(-3px) rotate( 0.2deg); transform: translateY(-3px) rotate( 0.2deg); }
  100% { -webkit-transform: translateY(0px)  rotate( 0.2deg); transform: translateY(0px)  rotate( 0.2deg); }
}
@keyframes sway2 {
  0%   { transform: translateY(0px)  rotate( 0.2deg); }
  25%  { transform: translateY(-4px) rotate(-0.3deg); }
  50%  { transform: translateY(-8px) rotate(-0.5deg); }
  75%  { transform: translateY(-3px) rotate( 0.2deg); }
  100% { transform: translateY(0px)  rotate( 0.2deg); }
}
