/* ====================================================================
   RelayLab Autolight — Coming Soon
   Theme: Workshop / Bi-LED installer
   Palette: deep charcoal + cyan LED beam + warm amber DRL
   ==================================================================== */

:root {
  --bg: #0a0d14;
  --bg-2: #0f1320;
  --ink: #e8edf5;
  --ink-dim: #8b93a7;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --cyan: #7df0ff;
  --cyan-strong: #00d9ff;
  --amber: #ffb020;
  --amber-soft: #ffd28a;
  --red: #e63946;

  --font-display: "Chakra Petch", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(125, 240, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 176, 32, 0.06), transparent 60%),
    var(--bg);
}

::selection { background: var(--cyan-strong); color: #0a0d14; }

/* ========================= GRAIN & GRID ========================= */

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
}

.grid-floor {
  position: fixed;
  inset: auto 0 0 0;
  height: 55vh;
  pointer-events: none;
  z-index: 0;
  perspective: 600px;
  perspective-origin: 50% 0%;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 80%, transparent 100%);
}
.grid-floor::before {
  content: "";
  position: absolute; inset: -10% -20% -10% -20%;
  transform: rotateX(60deg);
  transform-origin: 50% 0%;
  background-image:
    linear-gradient(to right, rgba(125, 240, 255, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 240, 255, 0.18) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: gridMove 8s linear infinite;
  opacity: 0.55;
}

@keyframes gridMove {
  from { background-position: 0 0; }
  to   { background-position: 0 56px; }
}

/* ========================= TOPBAR ========================= */

.topbar {
  position: relative; z-index: 5;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--cyan);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(125, 240, 255, 0.06);
  box-shadow: inset 0 0 12px rgba(125, 240, 255, 0.25), 0 0 18px rgba(125, 240, 255, 0.18);
  animation: pulseMark 2.4s ease-in-out infinite;
}
@keyframes pulseMark {
  0%, 100% { box-shadow: inset 0 0 10px rgba(125,240,255,0.2), 0 0 12px rgba(125,240,255,0.12); }
  50%      { box-shadow: inset 0 0 16px rgba(125,240,255,0.4), 0 0 22px rgba(125,240,255,0.35); }
}
.brand-name {
  font-size: 15px; font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
}
.brand-dot { color: var(--amber); }

.status-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2dd56b;
  box-shadow: 0 0 0 0 rgba(45, 213, 107, 0.7);
  animation: dotPulse 1.6s ease-out infinite;
}
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0   rgba(45, 213, 107, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(45, 213, 107, 0); }
  100% { box-shadow: 0 0 0 0   rgba(45, 213, 107, 0); }
}

/* ========================= STAGE (main) ========================= */

.stage {
  position: relative; z-index: 4;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  flex: 1;
}

/* ====== Copy column ====== */
.copy { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.24em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 26px;
  opacity: 0; transform: translateY(8px);
  animation: rise 0.7s 0.05s ease forwards;
}
.eyebrow-bar {
  width: 36px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.headline .line {
  display: block;
  opacity: 0; transform: translateY(20px);
  animation: rise 0.8s ease forwards;
}
.headline .line:nth-child(1) { animation-delay: 0.15s; }
.headline .line:nth-child(2) { animation-delay: 0.35s; }
.headline .line-accent {
  background: linear-gradient(180deg, #e8edf5 0%, #7df0ff 60%, #00d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}
.cursor {
  display: inline-block;
  width: 10px; height: 0.85em;
  margin-left: 6px;
  background: var(--amber);
  vertical-align: -0.05em;
  animation: blink 1s steps(2, end) infinite;
  box-shadow: 0 0 14px rgba(255, 176, 32, 0.55);
}
@keyframes blink { 50% { opacity: 0; } }

.sub {
  max-width: 520px;
  color: var(--ink-dim);
  font-size: 16px; line-height: 1.65;
  margin-bottom: 36px;
  opacity: 0; transform: translateY(10px);
  animation: rise 0.8s 0.55s ease forwards;
}

/* ====== Progress ====== */
.progress-wrap {
  max-width: 520px;
  margin-bottom: 36px;
  opacity: 0; transform: translateY(10px);
  animation: rise 0.8s 0.75s ease forwards;
}
.progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--ink-dim);
}
.progress-percent { color: var(--cyan); font-weight: 600; font-size: 14px; }

.progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  position: absolute; inset: 0 100% 0 0;
  background: linear-gradient(90deg, #00d9ff, #7df0ff 60%, #ffb020);
  box-shadow: 0 0 18px rgba(125, 240, 255, 0.55);
  transition: right 0.25s linear;
}
.progress-spark {
  position: absolute; top: -3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 16px #7df0ff, 0 0 30px #00d9ff;
  transform: translateX(-6px);
  transition: left 0.25s linear;
}

.progress-steps {
  list-style: none;
  display: flex; justify-content: space-between;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.progress-steps li {
  display: inline-flex; align-items: center; gap: 8px;
  text-transform: uppercase;
}
.progress-steps li span {
  width: 8px; height: 8px; border-radius: 50%;
  background: transparent;
  border: 1px solid var(--ink-dim);
}
.progress-steps li.done span { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.progress-steps li.done       { color: var(--ink); }
.progress-steps li.active span { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px var(--amber); animation: pulseStep 1.4s ease-in-out infinite; }
.progress-steps li.active     { color: var(--amber-soft); }

@keyframes pulseStep {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.3); }
}

/* ====== Meta ====== */
.meta {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
  opacity: 0; transform: translateY(10px);
  animation: rise 0.8s 0.95s ease forwards;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label {
  font-family: var(--font-display);
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.meta-value { color: var(--ink); font-weight: 500; font-size: 14px; }
.meta-divider {
  width: 1px; height: 28px;
  background: var(--line-strong);
}
.pulse-text {
  color: var(--amber) !important;
  animation: textPulse 1.8s ease-in-out infinite;
}
@keyframes textPulse { 50% { opacity: 0.5; } }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ========================= SCENE (right) ========================= */

.scene {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 320px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #04060a;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(20px) scale(0.98);
  animation: rise 0.9s 0.25s ease forwards;
}

/* ====== Headlight photo background ====== */
.headlight-photo {
  position: absolute; inset: 0;
  background-image: url("headlight-0.png");
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
  filter: contrast(1.05) saturate(1.05);
  animation: photoBreathe 4.4s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, filter;
}

@keyframes photoBreathe {
  0%, 100% { transform: scale(1)     ; filter: contrast(1.05) saturate(1.05) brightness(1); }
  50%      { transform: scale(1.018) ; filter: contrast(1.08) saturate(1.15) brightness(1.07); }
}

/* ====== Devil-eye live glow overlays (on top of lens positions) ====== */
.eye-glow {
  position: absolute;
  width: 24%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(14px);
  opacity: 0.85;
  will-change: filter, transform, opacity;
}
.eye-glow-left {
  /* posisi tengah lensa kiri pada foto */
  top: 53%;
  left: 28%;
  background: radial-gradient(circle,
              rgba(125, 240, 255, 0.95) 0%,
              rgba(0, 217, 255, 0.55)  35%,
              rgba(0, 80, 120, 0.0)    70%);
  animation: eyePulse 2.6s ease-in-out infinite,
             eyeShift 9s linear infinite;
}
.eye-glow-right {
  top: 53%;
  left: 60%;
  background: radial-gradient(circle,
              rgba(255, 140, 200, 0.95) 0%,
              rgba(220, 60, 180, 0.55)  35%,
              rgba(60, 0, 60, 0.0)      70%);
  animation: eyePulse 2.6s 0.4s ease-in-out infinite,
             eyeShift 9s -4.5s linear infinite;
}

@keyframes eyePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.65; filter: blur(14px); }
  50%      { transform: translate(-50%, -50%) scale(1.18); opacity: 1;    filter: blur(10px); }
}
@keyframes eyeShift {
  /* siklus warna mengelilingi mata */
  0%   { filter: blur(12px) hue-rotate(0deg);   }
  25%  { filter: blur(12px) hue-rotate(70deg);  }
  50%  { filter: blur(12px) hue-rotate(160deg); }
  75%  { filter: blur(12px) hue-rotate(260deg); }
  100% { filter: blur(12px) hue-rotate(360deg); }
}

/* Color sweep across the lens area — sapuan warna lembut */
.color-sweep {
  position: absolute;
  inset: 40% 0 20% 0;
  background: linear-gradient(90deg,
              transparent 0%,
              rgba(125, 240, 255, 0.18) 20%,
              rgba(255, 90, 180, 0.18) 50%,
              rgba(180, 120, 255, 0.18) 80%,
              transparent 100%);
  mix-blend-mode: screen;
  filter: blur(40px);
  pointer-events: none;
  animation: sweep 7s ease-in-out infinite alternate;
  opacity: 0.7;
}
@keyframes sweep {
  0%   { transform: translateX(-12%); }
  100% { transform: translateX(12%);  }
}

/* Vignette + subtle grain on top of photo */
.scene-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 55%, transparent 40%, rgba(0,0,0,0.55) 100%);
}
.scene-vignette::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.18;
}


/* scan line */
.scanline {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(125, 240, 255, 0.18) 50%, transparent 100%);
  height: 80px;
  animation: scan 4s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes scan {
  0%   { transform: translateY(-100px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(110%); opacity: 0; }
}

/* HUD brackets */
.hud {
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--cyan);
}
.hud-tl { top: 14px; left: 14px;  border-top: 2px solid; border-left: 2px solid; }
.hud-tr { top: 14px; right: 14px; border-top: 2px solid; border-right: 2px solid; }
.hud-bl { bottom: 14px; left: 14px;  border-bottom: 2px solid; border-left: 2px solid; }
.hud-br { bottom: 14px; right: 14px; border-bottom: 2px solid; border-right: 2px solid; }

/* Voltage / Lumens badges */
.voltage, .lumens {
  position: absolute;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(10, 13, 20, 0.65);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  font-family: var(--font-display);
}
.voltage { top: 36px; left: 36px; }
.lumens  { bottom: 36px; right: 36px; }
.v-label {
  font-size: 9px; letter-spacing: 0.22em;
  color: var(--ink-dim);
  margin-right: 6px;
}
.v-value {
  font-size: 18px; font-weight: 700;
  color: var(--cyan);
}
.v-unit {
  font-size: 11px;
  color: var(--ink-dim);
}
.lumens .v-value { color: var(--amber); }

/* ========================= FOOTER ========================= */

.footer {
  position: relative; z-index: 5;
  margin-top: auto;
  width: 100%;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.4));
}

.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.ticker-track {
  display: inline-flex; gap: 28px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.22em;
  color: var(--ink-dim);
}
.ticker-track span { display: inline-block; }
.ticker-track span:nth-child(even) { color: var(--cyan); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.footer-bottom {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 16px 28px 24px;
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-dim);
}
.footer-sep { opacity: 0.5; }

/* ========================= RESPONSIVE ========================= */

@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 16px 22px 40px;
  }
  .scene {
    order: -1;
    aspect-ratio: 4 / 3;
    min-height: 280px;
  }
  .headline { font-size: clamp(64px, 18vw, 120px); }
  .sub { font-size: 15px; }
}

@media (max-width: 560px) {
  .topbar { padding: 16px 18px; }
  .brand-name { font-size: 13px; }
  .status-chip { padding: 6px 10px; font-size: 10px; }
  .stage { padding: 12px 18px 32px; gap: 28px; }
  .scene { min-height: 240px; border-radius: 18px; }
  .voltage, .lumens { padding: 6px 9px; }
  .voltage { top: 18px; left: 18px; }
  .lumens  { bottom: 18px; right: 18px; }
  .v-value { font-size: 14px; }
  .v-label { font-size: 8px; }
  .hud { width: 16px; height: 16px; }
  .hud-tl, .hud-tr { top: 10px; }
  .hud-tl, .hud-bl { left: 10px; }
  .hud-tr, .hud-br { right: 10px; }
  .hud-bl, .hud-br { bottom: 10px; }

  .headline { font-size: clamp(54px, 18vw, 96px); margin-bottom: 22px; }
  .sub      { font-size: 14.5px; margin-bottom: 28px; }

  .progress-steps li { font-size: 10px; letter-spacing: 0.14em; }
  .meta { gap: 12px; }
  .meta-divider { display: none; }

  .footer-bottom { padding: 14px 18px 22px; font-size: 11px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .grid-floor::before { animation: none; }
}
