/*
  PRELAUNCH1 — rooftelli.com, the temporary pre-launch site.

  Hand-written CSS, no build step, no preprocessor, no framework. This site is
  disposable by design (retired at Phase A cutover — see site/README.md), and a
  disposable artifact must cost nothing to own.

  ⚠ NO EXTERNAL ORIGINS. Fonts are self-hosted in /fonts. There is no CDN, no
  Google Fonts link, no analytics and no tag manager anywhere on this site.
  `apps/api/test/prelaunch-site.test.ts` fails on any `http(s)://` in this
  file. See the header comment in index.html for why that is a policy matter
  and not a preference.

  Brand: sky #67a3c5, ink #10151b, Space Grotesk (headings) + IBM Plex Sans
  (body), per docs/brand/.
*/

/* --------------------------------- fonts --------------------------------- */
/*
  Self-hosted from @fontsource (SIL Open Font License — licences are alongside
  the files in /fonts). `font-display: swap` so text is readable immediately
  rather than invisible while a face downloads; on a phone in a driveway that
  matters more than a moment of the fallback face.
*/
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

/* --------------------------------- tokens -------------------------------- */
:root {
  --sky: #67a3c5;
  --sky-deep: #3f7fa4;
  --ink: #10151b;
  --ink-soft: #4a545f;
  --line: #dfe5ea;
  --paper: #ffffff;
  --paper-tint: #f5f8fa;
  --ok: #1c6b4a;
  --bad: #a3341f;

  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --wide: 68rem;
  --radius: 14px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--sky-deep);
}

a:hover {
  color: var(--ink);
}

/* Visible keyboard focus everywhere — the default ring is easy to lose on tinted panels. */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 2px solid var(--sky);
}

/* --------------------------------- header -------------------------------- */
.bar {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.4rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

.brand__mark {
  flex: none;
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand__word-accent {
  color: var(--sky-deep);
}

/* ---------------------------------- hero --------------------------------- */
.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin-bottom: 0.9rem;
}

.hero__title {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  max-width: 20ch;
}

.hero__lede {
  margin-top: 1.15rem;
  max-width: 54ch;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
}

/* -------------------------------- waitlist ------------------------------- */
.waitlist {
  margin-top: 2.25rem;
  max-width: 34rem;
}

.waitlist__label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.waitlist__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.waitlist__input {
  flex: 1 1 16rem;
  min-width: 0;
  font: inherit;
  color: inherit;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.waitlist__input:focus {
  border-color: var(--sky);
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--sky-deep);
  border-radius: 10px;
  background: var(--sky-deep);
  color: var(--paper);
  cursor: pointer;
}

.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.waitlist__note {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.waitlist__note:empty {
  display: none;
}

.waitlist__note--ok {
  color: var(--ok);
  font-weight: 600;
}

.waitlist__note--bad {
  color: var(--bad);
  font-weight: 600;
}

/*
  The honeypot.

  Deliberately NOT `display: none` alone: some bots skip anything with that
  rule, and the point is that they should fill it in. This takes it out of the
  visual and accessibility trees while leaving it a perfectly ordinary text
  input to something parsing the HTML.
*/
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* -------------------------------- sections ------------------------------- */
.section {
  padding: 3.5rem 1.25rem;
}

.section--tint {
  background: var(--paper-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__title {
  max-width: var(--wide);
  margin: 0 auto 1.9rem;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
}

/*
  Two columns, not `auto-fit`. There are exactly four cards, and auto-fit found
  room for three on a desktop — which left one stranded on its own row looking
  like an afterthought. Two columns give a 2x2 block at any width that can hold
  it, and the single-column stack below that.
*/
.cards {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--paper);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: rgba(103, 163, 197, 0.15);
  color: var(--sky-deep);
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.card__body {
  color: var(--ink-soft);
}

.card__note {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/*
  Shares the page's container geometry so prose starts on the same left edge as
  the headings, instead of centring itself against the full viewport — which
  read as an accidental indent next to a left-aligned h2.
*/
.measure {
  max-width: var(--wide);
  margin: 0 auto;
}

.prose {
  /* Capped for readability; left-aligned within .measure, not centred. */
  max-width: 62ch;
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.prose:last-child {
  margin-bottom: 0;
}

/* --------------------------------- footer -------------------------------- */
.foot {
  padding: 2.5rem 1.25rem 3.5rem;
}

.foot__line {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ------------------------------- preferences ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
