@font-face {
  font-family: "Redaction";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/redaction-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Redaction";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/redaction-latin-400-italic.woff2") format("woff2");
}

:root {
  --cream: #f2f0dc;
  --cream-soft: #e9e7d4;
  --ink: #1d2511;
  --deep: #0a0f05;
}

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

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--deep);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(242, 240, 220, 0.85); color: #141a0a; }

/* ---------- background: blurred street photograph ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url("/background.jpg");
  background-size: cover;
  background-position: 50% 30%;
  background-repeat: no-repeat;
  filter: brightness(0.92) saturate(0.98);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(6, 10, 5, 0.34) 0%, rgba(6, 10, 5, 0.12) 45%, rgba(3, 6, 2, 0.74) 100%),
    linear-gradient(180deg, rgba(4, 8, 3, 0.42) 0%, rgba(4, 8, 3, 0.08) 35%, rgba(4, 8, 3, 0.42) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Redaction", "Playfair Display", "Times New Roman", Georgia, serif;
  font-weight: 400;
  font-size: clamp(56px, 8.2vw, 164px);
  line-height: 1.03;
  letter-spacing: 0.004em;
  white-space: nowrap;
  color: #f1efdb;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
  animation: rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.title .line { display: block; }
.title em { font-style: italic; font-weight: 400; }

/* ---------- beta form ---------- */

.beta {
  position: relative;
  z-index: 1;
  margin-top: clamp(36px, 7.5vh, 96px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(92vw, 620px);
  padding: 8px;
  border-radius: 999px;
  background: rgba(240, 238, 218, 0.1);
  border: 1px solid rgba(240, 238, 218, 0.26);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(3, 6, 1, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  animation: rise 0.9s 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.beta:focus-within {
  border-color: rgba(246, 244, 228, 0.55);
  background: rgba(240, 238, 218, 0.14);
  box-shadow: 0 24px 70px rgba(3, 6, 1, 0.45), 0 0 0 4px rgba(246, 244, 228, 0.08);
}

.beta input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  padding: 0 10px 0 22px;
  color: #f4f2e2;
  font: 400 clamp(15px, 1.05vw, 17px) / 1.4 "Inter", sans-serif;
  letter-spacing: 0.01em;
}

.beta input::placeholder { color: rgba(240, 238, 218, 0.5); }

.beta button {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  padding: clamp(15px, 1.1vw, 18px) clamp(22px, 1.8vw, 34px);
  background: #f5f3e2;
  color: var(--ink);
  font: 500 clamp(14px, 0.95vw, 16px) / 1 "Inter", sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: background 0.25s ease, transform 0.15s ease, opacity 0.2s ease;
}

.beta button:hover { background: #fffdf0; }
.beta button:active { transform: scale(0.985); }
.beta button:disabled { opacity: 0.65; cursor: default; }

.status {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  min-height: 22px;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--cream-soft);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.status.visible { opacity: 0.95; }
.status.ok { color: #e9efc9; }
.status.error { color: #f0c9bd; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  .beta {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 30px;
    width: min(92vw, 440px);
  }

  .beta input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    text-align: center;
  }

  .beta button {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .title, .beta { animation: none !important; }
}
