/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --white: #ffffff;
  --font-sans: 'Sora', 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  height: 100%;
  width: 100%;
}

body {
  height: 100%;
  width: 100%;
  font-family: var(--font-sans);
  color: var(--white);
  background: #000000;
  overflow: hidden;
  /* Prevent rubber-band scroll on iOS */
  overscroll-behavior: none;
}

/* ── Background ── */
.bg-layer {
  position: fixed;
  inset: 0;
  background-image: url('Manifest.png');
  background-repeat: no-repeat;
  background-position: center center;
  /* Desktop: show full image */
  background-size: contain;
  animation: bgBreath 8s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes bgBreath {
  0%   { transform: scale(1);      filter: brightness(1); }
  50%  { transform: scale(1.025);  filter: brightness(1.06); }
  100% { transform: scale(1);      filter: brightness(1); }
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.50) 100%);
}

/* ── Top Nav ── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  pointer-events: none;
}

.nav-logo { display: flex; align-items: center; pointer-events: auto; }

.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  opacity: .9;
}

.nav-login-btn {
  pointer-events: auto;
  padding: 7px 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  text-decoration: none; letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s;
  backdrop-filter: blur(8px);
}
.nav-login-btn:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.32);
  color: #fff;
}

/* ── Layout ── */
.container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  /* Bottom padding respects home indicator on iOS */
  padding: 48px 10vw calc(72px + env(safe-area-inset-bottom));
  padding-left: max(10vw, env(safe-area-inset-left));
  padding-right: max(10vw, env(safe-area-inset-right));
}

/* ── Hero ── */
.waitlist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp 0.9s var(--ease-out) 0.15s both;
}

.tagline {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
}

.tagline-sub {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.01em;
  max-width: 380px;
}

/* ── CTA Button ── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 14px 26px;
  background: #ffffff;
  color: #0a0a0a;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  width: fit-content;
  /* Minimum tap target */
  min-height: 48px;
  transition: background 0.15s, gap 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.cta-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-out);
}

.cta-btn:hover {
  background: rgba(235, 235, 235, 1);
  gap: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.cta-btn:hover svg {
  transform: translateX(3px);
}

.cta-btn:active {
  background: rgba(210, 210, 210, 1);
  transform: scale(0.98);
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile portrait ── */
@media (max-width: 640px) and (orientation: portrait) {
  body { overflow: hidden; }

  /* cover fills the screen — show the ring in the upper-center */
  .bg-layer {
    background-size: cover;
    background-position: center 30%;
  }

  /* Transparent top, strong dark fade from 55% downward for text readability */
  .bg-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.00)  0%,
      rgba(0,0,0,0.00) 30%,
      rgba(0,0,0,0.55) 58%,
      rgba(0,0,0,0.82) 78%,
      rgba(0,0,0,0.92) 100%
    );
  }

  .container {
    min-height: 100dvh;
    justify-content: flex-end;
    padding: 0 24px calc(52px + env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  .waitlist { gap: 12px; }

  .tagline {
    font-size: clamp(26px, 7.5vw, 34px);
  }

  .tagline-sub {
    font-size: 14px;
    max-width: 100%;
  }

  .cta-btn {
    width: 100%;
    justify-content: center;
    font-size: 15px;
    padding: 16px 24px;
    border-radius: 14px;
    margin-top: 6px;
  }
}

/* ── Mobile landscape ── */
@media (max-width: 900px) and (orientation: landscape) {
  body { overflow: hidden; }

  /* Image fits height, sits in center — push text to bottom-left black zone */
  .bg-layer {
    background-size: contain;
    background-position: center center;
  }

  .bg-overlay {
    background:
      linear-gradient(to right,  rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.20) 45%, transparent 65%),
      linear-gradient(to bottom, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.55) 100%);
  }

  .container {
    min-height: 100dvh;
    justify-content: flex-end;
    padding: 0 8vw calc(36px + env(safe-area-inset-bottom));
    padding-left: max(8vw, env(safe-area-inset-left));
  }

  .waitlist {
    gap: 10px;
    max-width: 46%;
  }

  .tagline {
    font-size: clamp(20px, 3vw, 28px);
  }

  .tagline-sub {
    font-size: 13px;
  }

  .cta-btn {
    font-size: 13px;
    padding: 12px 22px;
  }
}

/* ── Small phones (≤375px) ── */
@media (max-width: 375px) and (orientation: portrait) {
  .tagline    { font-size: 24px; }
  .tagline-sub { font-size: 13px; }
}

/* ── Manifest Reveal（鼠标显影特效；图层由 main.js 注入，仅桌面启用） ── */
.bg-dim {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.46);
  backdrop-filter: saturate(0.35) brightness(0.78);
  -webkit-backdrop-filter: saturate(0.35) brightness(0.78);
  pointer-events: none;
}
#revealCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  /* 与 .bg-layer 同步呼吸动画，保证显影区与底图严格对位 */
  animation: bgBreath 8s ease-in-out infinite alternate;
  will-change: transform;
}
