@font-face {
  font-family: 'Untitled Serif';
  src: url('assets/fonts/UntitledSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Untitled Serif';
  src: url('assets/fonts/UntitledSerif-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Untitled Sans';
  src: url('assets/fonts/UntitledSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Untitled Sans';
  src: url('assets/fonts/UntitledSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --cream: #F0E4CF;
  --ink: #2B2118;
  --terracotta: #C05F33;
  --terracotta-dark: #A34D27;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Untitled Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(240, 228, 207, 0.94) 0%,
    rgba(240, 228, 207, 0.68) 46%,
    rgba(240, 228, 207, 0) 72%);
  z-index: 1;
  pointer-events: none;
}

.wordmark {
  position: absolute;
  top: 28px;
  left: clamp(24px, 6vw, 96px);
  z-index: 2;
  display: block;
}

.wordmark img {
  display: block;
  height: 28px;
  width: auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  padding: 0 clamp(24px, 6vw, 96px);
}

h1 {
  font-family: 'Untitled Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(42px, 5vw, 71px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  text-wrap: balance;
}

.sub {
  font-size: 19px;
  max-width: 52ch;
}

#waitlist-form {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}

.field-group {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(43, 33, 24, 0.3);
  border-radius: 999px;
}

.field-group:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(192, 95, 51, 0.18);
}

#email {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 20px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
}

#email:focus {
  outline: none;
}

#submit-btn {
  padding: 12px 26px;
  font: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--terracotta);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

#submit-btn:hover { background: var(--terracotta-dark); }
#submit-btn:disabled { opacity: 0.6; cursor: wait; }

.form-error {
  font-size: 14px;
  color: #8f2f10;
  min-height: 1.4em;
  padding-left: 22px;
}

/* Post-join takeover: headline, sub and form give way to the confirmation. */
.hero-inner.joined h1,
.hero-inner.joined .sub {
  display: none;
}

.success {
  animation: success-in 0.6s ease both;
}

.success-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Untitled Serif', Georgia, serif;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.success-title::before {
  content: '';
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.success-sub {
  margin-top: 2px;
  font-size: 17px;
  opacity: 0.8;
}

@keyframes success-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .success { animation: none; }
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: clamp(24px, 6vw, 96px);
  z-index: 2;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.75;
  text-decoration: none;
}

.scroll-hint:hover { opacity: 1; }

/* Founder note */
.note {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 24px;
}

.note h2 {
  font-family: 'Untitled Serif', Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  margin-bottom: 24px;
}

.note p { margin-bottom: 16px; }

.signature {
  margin-top: 32px;
  font-family: 'Untitled Serif', Georgia, serif;
  font-style: italic;
}

/* Footer */
footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 48px;
  font-size: 14px;
  opacity: 0.8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

footer a { color: var(--ink); }

footer .privacy { flex-basis: 100%; }

/* Static fallback: mobile and reduced motion */
.hero-static {
  background: url('assets/poster-last.jpg') center right / cover no-repeat;
}

.hero-static::after {
  background: linear-gradient(90deg,
    rgba(240, 228, 207, 0.95) 0%,
    rgba(240, 228, 207, 0.82) 55%,
    rgba(240, 228, 207, 0.45) 100%);
}

@media (max-width: 767px) {
  .hero video { display: none; }
}
