:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.42);
  --dim: rgba(245, 245, 245, 0.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    calc(24px + var(--safe-top))
    calc(24px + var(--safe-right))
    calc(28px + var(--safe-bottom))
    calc(24px + var(--safe-left));
}

.breath {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 50% 48%, rgba(255,255,255,0.045), transparent 70%);
  opacity: 0.35;
  transform: scale(0.96);
  transition: opacity 1.2s ease;
}

.breath.active {
  animation: breathe 7.5s ease-in-out infinite;
  opacity: 1;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.28; }
  50% { transform: scale(1.06); opacity: 0.55; }
}

.logo {
  position: relative;
  z-index: 1;
  width: min(72vw, 280px);
  height: auto;
  display: block;
  opacity: 0.95;
  filter: drop-shadow(0 0 24px rgba(255,255,255,0.06));
}

.gate {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  border: 1px solid var(--dim);
  background: transparent;
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 16px 28px 16px 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
}

.gate:active {
  background: rgba(255,255,255,0.06);
}

.gate:focus-visible {
  outline: 1px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
}

.gate.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.caption {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(22px + var(--safe-bottom));
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 20px;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.caption.visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .breath.active {
    animation: none;
    opacity: 0.4;
    transform: scale(1);
  }
}


/* Quiet privacy affordance — only after listen */
.privacy-link {
  position: absolute;
  z-index: 2;
  right: calc(16px + var(--safe-right));
  bottom: calc(14px + var(--safe-bottom));
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(245, 245, 245, 0.22);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease, color 0.3s ease;
}

.privacy-link.visible {
  opacity: 1;
  pointer-events: auto;
}

.privacy-link:hover,
.privacy-link:focus-visible {
  color: rgba(245, 245, 245, 0.45);
}

.privacy-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.3);
  outline-offset: 3px;
}

/* Privacy page — same quiet field */
body.privacy-page {
  overflow: auto;
  overscroll-behavior: auto;
  user-select: text;
  -webkit-user-select: text;
}

.privacy {
  max-width: 36rem;
  margin: 0 auto;
  padding:
    calc(48px + var(--safe-top))
    calc(28px + var(--safe-right))
    calc(48px + var(--safe-bottom))
    calc(28px + var(--safe-left));
  min-height: 100dvh;
}

.privacy-back {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, 0.35);
  text-decoration: none;
}

.privacy-back:hover,
.privacy-back:focus-visible {
  color: rgba(245, 245, 245, 0.65);
}

.privacy h1 {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, 0.72);
}

.privacy-lede {
  margin: 0 0 28px;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: rgba(245, 245, 245, 0.38);
}

.privacy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: rgba(245, 245, 245, 0.58);
  font-weight: 400;
}
