/* Terrain landing page. Colours and fonts are set here, once. */
:root {
  --ink: #121212;
  --paper: #ffffff;
  --mist: #f4f4f4;                 /* grey panels */
  --line: rgba(18, 18, 18, 0.10);  /* hairlines */
  --font: "Stack Sans Headline", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 2.5vw, 32px);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2 { font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 1.9rem); line-height: 1.15; letter-spacing: -0.01em; }

a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Pills (buttons and labels) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}
.pill-dark { min-height: 56px; background: var(--ink); color: #fff; }
a.pill { transition: transform 0.15s ease; }
a.pill:hover { transform: scale(1.03); }

/* ---------- Waitlist form ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.waitlist { width: min(420px, 100%); text-align: left; scroll-margin-top: 140px; }
.waitlist-field {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 10px 30px -12px rgba(18, 18, 18, 0.35);
}
.waitlist-field:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.waitlist input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 8px 0 18px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 400 16px var(--font);
  letter-spacing: 0.01em;
  outline: none;
}
.waitlist input::placeholder { color: rgba(18, 18, 18, 0.45); }
.waitlist button { min-height: 48px; border: 0; font-family: var(--font); cursor: pointer; transition: transform 0.15s ease; }
.waitlist button:hover { transform: scale(1.03); }
.waitlist button:disabled { opacity: 0.6; cursor: default; transform: none; }
.waitlist-note { display: inline-block; margin: 10px 0 0 8px; padding: 6px 16px; border-radius: 100px; background: #fff; font-size: 14px; font-weight: 400; }
.waitlist-note:empty { display: none; }
.waitlist-note.is-error { color: #b3261e; }
.waitlist.is-done .waitlist-field { display: none; }
.hero .waitlist.is-done { text-align: center; }
.waitlist.is-done .waitlist-note {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  margin: 0;
  padding: 0 24px;
  border-radius: 100px;
  background: #fff;
  font-size: 16px;
}

/* ---------- Top bar ---------- */
.bar {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 8px 8px;
  border-radius: 18px;
  background: rgba(244, 244, 244, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); line-height: 0; border-radius: 4px; }
.wordmark img { width: 40px; height: 40px; }
.bar-note { font-size: 14px; font-weight: 400; opacity: 0.6; white-space: nowrap; }
@media (max-width: 420px) { .bar-note span { display: none; } }   /* small phones: just "Coming soon" */
.wordmark svg { height: 28px; width: 110px; }

/* ---------- Phone frame ----------
   Set --w on a .phone to size it. Everything else scales from that. */
.phone {
  --w: 250px;
  width: var(--w);
  flex: none;
  border: calc(var(--w) * 0.026) solid var(--ink);
  border-radius: calc(var(--w) * 0.16);
  background: var(--ink);
  overflow: hidden;
}
.phone img { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: clamp(150px, 20vh, 210px) var(--gutter) 0;
  text-align: center;
  overflow: hidden;
  overflow: clip;              /* clip, so jumping to the form can't scroll the photo */
  isolation: isolate;
  background: #d6d6d6;
}
.hero::before {                  /* the photo */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 55%),
    url("images/hero.jpg") center bottom / cover no-repeat;
  filter: grayscale(1);          /* delete this line to show the photo in colour */
}
.hero h1 { max-width: 12.5em; }
.hero-phone {
  --w: clamp(260px, 30vw, 362px);
  margin-top: 16px;
  margin-bottom: calc(var(--w) * -0.95);   /* lets the phone run off the bottom */
}

/* ---------- Features ---------- */
.features { background: var(--mist); padding: clamp(64px, 9vw, 104px) var(--gutter) var(--gutter); }
.features h2 { text-align: center; }
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.card { background: var(--paper); border-radius: 24px; padding: 12px 12px 28px; }
.card h3 { margin: 20px 16px 0; font-size: 14px; font-weight: 400; opacity: 0.5; }
.card h3 + p { margin-top: 56px; }
.card-shot {
  display: flex;
  justify-content: center;
  height: clamp(300px, 30vw, 360px);
  padding-top: 40px;
  border-radius: 16px;
  background: var(--mist);
  overflow: hidden;
}
.card p { margin: 22px 16px 0; max-width: 17em; font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }

/* ---------- Questions ---------- */
.faq { padding: clamp(72px, 11vw, 136px) var(--gutter); }
.faq h2 { text-align: center; }
.faq-list { max-width: 552px; margin: clamp(32px, 5vw, 48px) auto 0; display: grid; gap: 8px; }
details { border: 1px solid var(--line); border-radius: 14px; }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 24px;
  border-radius: 14px;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {                 /* the plus, which turns into a cross when open */
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 100% no-repeat;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 56px 22px 24px; font-size: 16px; line-height: 1.5; opacity: 0.72; }

/* ---------- Closing ---------- */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 1.47fr) minmax(0, 1fr);
  gap: 16px;
  padding: 0 var(--gutter);
}
.closing > div { background: var(--mist); border-radius: 24px; min-height: 550px; }
.closing-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 24px clamp(24px, 4vw, 40px);
}
.closing-copy p { margin-top: 12px; font-size: 16px; }
.closing-copy .waitlist { margin-top: 28px; }
.closing-shot { display: flex; align-items: center; justify-content: center; padding: 24px; }
.closing-shot .phone { --w: 230px; }

/* ---------- Footer ---------- */
footer { padding: 56px var(--gutter) 0; overflow: hidden; }
.footer-top { display: grid; gap: 14px; max-width: 250px; font-size: 14px; font-weight: 400; }
.footer-top a:not(.wordmark) { color: inherit; }
.big {
  margin-top: clamp(32px, 6vw, 72px);
  text-align: center;
  white-space: nowrap;
  font-size: clamp(2.6rem, 11.5vw, 9.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(18, 18, 18, 0.10);
  padding-bottom: 12px;
}

/* ---------- Phones and small tablets ---------- */
@media (max-width: 760px) {
  .cards, .closing { grid-template-columns: 1fr; }
  .closing > div { min-height: 0; }
  .closing-copy { padding-block: 48px; }
  .closing-shot { padding-block: 40px; }
  details p { padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.pill, .waitlist button, summary::after { transition: none; }
}
