/* LEKO Tech API landing — aligned with docs/brand + website tokens */

:root {
  --leko-ink: #08090a;
  --leko-panel: #0f1113;
  --leko-red: #e03a2f;
  --leko-red-soft: rgba(224, 58, 47, 0.12);
  --leko-red-line: rgba(224, 58, 47, 0.38);
  --leko-mark-fg: #ffffff;
  --leko-name: #ffffff;
  --leko-tech: #b3b9c1;
  --leko-tagline: #5f666f;
  --text: #f3f4f6;
  --text-2: #b3b9c1;
  --text-3: #848b95;
  --line: rgba(255, 255, 255, 0.08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--leko-ink);
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Scene / drifting parts ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(224, 58, 47, 0.08), transparent 55%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--leko-ink);
}

.scene__glow {
  position: absolute;
  inset: 30% 20%;
  background: radial-gradient(circle, rgba(224, 58, 47, 0.14), transparent 65%);
  filter: blur(40px);
}

.drift {
  position: absolute;
  inset: 0;
}

.drift__item {
  position: absolute;
  color: rgba(243, 244, 246, 0.32);
  will-change: transform;
  opacity: 0.95;
}

.drift__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center center;
}

.drift__icon {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drift__icon--leaf {
  position: absolute;
  inset: 0;
  opacity: 0;
  color: #6fcf97;
  pointer-events: none;
}

.drift__item--accent {
  color: rgba(224, 58, 47, 0.42);
}

/* Recycle: spin → leaf → rise & vanish (outer keeps drifting) */
.drift__item.is-recycling .drift__inner {
  animation: recycle-spin 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.drift__item.is-recycling .drift__icon--part {
  animation: recycle-hide-part 2.8s ease both;
}

.drift__item.is-recycling .drift__icon--leaf {
  animation: recycle-show-leaf 2.8s ease both;
}

@keyframes recycle-spin {
  0% {
    transform: rotate(0deg) scale(1) translateY(0);
    opacity: 1;
  }
  35% {
    transform: rotate(320deg) scale(0.72) translateY(0);
    opacity: 1;
  }
  55% {
    transform: rotate(400deg) scale(0.9) translateY(-10px);
    opacity: 1;
  }
  100% {
    transform: rotate(520deg) scale(0.35) translateY(-48px);
    opacity: 0;
  }
}

@keyframes recycle-hide-part {
  0%, 32% { opacity: 1; }
  42%, 100% { opacity: 0; }
}

@keyframes recycle-show-leaf {
  0%, 32% { opacity: 0; transform: scale(0.6); }
  42% { opacity: 1; transform: scale(1.05); color: #6fcf97; }
  70% { opacity: 1; transform: scale(1); color: #8fdfa8; }
  100% { opacity: 0; transform: scale(0.7) translateY(-12px); }
}

/* Named drift paths — different directions & durations */
.drift__item--a { animation: drift-a 28s linear infinite; }
.drift__item--b { animation: drift-b 34s linear infinite; }
.drift__item--c { animation: drift-c 22s linear infinite; }
.drift__item--d { animation: drift-d 40s linear infinite; }
.drift__item--e { animation: drift-e 26s linear infinite; }
.drift__item--f { animation: drift-f 31s linear infinite; }
.drift__item--g { animation: drift-g 36s linear infinite; }
.drift__item--h { animation: drift-h 24s linear infinite; }

@keyframes drift-a {
  0% { transform: translate(-20vw, 10vh) rotate(-8deg); }
  100% { transform: translate(120vw, 35vh) rotate(12deg); }
}
@keyframes drift-b {
  0% { transform: translate(110vw, 70vh) rotate(10deg); }
  100% { transform: translate(-25vw, 20vh) rotate(-16deg); }
}
@keyframes drift-c {
  0% { transform: translate(40vw, -15vh) rotate(0deg); }
  100% { transform: translate(55vw, 115vh) rotate(40deg); }
}
@keyframes drift-d {
  0% { transform: translate(60vw, 110vh) rotate(-20deg); }
  100% { transform: translate(10vw, -20vh) rotate(25deg); }
}
@keyframes drift-e {
  0% { transform: translate(-15vw, 55vh) rotate(5deg); }
  100% { transform: translate(115vw, 10vh) rotate(-10deg); }
}
@keyframes drift-f {
  0% { transform: translate(105vw, 40vh) rotate(-5deg); }
  100% { transform: translate(-20vw, 75vh) rotate(18deg); }
}
@keyframes drift-g {
  0% { transform: translate(15vw, 105vh) rotate(15deg); }
  100% { transform: translate(90vw, -15vh) rotate(-30deg); }
}
@keyframes drift-h {
  0% { transform: translate(85vw, -10vh) rotate(-12deg); }
  100% { transform: translate(5vw, 110vh) rotate(22deg); }
}

/* ---------- Hub / logo ---------- */

.hub {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
  isolation: isolate;
}

.hub::before {
  content: '';
  position: absolute;
  width: min(520px, 90vw);
  height: min(520px, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 9, 10, 0.92) 35%, rgba(8, 9, 10, 0.55) 60%, transparent 72%);
  z-index: -1;
  pointer-events: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.logo--hero {
  flex-direction: column;
  gap: 1.25rem;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border: 1px solid var(--leko-red-line);
  border-radius: 18px;
  background: radial-gradient(120% 120% at 50% 0%, var(--leko-red-soft), transparent 70%);
  color: var(--leko-mark-fg);
  box-shadow:
    0 0 0 1px rgba(224, 58, 47, 0.08),
    0 24px 60px -20px rgba(224, 58, 47, 0.35);
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  align-items: center;
}

.logo__name {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--leko-name);
  text-transform: uppercase;
}

.logo__name-accent {
  font-weight: 300;
  color: var(--leko-tech);
}

.logo__tagline {
  margin-top: 0.45rem;
  font-size: clamp(0.65rem, 1.8vw, 0.8rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--leko-tagline);
}

.hub__eyebrow {
  margin: 1.75rem 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--leko-red);
}

.hub__lead {
  margin: 0.75rem 0 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* ---------- Footer ---------- */

.foot {
  position: relative;
  z-index: 1;
  padding: 1.25rem 1.5rem 1.75rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(8, 9, 10, 0.95), rgba(8, 9, 10, 0.55));
  backdrop-filter: blur(8px);
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  font-size: 0.875rem;
}

.foot__nav a {
  color: var(--text-2);
  transition: color 140ms var(--ease);
}

.foot__nav a:hover,
.foot__nav a:focus-visible {
  color: var(--text);
}

#status-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.status-dot[data-state='ok'] {
  background: #6fcf97;
  box-shadow: 0 0 8px rgba(111, 207, 151, 0.55);
}

.status-dot[data-state='degraded'],
.status-dot[data-state='error'] {
  background: #e0b341;
  box-shadow: 0 0 8px rgba(224, 179, 65, 0.45);
}

.status-dot[data-state='loading'] {
  background: var(--text-3);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  50% { opacity: 0.35; }
}

.status-label {
  color: var(--text-3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.foot__meta {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-3);
}

.foot__meta strong {
  color: var(--text-2);
  font-weight: 600;
}

.foot__sep {
  margin: 0 0.45rem;
}

/* ---------- Hex burst effects (docs/brand) ---------- */

.hex-mark .hex-cell {
  transform-box: fill-box;
  transform-origin: center;
}

.hex-mark--tremble .hex-cell--0 { animation: leko-hex-tremble-a 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.hex-mark--tremble .hex-cell--1 { animation: leko-hex-tremble-b 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.hex-mark--tremble .hex-cell--2 { animation: leko-hex-tremble-c 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

@keyframes leko-hex-tremble-a {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-1.2px, 0.8px); }
  20% { transform: translate(1.4px, -1px); }
  30% { transform: translate(-0.6px, 1.6px); }
  45% { transform: translate(1.8px, 0.4px); }
  60% { transform: translate(-1px, -1.2px); }
  75% { transform: translate(0.6px, 0.8px); }
}
@keyframes leko-hex-tremble-b {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(1.6px, -0.6px); }
  24% { transform: translate(-1.4px, 1.2px); }
  36% { transform: translate(0.8px, -1.6px); }
  50% { transform: translate(-1.8px, 0.4px); }
  68% { transform: translate(1.2px, 1px); }
  82% { transform: translate(-0.4px, -0.6px); }
}
@keyframes leko-hex-tremble-c {
  0%, 100% { transform: translate(0, 0); }
  8% { transform: translate(0.8px, 1.4px); }
  18% { transform: translate(-1.6px, -0.8px); }
  32% { transform: translate(1.2px, 1px); }
  48% { transform: translate(-0.8px, -1.4px); }
  64% { transform: translate(1.6px, 0.6px); }
  78% { transform: translate(-1px, 0.8px); }
}

.hex-mark--orbit .hex-cell--0 { animation: leko-hex-orbit-a 2.8s cubic-bezier(0.34, 1.2, 0.64, 1) both; }
.hex-mark--orbit .hex-cell--1 { animation: leko-hex-orbit-b 2.8s cubic-bezier(0.34, 1.2, 0.64, 1) both; }
.hex-mark--orbit .hex-cell--2 { animation: leko-hex-orbit-c 2.8s cubic-bezier(0.34, 1.2, 0.64, 1) both; }

@keyframes leko-hex-orbit-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(0, -5px) rotate(120deg); }
  70% { transform: translate(0, -2px) rotate(240deg); }
}
@keyframes leko-hex-orbit-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(-5px, 3px) rotate(-120deg); }
  70% { transform: translate(-2px, 1px) rotate(-240deg); }
}
@keyframes leko-hex-orbit-c {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(5px, 3px) rotate(120deg); }
  70% { transform: translate(2px, 1px) rotate(240deg); }
}

.hex-mark--neon .hex-cell { animation: leko-hex-neon 2.8s linear both; }
.hex-mark--neon .hex-cell--1 { animation-delay: 0.12s; }
.hex-mark--neon .hex-cell--2 { animation-delay: 0.24s; }

@keyframes leko-hex-neon {
  0%, 100% { stroke: currentColor; filter: none; }
  15% { stroke: #ff4d6d; filter: drop-shadow(0 0 3px rgba(255, 77, 109, 0.7)); }
  35% { stroke: #ffd166; filter: drop-shadow(0 0 3px rgba(255, 209, 102, 0.7)); }
  55% { stroke: #06d6a0; filter: drop-shadow(0 0 3px rgba(6, 214, 160, 0.7)); }
  75% { stroke: #4cc9f0; filter: drop-shadow(0 0 3px rgba(76, 201, 240, 0.7)); }
  90% { stroke: #c77dff; filter: drop-shadow(0 0 3px rgba(199, 125, 255, 0.7)); }
}

@media (prefers-reduced-motion: reduce) {
  .drift__item,
  .drift__item.is-recycling .drift__inner,
  .drift__item.is-recycling .drift__icon--part,
  .drift__item.is-recycling .drift__icon--leaf,
  .status-dot[data-state='loading'],
  .hex-mark--tremble .hex-cell,
  .hex-mark--orbit .hex-cell,
  .hex-mark--neon .hex-cell {
    animation: none !important;
  }

  .drift__item {
    opacity: 0.45;
  }

  .drift__icon--leaf {
    display: none;
  }
}

@media (max-width: 560px) {
  .logo__mark {
    width: 88px;
    height: 88px;
    border-radius: 14px;
  }

  .logo__mark .hex-mark {
    width: 56px;
    height: 56px;
  }

  .foot__nav {
    gap: 0.5rem 1rem;
  }
}
