:root {
  --bg: #12100f;
  --bg-elevated: #1b1816;
  --panel: #171412;
  --panel-border: #3a342f;
  --text: #f1ede6;
  --text-muted: #a59c91;
  --accent: #e4bf56;
  --accent-strong: #f3d36e;
  --shadow: rgba(0, 0, 0, 0.28);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DejaVu Sans Mono", "JetBrains Mono", "IBM Plex Mono", monospace;
  background:
    radial-gradient(circle at top, rgba(228, 191, 86, 0.08), transparent 32%),
    linear-gradient(180deg, #171311 0%, #110f0e 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at center,
      rgba(228, 191, 86, 0.13),
      transparent 30%
    ),
    linear-gradient(180deg, #171311 0%, #110f0e 100%);
  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-brand {
  display: flex;
  align-items: center;
  animation: loading-pulse 1s ease-in-out infinite alternate;
}

.loading-logo {
  width: min(28rem, 78vw);
  height: min(28rem, 78vw);
  object-fit: contain;
}

.page {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 3rem 0 2rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.slider-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}

.slider-stage {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid var(--panel-border);
  border-radius: 0.4rem;
  overflow: hidden;
  box-shadow: 0 24px 50px var(--shadow);
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  position: relative;
}

.window-titlebar {
  min-height: 1.9rem;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid rgba(228, 191, 86, 0.12);
}

.window-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.window-control {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(228, 191, 86, 0.28);
  border: 1px solid rgba(228, 191, 86, 0.35);
}

.window-titlebar-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(228, 191, 86, 0.78);
  font-size: 0.88rem;
  font-weight: 700;
  pointer-events: none;
}

.video-stack {
  position: relative;
  background: #1f2029;
}

.video-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2029;
  pointer-events: none;
  transition:
    opacity 0.38s ease,
    visibility 0.38s ease;
}

.video-stack.is-loaded .video-loading {
  opacity: 0;
  visibility: hidden;
}

.video-loading-logo {
  width: min(20rem, 42vw);
  height: min(20rem, 42vw);
  object-fit: contain;
  opacity: 0.9;
  animation: loading-pulse 1s ease-in-out infinite alternate;
}

.demo-video {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 760px);
  object-fit: contain;
  background: #1f2029;
  transition: opacity 0.26s ease;
}

.demo-video-secondary {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.demo-video.is-visible {
  opacity: 1;
}

.demo-video.is-hidden {
  opacity: 0;
}

.demo-video.is-loading {
  opacity: 0;
}

.slider-button {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--bg-elevated);
  color: var(--accent);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.slider-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: #221d18;
  color: var(--accent-strong);
}

.slider-button:focus-visible,
.hero-action:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.slider-button span {
  font-size: 1.6rem;
  line-height: 1;
}

.demo-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
}

.demo-title,
.demo-description {
  transition: opacity 0.26s ease-in-out;
}

.demo-copy.is-switching .demo-title,
.demo-copy.is-switching .demo-description {
  opacity: 0.82;
}

.demo-copy.is-loading .demo-title,
.demo-copy.is-loading .demo-description {
  animation: loading-plasma 3.2s ease-in-out infinite;
}

.demo-title {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  text-shadow:
    0 0 22px rgba(228, 191, 86, 0.44),
    0 0 54px rgba(228, 191, 86, 0.24);
}

.demo-description {
  margin: 0;
  max-width: 52rem;
  color: var(--text-muted);
  line-height: 1.45;
  font-style: italic;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-action {
  min-width: 12.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 0.95rem;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.hero-action:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent-strong);
  background: #1c1815;
}

.video-preview {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.video-preview-frame {
  width: min(100%, 860px);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--panel-border);
  background: #1f2029;
}

.site-footer {
  padding: 0 1rem 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 800px) {
  .page {
    padding-top: 2rem;
  }

  .loading-logo {
    width: min(18rem, 56vw);
    height: min(18rem, 56vw);
  }

  .video-loading-logo {
    width: min(8rem, 24vw);
    height: min(8rem, 24vw);
  }

  .slider-shell {
    grid-template-columns: 2.35rem minmax(0, 1fr) 2.35rem;
    gap: 0.2rem;
  }

  .slider-button {
    width: 2.35rem;
    height: 2.35rem;
  }

  .slider-button span {
    font-size: 1.35rem;
  }

  .slider-stage {
    max-width: calc(100vw - 6.5rem);
  }

  .window-titlebar {
    padding: 0 0.75rem;
  }

  .window-controls {
    gap: 0.3rem;
  }

  .window-control {
    width: 0.6rem;
    height: 0.6rem;
  }
}

@keyframes loading-pulse {
  from {
    opacity: 0.72;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes loading-plasma {
  0%,
  100% {
    opacity: 0.72;
    text-shadow:
      0 0 10px rgba(228, 191, 86, 0.18),
      0 0 24px rgba(228, 191, 86, 0.08);
  }

  35% {
    opacity: 0.96;
    text-shadow:
      0 0 14px rgba(228, 191, 86, 0.28),
      0 0 34px rgba(228, 191, 86, 0.14);
  }

  65% {
    opacity: 1;
    text-shadow:
      0 0 18px rgba(243, 211, 110, 0.42),
      0 0 42px rgba(228, 191, 86, 0.2),
      0 0 72px rgba(228, 191, 86, 0.12);
  }
}
