:root {
  --ink: #f5f6f8;
  --ink-dim: rgba(245, 246, 248, 0.72);
  --ink-faint: rgba(245, 246, 248, 0.45);
  --edge: 48px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: #0a0e16;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  position: relative;
}

/* Background video */
.bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.bg-video-blur {
  display: none;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 22, 0.92) 0px,
    rgba(10, 14, 22, 0.92) env(safe-area-inset-top, 0px),
    rgba(10, 14, 22, 0.40) calc(env(safe-area-inset-top, 0px) + 120px),
    rgba(10, 14, 22, 0.08) calc(env(safe-area-inset-top, 0px) + 260px),
    rgba(8, 11, 18, 0) 42%,
    rgba(8, 11, 18, 0) 56%,
    rgba(6, 9, 15, 0.14) calc(100% - 260px - env(safe-area-inset-bottom, 0px)),
    rgba(6, 9, 15, 0.46) calc(100% - 120px - env(safe-area-inset-bottom, 0px)),
    rgba(6, 9, 15, 0.88) calc(100% - env(safe-area-inset-bottom, 0px)),
    rgba(6, 9, 15, 0.88) 100%
  );
  pointer-events: none;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  padding-top: calc(40px + env(safe-area-inset-top));
  padding-right: calc(var(--edge) + env(safe-area-inset-right));
  padding-bottom: 0;
  padding-left: calc(var(--edge) + env(safe-area-inset-left));
}

.brand-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Footer */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding-top: 0;
  padding-right: calc(var(--edge) + env(safe-area-inset-right));
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  padding-left: calc(var(--edge) + env(safe-area-inset-left));
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.25s ease;
  cursor: pointer;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.3s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  right: 0;
}

.nav-link:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.nav-divider {
  color: var(--ink-faint);
  font-size: 11px;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 640px) {
  :root {
    --edge: 20px;
  }

  .site-header {
    padding-top: calc(24px + env(safe-area-inset-top));
  }

  .brand-name {
    font-size: 12px;
    letter-spacing: 0.2em;
  }

  .site-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .footer-nav {
    gap: 8px;
  }

  .nav-link {
    font-size: 10px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .nav-divider {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link, .nav-link::after {
    transition: none;
  }
}

/* Mobile: full-screen, no-scroll layout. */
@media (max-width: 640px) {
  html, body {
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .bg-video,
  .bg-overlay,
  .bg-video-blur {
    position: fixed;
  }

  .bg-video-blur {
    display: block;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(38px) brightness(0.7) saturate(1.15);
    transform: scale(1.18);
    z-index: 0;
  }

  .bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 118%;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-height: none;
    transform: translate(-50%, -50%);
    object-fit: contain;
    z-index: 1;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }

  .bg-overlay {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .site-header,
  .site-footer {
    position: fixed;
  }
}
