/* Montserrat (SIL Open Font License) — self-hosted variable font, weights 400–700 */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ivory: #F6F1EA;
  --brown: #5C3B20;
  --brown-dark: #4A2F19;
  --bronze: #9E7246;
  --line: rgba(92, 59, 32, 0.18);
  --field-border: rgba(92, 59, 32, 0.28);
  --muted: rgba(92, 59, 32, 0.72);
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --pad-x: 8%;
  --pad-top: 56px;
  --pad-bottom: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--ivory); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  color: var(--brown);
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Page shell ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding:
    calc(var(--pad-top) + env(safe-area-inset-top, 0px))
    calc(var(--pad-x) + env(safe-area-inset-right, 0px))
    calc(var(--pad-bottom) + env(safe-area-inset-bottom, 0px))
    calc(var(--pad-x) + env(safe-area-inset-left, 0px));
}

.page__mark {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 58%;
  max-width: 820px;
  height: auto;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}

/* ---------- Header ---------- */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header__logo { display: block; height: 48px; width: auto; }
.header__rule { width: 120px; height: 4px; background: var(--bronze); flex-shrink: 0; }

/* ---------- Main ---------- */
.main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 72px 0;
  max-width: 760px;
}

.intro { display: flex; flex-direction: column; gap: 24px; }

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow::before {
  content: '';
  width: 40px;
  height: 1.5px;
  background: var(--bronze);
  flex-shrink: 0;
}

.title {
  margin: 0;
  font-weight: 600;
  font-size: 49px;
  line-height: 1.2;
  color: var(--brown);
}

.lede {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  max-width: 46ch;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.countdown__cell {
  flex: 1;
  min-width: 0;
  padding: 24px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.countdown__cell:first-child { padding-left: 0; border-left: 0; }
.countdown__num {
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* ---------- Sign-up form ---------- */
.signup { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.signup[hidden], .thanks[hidden] { display: none; }

.signup__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: 12px;
}
.field--email { grid-column: 1; grid-row: 1; }
/* Name/phone rows open by animating height (52px field + 12px gap = 64px).
   Height transitions run smoothly on every mobile browser. */
.signup__extra {
  grid-column: 1;
  overflow: hidden;
  height: 0;
  transition: height 420ms var(--ease);
}
.signup__extra--name { grid-row: 2; }
.signup__extra--phone { grid-row: 3; }
.signup__extra-inner { padding-top: 12px; }

.field {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming on focus */
  color: var(--brown);
  background: #FFFFFF;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  scroll-margin: 24px 0 120px; /* leave room for the fields/button below when the browser scrolls to a field */
}
.field::placeholder { color: rgba(92, 59, 32, 0.55); }
.field:focus { box-shadow: inset 0 -2px 0 var(--bronze); }

.signup__extra .field {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 320ms ease, transform 420ms var(--ease);
}
.signup__extra--name .field { transition-delay: 120ms, 80ms; }
.signup__extra--phone .field { transition-delay: 220ms, 160ms; }

.btn {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  white-space: nowrap;
  height: 52px;
  padding: 0 32px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ivory);
  background: var(--brown);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 200ms;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
.btn:hover { background: var(--brown-dark); }
.btn:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

/* Expanded state (email focused / submit tried) */
.signup.is-expanded .signup__extra { height: 64px; }
.signup.is-expanded .signup__extra .field { opacity: 1; transform: translateY(0); }
.signup.is-expanded .btn { grid-row: 3; }

.signup__error { font-size: 13px; color: var(--muted); min-height: 20px; }

.thanks {
  display: flex;
  align-items: stretch;
  gap: 14px;
  font-size: 16px;
  line-height: 1.5;
  max-width: 560px;
}
.thanks p { margin: 0; }
.thanks__bar { width: 4px; background: var(--bronze); flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.footer__tagline { letter-spacing: 0.2em; text-transform: uppercase; }
.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-style: normal;
}
.footer__contact a { color: var(--brown); text-decoration: none; }
.footer__contact a[href^="mailto:"] {
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-underline-offset: 3px;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  :root { --pad-x: 6%; --pad-top: 40px; }
  .main { padding: 56px 0; }
  .title { font-size: 42px; }
  .countdown__num { font-size: 48px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  :root { --pad-x: 20px; --pad-top: 24px; --pad-bottom: 28px; }

  .header__logo { height: 36px; }
  .header__rule { width: 64px; height: 3px; }

  .main { gap: 32px; padding: 48px 0 40px; justify-content: flex-start; }
  .intro { gap: 18px; }
  .eyebrow { font-size: 12px; gap: 12px; }
  .eyebrow::before { width: 28px; }
  .title { font-size: clamp(30px, 9vw, 40px); line-height: 1.15; }
  .lede { font-size: 16px; }

  .countdown__cell { padding: 18px 8px; gap: 8px; align-items: center; text-align: center; }
  .countdown__cell:first-child { padding-left: 8px; }
  .countdown__num { font-size: clamp(26px, 9vw, 40px); }
  .countdown__label { font-size: 10px; letter-spacing: 0.14em; }

  /* Single-column form: email, name, phone, then a full-width button */
  .signup__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
  }
  .btn,
  .signup.is-expanded .btn { grid-column: 1; grid-row: 4; width: 100%; margin-top: 12px; padding: 0 20px; }

  .page__mark { width: 110%; right: -30%; bottom: -4%; }

  .footer { flex-direction: column; gap: 14px; font-size: 14px; }
  .footer__tagline { font-size: 13px; }
  .footer__contact { flex-direction: column; gap: 6px; font-weight: 500; }
  .footer__contact a { padding: 2px 0; }
}

@media (max-width: 360px) {
  .countdown__cell { padding: 16px 4px; }
  .countdown__label { letter-spacing: 0.08em; }
}

/* Short landscape phones: don't force vertical centring */
@media (max-height: 520px) and (orientation: landscape) {
  .main { justify-content: flex-start; padding: 32px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; transition-delay: 0ms !important; }
}
