:root {
  --cream: #f4f1e8;
  --cream-deep: #ece7d9;
  --ink: #14181f;
  --ink-soft: #4a4f57;
  --line: rgba(20, 24, 31, 0.14);
  --accent: #14181f;
  --radius: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--cream) 0%, var(--cream-deep) 100%);
  color: var(--ink);
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  position: relative;
  overflow-x: hidden;
}

/* Subtle film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- Layout ---------- */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  text-align: center;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  justify-content: center;
  animation: rise 1s var(--ease) both;
}

.brand__logo {
  height: 34px;
  width: auto;
}

/* ---------- Hero ---------- */
.hero {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.42em;
  animation: rise 1s var(--ease) 0.1s both;
}

.hero__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  animation: rise 1s var(--ease) 0.2s both;
}

.hero__lead {
  max-width: 34ch;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
  line-height: 1.7;
  color: var(--ink-soft);
  animation: rise 1s var(--ease) 0.3s both;
}

/* ---------- Signup ---------- */
.signup {
  width: 100%;
  max-width: 440px;
  margin-top: 0.75rem;
  animation: rise 1s var(--ease) 0.4s both;
}

.signup__row {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.signup__row:focus-within {
  border-color: var(--ink);
  box-shadow: 0 6px 30px -12px rgba(20, 24, 31, 0.4);
}

.signup__input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.signup__input::placeholder {
  color: rgba(74, 79, 87, 0.55);
}

.signup__button {
  border: none;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.signup__button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

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

.signup__button:disabled {
  opacity: 0.5;
  cursor: default;
}

.signup__msg {
  min-height: 1.2em;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.signup__msg.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.signup__msg.is-error {
  color: #a1443a;
}

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: rise 1s var(--ease) 0.5s both;
}

.foot__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.foot__link {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.foot__link:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.foot__icon {
  width: 26px;
  height: 26px;
}

.foot__copy {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(74, 79, 87, 0.7);
}

/* ---------- Animations ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .stage {
    padding: 2.25rem 1.25rem 2rem;
    gap: 1.5rem;
  }

  .signup__row {
    flex-direction: column;
    border-radius: 22px;
  }

  .signup__button {
    width: 100%;
    padding: 0.85rem;
  }

  .brand__logo {
    height: 28px;
  }
}
