/* =============================================================
   THE TERRAIN — Single-viewport landing page
   Layout: nav / main / footer-bar  (100dvh grid)
   Design: Playfair Display headlines · Inter sans · topo texture
   Colors: Ivory bg · Navy text · Gold accents
   ============================================================= */

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

:root {
  --bg:         #F3F1EC;
  --text:       #0E2347;
  --text-dim:   rgba(14, 35, 71, 0.52);
  --text-muted: #6B7C93;
  --gold:       #8F7A4F;
  --rule:       rgba(14, 35, 71, 0.1);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --pad-x: clamp(2rem, 5.5vw, 4.5rem);
}

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-sans);
  font-weight: 300;
}

body {
  background-color: var(--bg);
  background-image: url("topo-texture.svg");
  background-repeat: repeat;
  background-size: 600px 600px;
  background-attachment: fixed;
  color: var(--text);
}

/* =============================================================
   PAGE — three-row grid pinned to viewport height
   ============================================================= */
.page {
  height: 100dvh;
  min-height: 580px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

/* =============================================================
   NAV
   ============================================================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem var(--pad-x);
  border-bottom: 1px solid var(--rule);
}

.nav-brand {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-est {
  font-family: var(--font-sans);
  font-size: 0.63rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* =============================================================
   MAIN — vertically centred content block
   ============================================================= */
.main {
  display: flex;
  align-items: center;
  padding: 2rem var(--pad-x);
  overflow: hidden;
}

.main-inner {
  width: 100%;
  max-width: 700px;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: clamp(0.9rem, 2vh, 1.4rem);
}

/* Headline */
.headline {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.2vw, 5.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: clamp(1rem, 2.5vh, 1.5rem);
}

.headline-gold {
  font-style: normal;
  color: var(--gold);
}

/* Sub */
.sub {
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 460px;
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

/* Gold divider */
.divider {
  width: 40px;
  height: 1px;
  background-color: var(--gold);
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

/* Pre-form trust note */
.pre-form-note {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

/* =============================================================
   EMAIL FORM
   ============================================================= */
.email-form {
  display: flex;
  max-width: 420px;
  margin-bottom: 0.6rem;
}

.email-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(14, 35, 71, 0.18);
  border-right: none;
  border-radius: 2px 0 0 2px;
  padding: 0.78rem 1rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  backdrop-filter: blur(4px);
}

.email-input::placeholder {
  color: var(--text-muted);
}

.email-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.88);
}

.email-submit {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  background-color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0 2px 2px 0;
  padding: 0.78rem 1.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.email-submit:hover {
  background-color: #162f5c;
  border-color: #162f5c;
}

.email-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-micro {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.form-success {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gold);
}

.form-error {
  font-size: 0.8rem;
  color: #b33a2a;
}

/* =============================================================
   FOOTER BAR — pinned to bottom
   ============================================================= */
.footer-bar {
  border-top: 1px solid var(--rule);
  padding: 0 var(--pad-x);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-pillars {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.footer-dot {
  color: var(--gold);
  font-size: 0.45rem;
  line-height: 1;
}

.footer-slogan {
  font-family: var(--font-serif);
  font-size: clamp(0.72rem, 0.9vw, 0.85rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =============================================================
   MOBILE  ≤ 600px — allow scroll, stack form
   ============================================================= */
@media (max-width: 600px) {
  .page {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .main {
    padding: 2.5rem var(--pad-x) 3rem;
    align-items: flex-start;
  }

  .email-form {
    flex-direction: column;
    max-width: 100%;
  }

  .email-input {
    border-right: 1px solid rgba(14, 35, 71, 0.18);
    border-bottom: none;
    border-radius: 2px 2px 0 0;
  }

  .email-input:focus {
    border-color: var(--gold);
  }

  .email-submit {
    border-radius: 0 0 2px 2px;
  }

  .footer-slogan {
    display: none;
  }
}

/* =============================================================
   VERY SHORT SCREENS (landscape mobile, small laptops)
   ============================================================= */
@media (max-height: 650px) {
  .headline {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }

  .eyebrow {
    margin-bottom: 0.75rem;
  }

  .sub {
    margin-bottom: 1rem;
  }

  .divider {
    margin-bottom: 1rem;
  }
}
