/* HEARTH waitlist landing page.
   Tokens from the NEXUS ROBOTICS design system, light theme.
   Square corners everywhere. One accent, fill only. */

:root {
  --bg: #f7f7ed;
  --surface-1: #eeefe3;
  --surface-2: #e3e5d6;
  --text: #0b0f0e;
  --text-muted: #55605a;
  --accent: #b7ff3c;
  --accent-hover: #a8eb37;
  --accent-ink: #366b00;
  --on-accent: #111111;
  --border: #c8ccbd;

  --font-display: "Space Grotesk", "Archivo Narrow", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-48: 48px;
  --space-96: 96px;

  --gutter: 16px;
  --section-pad: 48px;
  --content-width: 1314px;
  --control-height: 58px;
}

@media (min-width: 720px) {
  :root {
    --gutter: 63px;
    --section-pad: 96px;
  }
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

a {
  color: var(--text);
  transition: color 0.1s linear;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus {
  left: 8px;
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.h1 {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2 {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.h3 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
}

@media (min-width: 720px) {
  .h1 {
    font-size: 64px;
  }

  .h2 {
    font-size: 40px;
  }
}

.lede {
  font-size: 20px;
  line-height: 1.5;
}

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

.small {
  font-size: 15px;
  line-height: 1.5;
}

.data {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.mono-link {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

@media (min-width: 720px) {
  .mono-link--nav {
    font-size: 16px;
  }
}

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  width: 100%;
  padding: var(--section-pad) var(--gutter);
  background: var(--bg);
}

.section--raised {
  background: var(--surface-1);
}

.stack-8 {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.stack-24 {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.center {
  align-items: center;
  text-align: center;
}

/* ---------- header ---------- */

.site-header {
  width: 100%;
  padding: var(--space-24) var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand svg {
  display: block;
  flex-shrink: 0;
}

/* ---------- hero ---------- */

.hero-copy {
  max-width: 900px;
}

.hero-lede {
  max-width: 620px;
}

.form-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  width: 100%;
  padding-top: var(--space-24);
}

.form-inline {
  margin: 0;
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

@media (min-width: 720px) {
  .form-inline {
    flex-direction: row;
    align-items: flex-start;
  }
}

.form-inline .field {
  flex-grow: 1;
  min-width: 0;
}

/* ---------- controls ---------- */

.input,
.select {
  width: 100%;
  height: var(--control-height);
  margin: 0;
  padding: 0 var(--space-16);
  background: transparent;
  border: 2px solid var(--text);
  border-radius: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

.select {
  padding-right: 48px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%230b0f0e' stroke-width='2' stroke-linecap='square'><polyline points='3 6 8 11 13 6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

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

.input[aria-invalid="true"] {
  border-color: var(--accent-ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height);
  margin: 0;
  padding: 22px 36px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--on-accent);
  border: 0;
  transition: background-color 0.1s linear;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary:disabled {
  cursor: default;
  opacity: 0.7;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--text);
  padding: 20px 34px;
}

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

/* Honeypot: hidden from people, present for bots. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- form messages ---------- */

.form-msg {
  display: none;
  align-items: flex-start;
  gap: var(--space-8);
  width: 100%;
  max-width: 620px;
  text-align: left;
  color: var(--text);
}

.form-msg.is-visible {
  display: flex;
}

.form-msg svg {
  display: block;
  flex-shrink: 0;
}

.form-msg p {
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- product figure ---------- */

.product-figure {
  margin: 0;
  width: 100%;
  height: 360px;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-24) var(--gutter);
}

@media (min-width: 720px) {
  .product-figure {
    height: 720px;
  }
}

.product-figure .art {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  width: 100%;
  min-height: 0;
}

.product-figure svg {
  display: block;
  width: 100%;
  max-width: 358px;
  height: auto;
}

@media (min-width: 720px) {
  .product-figure svg {
    max-width: 620px;
  }
}

.product-figure figcaption {
  text-align: center;
}

/* ---------- features ---------- */

.features {
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
}

@media (min-width: 720px) {
  .features {
    gap: var(--space-96);
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-48);
}

@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.feature svg {
  display: block;
  color: var(--text);
}

.feature p {
  color: var(--text-muted);
}

/* ---------- how it works ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-48);
  align-items: start;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.split-intro p.muted {
  max-width: 460px;
}

.steps {
  display: flex;
  flex-direction: column;
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-24) 0 var(--space-48) 0;
  border-top: 1px solid var(--border);
}

.step .num {
  color: var(--accent-ink);
}

.step p {
  color: var(--text-muted);
  max-width: 560px;
}

/* ---------- why not an app ---------- */

.why {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-48);
}

.why .heading {
  max-width: 900px;
}

.why p {
  max-width: 620px;
  text-align: center;
}

/* ---------- join ---------- */

.join {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.join .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-24);
  text-align: center;
}

.join .intro {
  max-width: 620px;
}

.form-grid {
  margin: 0;
  width: 100%;
  max-width: 760px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
}

@media (min-width: 720px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-grid .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  text-align: left;
}

.form-grid .field label {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

.form-grid .btn {
  width: 100%;
  align-self: end;
}

.form-grid .form-msg {
  max-width: none;
}

@media (min-width: 720px) {
  .form-grid .form-msg {
    grid-column: 1 / -1;
  }
}

/* Success panel replaces the form. */
.success {
  display: none;
  width: 100%;
  max-width: 760px;
  padding: var(--space-24);
  background: var(--surface-1);
  flex-direction: column;
  align-items: center;
  gap: var(--space-24);
  text-align: center;
}

@media (min-width: 720px) {
  .success {
    padding: var(--space-48);
  }
}

.success.is-visible {
  display: flex;
}

.success p {
  max-width: 460px;
}

.share {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  width: 100%;
}

@media (min-width: 720px) {
  .share {
    flex-direction: row;
  }
}

.share .input {
  flex-grow: 1;
  min-width: 0;
  font-size: 15px;
}

/* The hero success is the raised panel on the page background. */
.section:not(.section--raised) .success {
  background: var(--surface-1);
}

.section--raised .success {
  background: var(--bg);
}

/* ---------- footer ---------- */

.site-footer {
  width: 100%;
  padding: var(--space-48) var(--gutter);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  text-align: center;
}

.site-footer nav {
  display: flex;
  gap: var(--space-24);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- inner pages (privacy) ---------- */

.prose {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.prose h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  padding-top: var(--space-24);
  border-top: 1px solid var(--border);
}

.prose ul {
  margin: 0;
  padding-left: 20px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
