:root {
  color-scheme: light;
  --cream: #fff7ed;
  --ink: #2f231d;
  --brown: #8c5b35;
  --orange: #f49a45;
  --orange-dark: #d87520;
  --joined: #7a9b65;
  --joined-dark: #668653;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

body { background: #f8e0bf; }
body.modal-open { overflow: hidden; }

.hero-shell {
  position: relative;
  width: 100%;
  max-width: 1672px;
  margin: 0 auto;
  background: #f7d4a6;
  box-shadow: 0 0 50px rgba(73, 44, 22, .18);
}

.hero-picture,
.hero-art {
  display: block;
  width: 100%;
}

.hero-picture {
  position: relative;
  z-index: 0;
}

.hero-art {
  height: auto;
  object-fit: contain;
  object-position: center top;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .065em;
}

button:focus-visible {
  outline: 3px solid rgba(74, 44, 31, .78);
  outline-offset: 3px;
}

.landing-cta-group {
  position: absolute;
  top: clamp(620px, 84%, 1290px);
  left: 50%;
  right: auto;
  z-index: 2;
  width: clamp(286px, 32vw, 330px);
  text-align: center;
  transform: translateX(-50%);
}

.landing-cta {
  width: 100%;
  min-height: 48px;
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fffaf1;
  box-shadow: 0 14px 30px rgba(216, 117, 32, .3);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.landing-cta-support {
  margin: 14px auto 0;
  max-width: 310px;
  text-align: center;
  font-size: clamp(.75rem, 1.2vw, .8125rem);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .005em;
  color: rgba(87, 112, 78, .66);
}

.desktop-waitlist-panel {
  position: absolute;
  z-index: 2;
  left: 60.4%;
  top: 68.9%;
  width: 34%;
  height: 26.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.desktop-form-state,
.desktop-success-state {
  width: min(100%, 464px);
  margin: 0 auto;
}

.desktop-waitlist-panel h1,
.desktop-success-state h2 {
  margin: 0;
  color: #4a2c1f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 1.55vw, 1.72rem);
  line-height: 1.05;
  letter-spacing: .045em;
}

.desktop-support,
.desktop-success-state p {
  margin: 0 auto;
  max-width: none;
  color: rgba(87, 112, 78, .72);
  font-size: clamp(.78rem, .92vw, .96rem);
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.desktop-waitlist-form {
  margin-top: 8px;
}

.desktop-waitlist-form label {
  display: grid;
  grid-template-columns: clamp(118px, 8.8vw, 132px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  text-align: left;
  font-size: clamp(.68rem, .78vw, .82rem);
  line-height: 1.1;
}

.desktop-waitlist-form label span {
  width: auto;
  margin-bottom: 0;
  white-space: nowrap;
}

.desktop-waitlist-form label strong {
  color: var(--orange-dark);
}

.desktop-waitlist-form input {
  min-width: 0;
  min-height: clamp(34px, 2.8vw, 42px);
  padding: 7px 11px;
  border-radius: 14px;
  font-size: clamp(.9rem, 1vw, 1rem);
}

.desktop-waitlist-form button[type="submit"] {
  width: 100%;
  min-height: clamp(38px, 3.05vw, 46px);
  margin-top: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fffaf1;
  box-shadow: 0 12px 24px rgba(216, 117, 32, .24);
}

.desktop-waitlist-panel .form-message {
  min-height: 13px;
  margin-top: 4px;
  font-size: clamp(.72rem, .82vw, .84rem);
}

.desktop-waitlist-panel .form-footnote {
  max-width: 430px;
  margin-top: 7px;
  font-size: clamp(.68rem, .76vw, .78rem);
  line-height: 1.3;
}

.desktop-success-state[hidden] { display: none; }
.desktop-success-state h2 { color: var(--joined-dark); }
.desktop-success-state p { color: rgba(47, 35, 29, .72); }
.desktop-success-state p:first-of-type { margin-top: 13px; }

.landing-cta:hover { transform: translateY(-1px); box-shadow: 0 17px 34px rgba(216, 117, 32, .34); }
.landing-cta:active { transform: translateY(0); }
.landing-cta.is-joined,
.landing-cta:disabled {
  cursor: default;
  background: linear-gradient(135deg, var(--joined), var(--joined-dark));
  color: #f8fff3;
  box-shadow: 0 10px 24px rgba(77, 112, 62, .22);
  transform: none;
}

.waitlist-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(47, 35, 29, .48);
  overscroll-behavior: contain;
}

.waitlist-modal-backdrop[hidden] { display: none; }

.waitlist-card {
  position: relative;
  width: min(390px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 28px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .42), rgba(255, 244, 226, .22) 48%, rgba(255, 218, 174, .18)),
    rgba(255, 250, 241, .24);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow:
    0 28px 78px rgba(67, 39, 19, .24),
    inset 0 1px 0 rgba(255, 255, 255, .78),
    inset 0 -1px 0 rgba(255, 255, 255, .24);
  animation: modalIn .18s ease-out both;
  scrollbar-width: thin;
}

.waitlist-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 42%;
  pointer-events: none;
  border-radius: 27px 27px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0));
}

.waitlist-card > * {
  position: relative;
  z-index: 1;
}

.waitlist-card h1 {
  margin: 0 34px 14px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.05vw, 1.72rem);
  line-height: 1.05;
  color: #4a2c1f;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  background: rgba(255, 253, 248, .72);
  color: rgba(74, 44, 31, .74);
  font-family: Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 5px 16px rgba(74, 44, 31, .12);
}

label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  color: rgba(74, 44, 31, .78);
}

label span {
  display: block;
  flex: 0 0 96px;
  margin-bottom: 0;
  line-height: 1.1;
  white-space: nowrap;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(124, 79, 43, .28);
  border-radius: 15px;
  padding: 8px 11px;
  background: rgba(255, 253, 248, .9);
  color: var(--ink);
  font-size: .9rem;
  outline: none;
}

input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(244, 154, 69, .18);
}

.waitlist-card button[type="submit"] {
  width: 100%;
  min-height: 44px;
  margin-top: 3px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fffaf1;
  box-shadow: 0 14px 26px rgba(216, 117, 32, .28);
}

.waitlist-card button[disabled] { cursor: wait; opacity: .7; }
.form-message { min-height: 15px; margin: 6px 0 0; font-size: .82rem; font-weight: 700; color: #9b3f20; }
.form-message:empty { display: none; }
.privacy-copy { margin: 8px 0 0; text-align: center; font-size: .74rem; color: rgba(74, 44, 31, .68); }
.form-footnote {
  margin: 13px auto 0;
  max-width: 300px;
  text-align: center;
  font-size: .74rem;
  line-height: 1.45;
  color: rgba(87, 112, 78, .62);
}

.thank-you-state {
  padding: 38px 8px 18px;
  text-align: center;
}

.thank-you-state[hidden] { display: none; }
.thank-you-state h2 { margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; line-height: 1.12; color: #4a2c1f; }
.thank-you-state p { margin: 0 auto; max-width: 300px; color: rgba(47, 35, 29, .76); line-height: 1.5; }
.thank-you-state button {
  width: 100%;
  min-height: 46px;
  margin-top: 24px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fffaf1;
  box-shadow: 0 14px 26px rgba(216, 117, 32, .24);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 768px) {
  .landing-cta-group { display: none; }
}

@media (max-width: 767px) {
  .hero-shell {
    width: 100%;
    max-width: 100%;
  }

  .desktop-waitlist-panel { display: none; }

  .landing-cta-group {
    position: absolute;
    top: 87.4%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(84%, 330px);
    margin: 0;
    transform: translateX(-50%);
  }

  .landing-cta {
    min-height: 42px;
    padding: 9px 14px;
    font-size: clamp(.64rem, 2.8vw, .78rem);
    line-height: 1.1;
  }

  .landing-cta-support {
    margin-top: 11px;
    font-size: clamp(.66rem, 2.65vw, .72rem);
  }

  .landing-cta:hover,
  .landing-cta:active,
  .landing-cta.is-joined,
  .landing-cta:disabled { transform: none; }

  .waitlist-modal-backdrop {
    align-items: end;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .waitlist-card {
    width: min(100%, 430px);
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 20px 18px max(18px, env(safe-area-inset-bottom));
    border-radius: 26px;
  }

  .waitlist-card h1 {
    margin-bottom: 12px;
    font-size: clamp(1.28rem, 5.5vw, 1.5rem);
  }

  label {
    display: block;
    margin-bottom: 9px;
    font-size: .68rem;
    line-height: 1.1;
  }

  label span {
    width: auto;
    margin-bottom: 5px;
    white-space: nowrap;
  }

  input {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .waitlist-card button[type="submit"] { min-height: 48px; }
  .privacy-copy { font-size: .7rem; }
}

@media (max-width: 390px) {
  .landing-cta-group {
    width: min(84%, 318px);
  }

  .landing-cta {
    min-height: 40px;
    padding: 8px 12px;
    font-size: .62rem;
  }

  .landing-cta-support {
    margin-top: 10px;
    font-size: .66rem;
  }
  .waitlist-card { padding-right: 16px; padding-left: 16px; }
  .modal-close { top: 10px; right: 10px; }
}

@media (max-width: 340px) {
  .landing-cta-group {
    width: min(84%, 286px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-cta { transition: none; }
  .waitlist-card { animation: none; }
}
