/* Single-viewport landing — desktop + phone; controls pinned to corners above browser chrome */

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

:root {
  /* Safe areas + gutter so fixed controls sit clearly inside the viewport */
  --inset-top: max(0.65rem, env(safe-area-inset-top, 0px));
  --inset-right: max(0.65rem, env(safe-area-inset-right, 0px));
  --inset-left: max(0.65rem, env(safe-area-inset-left, 0px));
  /* Mobile browsers (e.g. Safari tab bar) often need more than safe-area alone */
  --inset-bottom: max(
    0.65rem,
    calc(env(safe-area-inset-bottom, 0px) + max(1.5rem, 5.5vmin))
  );
  --z-controls: 5;
}

@media (min-width: 768px) {
  :root {
    --inset-top: max(1rem, env(safe-area-inset-top, 0px));
    --inset-right: max(1.25rem, env(safe-area-inset-right, 0px));
    --inset-left: max(1.25rem, env(safe-area-inset-left, 0px));
    --inset-bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
  }
}

html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #fff;
}

body {
  overflow: hidden;
  font-family: "Archivo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

/* Hide iOS / in-app WebKit big play overlay on decorative muted background video */
.bg-video::-webkit-media-controls {
  display: none !important;
}
.bg-video::-webkit-media-controls-enclosure {
  display: none !important;
}
.bg-video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

.bg-veil {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

/* Logo only — CTAs are fixed to corners */
.content {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--inset-top) + 3.25rem) 1.25rem calc(var(--inset-bottom) + 4.5rem);
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: clamp(0.5rem, 3vw, 1.5rem) 0;
}

.logo {
  width: min(72vw, 520px);
  max-height: min(42vh, 360px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.45));
}

.cta {
  position: fixed;
  z-index: var(--z-controls);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
  width: fit-content;
  max-width: min(calc(100vw - var(--inset-left) - var(--inset-right) - 4rem), 22rem);
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.cta--primary {
  top: var(--inset-top);
  left: var(--inset-left);
  right: auto;
  bottom: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.92);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cta--primary:hover {
  background: #fff;
  color: #000;
  transform: translateY(-2px);
}

.cta--accent {
  right: var(--inset-right);
  bottom: var(--inset-bottom);
  left: auto;
  top: auto;
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.08);
}

.cta--accent:hover {
  background: transparent;
  color: #fff;
  transform: translateY(-2px);
}

.cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.theme-audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.audio-toggle {
  position: fixed;
  z-index: var(--z-controls);
  left: var(--inset-left);
  bottom: var(--inset-bottom);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.audio-toggle:hover {
  background: #fff;
  color: #000;
  transform: translateY(-2px);
}

.audio-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.audio-toggle__svg {
  display: block;
}

.audio-toggle__svg--stop {
  display: none;
}

.audio-toggle.is-playing {
  background: #fff;
  color: #000;
}

.audio-toggle.is-playing:hover {
  background: transparent;
  color: #fff;
}

.audio-toggle.is-playing .audio-toggle__svg--play {
  display: none;
}

.audio-toggle.is-playing .audio-toggle__svg--stop {
  display: block;
}

@media (min-width: 768px) {
  .logo {
    width: min(48vw, 640px);
    max-height: min(48vh, 420px);
  }

  .content {
    padding: calc(var(--inset-top) + 2.5rem) 2rem calc(var(--inset-bottom) + 3.5rem);
  }

  .cta {
    min-height: 52px;
    padding: 0.75rem 1.6rem;
  }

  .audio-toggle {
    width: 56px;
    height: 56px;
  }

  .audio-toggle__svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }

  .stage {
    background: #111 radial-gradient(ellipse at center, #1a1a1a 0%, #000 70%);
  }

  .cta {
    transition: none;
  }

  .cta:hover {
    transform: none;
  }

  .audio-toggle {
    transition: none;
  }

  .audio-toggle:hover {
    transform: none;
  }
}
