:root {
  --bg: #F7F5F0;
  --fg: #111111;
  --muted: #5c5a55;
  --column: 620px;
  --gutter: 24px;
  /* Text scales with the screen so the whole page fits without scrolling */
  --text: clamp(15px, min(2.55vh, 5vw), 22px);
}
@supports (height: 100svh) {
  :root { --text: clamp(15px, min(2.55svh, 5vw), 22px); }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--text);
  line-height: 1.5;
  letter-spacing: -0.015em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* One screen, no scrolling. Very short screens (e.g. a phone in landscape)
   still scroll so nothing gets cut off. */
@media (min-height: 480px) {
  html, body { overflow: hidden; }
  body { height: 100vh; height: 100svh; }
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  padding: 8px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.wordmark {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.header-link {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
}
.header-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Manifesto: centered column, left-aligned text, vertically centered */
.manifesto {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 1em var(--gutter);
  text-align: left;
}

.block {
  margin: 0 0 1.15em;
  text-wrap: pretty;
}
.block:last-child { margin-bottom: 0; }

/* CTA */
.cta { padding-top: 0.35em; }

.button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.75em;
  padding: 0 1.6em;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.button:hover { background: #2a2a2a; }
.button:active { transform: scale(0.98); }
.button:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Footer */
.site-footer {
  flex: none;
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter) max(18px, env(safe-area-inset-bottom));
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.005em;
}
.site-footer p { margin: 0; }
.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Waitlist overlay ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Blur the page behind the overlay */
body > :not(.waitlist) {
  transition: filter 0.3s ease, opacity 0.3s ease;
}
body.is-modal-open > :not(.waitlist) {
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.waitlist {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(72px, env(safe-area-inset-top)) var(--gutter) max(32px, env(safe-area-inset-bottom));
  border: 0;
  background: transparent;
  color: var(--fg);
  overflow-y: auto;
}
.waitlist[open] {
  display: grid;
  justify-items: center;
  align-items: start;
  align-items: safe center;
  animation: wl-fade 0.3s ease;
}
.waitlist::backdrop {
  background: rgba(247, 245, 240, 0.35);
}
@keyframes wl-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.waitlist-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--fg);
  font: 300 28px/1 "Inter Tight", sans-serif;
  cursor: pointer;
  border-radius: 999px;
}
.waitlist-close:hover { background: rgba(17, 17, 17, 0.06); }

.waitlist-form,
.waitlist-handoff {
  width: 100%;
  max-width: 380px;
}

.wl-input {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 16px; /* 16px stops iOS from zooming in */
  letter-spacing: -0.01em;
  height: 48px;
  line-height: 24px;
  padding: 12px 0;
  outline: none;
}
.wl-input::placeholder { color: #8a8780; opacity: 1; }
.wl-label {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
}

.wl-phone-row {
  display: flex;
  align-items: center;
  margin-top: 6px;
  border-bottom: 1px solid #c9c6be;
  transition: border-color 0.2s ease;
}
.wl-phone-row:focus-within { border-bottom-color: var(--fg); }
.wl-phone { flex: 1; min-width: 0; }
.wl-phone-row .iti { flex: 1; min-width: 0; height: 48px; font-size: 16px; }
.wl-phone-row .iti input { width: 100%; height: 48px; line-height: 24px; }
.wl-phone-row .iti__selected-country { min-height: 0; height: 100%; line-height: 24px; }
.wl-phone-row .iti__selected-country-primary { padding-left: 0; }
.wl-phone-help { margin-top: 9px; }
.waitlist {
  --iti-country-selector-bg: var(--bg);
  --iti-border-color: #c9c6be;
  --iti-hover-color: rgba(17, 17, 17, 0.06);
  --iti-search-icon-color: var(--muted);
}
.seren-phone-selector {
  z-index: 20;
  max-width: calc(100vw - var(--gutter) * 2);
  font-family: inherit;
  font-size: 15px;
}
.seren-phone-selector .iti__country-selector {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.12);
}
.seren-phone-selector .iti__search-input { font-size: 16px; font-family: inherit; }
.seren-phone-selector .iti__country-list { max-height: min(220px, 35dvh); }
.seren-phone-selector .iti__country { min-height: 42px; }

.wl-submit {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  border: 0;
  background: none;
  color: var(--fg);
  font: 400 16px/1 "Inter Tight", sans-serif;
  cursor: pointer;
  border-radius: 6px;
}
.wl-submit:hover { background: rgba(17, 17, 17, 0.06); }
.wl-submit:disabled { opacity: 0.4; cursor: default; }

.wl-input:focus-visible { outline: none; }

.wl-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
}
.wl-note a { color: var(--fg); text-underline-offset: 2px; }
.wl-note.is-error { color: #a1281c; }

.waitlist-handoff h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.wl-handoff-copy { margin: 0 0 14px; font-size: 15px; }
.wl-open-messages { margin-top: 4px; font-size: 16px; }
.wl-destination { white-space: nowrap; }
.wl-message {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #c9c6be;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font: 400 16px/1.5 "Inter Tight", sans-serif;
  resize: vertical;
}
.wl-secondary-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; }
.wl-text-button {
  appearance: none;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: 500 14px/1.5 "Inter Tight", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#wl-copy-note:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .waitlist[open] { animation: none; }
  body > :not(.waitlist) { transition: none; }
}
