:root {
  --red: #C20A0A;
  --black: #000000;
  --white: #FFFFFF;
  --cream: #FFFEE0;
  --ink: #111111;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  background: #120303;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* Subtle brand backdrop */
.stage {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(32px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right))
    calc(32px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  position: relative;
  overflow: hidden;
  background: #120303;
}

/* Full-bleed hero photo */
.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #2a0606;
  background-image:
    radial-gradient(90% 70% at 60% 55%, rgba(194, 10, 10, 0.55) 0%, rgba(20, 3, 3, 0) 60%),
    url("assets/hero.png");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

/* Darkening overlay for legibility + brand depth */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(20, 3, 3, 0.2) 45%, rgba(0, 0, 0, 0.55) 100%);
}

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain 8s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -3%); }
  30% { transform: translate(3%, -2%); }
  50% { transform: translate(-1%, 2%); }
  70% { transform: translate(2%, 3%); }
  90% { transform: translate(-3%, 1%); }
}

.card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

/* Logo */
.logo {
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.045em;
  color: #ffffff;
  line-height: 0.9;
  font-size: clamp(72px, 17vw, 148px);
  text-transform: lowercase;
  transform: skewX(-3deg);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}

/* Slogan */
.slogan {
  margin-top: 20px;
  font-weight: 700;
  font-size: clamp(13px, 3.8vw, 22px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.subline {
  margin-top: 14px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* Form */
.waitlist {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: block;
}

input {
  width: 100%;
  padding: 17px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px; /* 16px min prevents iOS Safari zoom on focus */
  font-weight: 600;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.btn {
  margin-top: 6px;
  width: 100%;
  min-height: 56px;
  padding: 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #d11010 0%, var(--red) 100%);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 28px rgba(194, 10, 10, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(194, 10, 10, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.form-message {
  min-height: 20px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.form-message.error {
  color: var(--red);
}

.form-message.success {
  color: #0a7a2f;
}

.footnote {
  margin-top: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.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;
}

/* Only apply hover lift on devices that actually hover (not touch) */
@media (hover: none) {
  .btn:hover {
    filter: none;
    transform: none;
    box-shadow: 0 12px 28px rgba(194, 10, 10, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
}

/* Small phones */
@media (max-width: 400px) {
  .logo {
    font-size: clamp(64px, 24vw, 100px);
  }
  .subline {
    font-size: 14px;
  }
  .waitlist {
    margin-top: 28px;
  }
  .footnote {
    margin-top: 24px;
  }
}

/* Short landscape screens: tighten vertical rhythm */
@media (max-height: 620px) and (orientation: landscape) {
  .logo {
    font-size: clamp(48px, 12vw, 84px);
  }
  .slogan {
    margin-top: 10px;
  }
  .waitlist {
    margin-top: 20px;
  }
  .footnote {
    margin-top: 18px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
