/*
 * Threshold landing — brand kit
 *
 * Type: Cardo (Google Fonts) throughout.
 * Palette: #323332 text/logo, #FFFFFF + #EDFCFF backgrounds,
 *          #AACFD5 / #AAEDFC reserved as subtle accents only.
 * Style: editorial / legal document — strong grid, generous margins,
 *        thin rules, rectangular sections. No shadows, no rounded
 *        corners, no gradients, no icons, no stock visuals.
 */

:root {
  --ink: #323332;
  --ink-strong: #171717;
  --paper: #ffffff;
  --paper-tint: #edfcff;
  --accent: #aacfd5;
  --accent-bright: #aaedfc;
  --rule: #323332;
  --measure: 64rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cardo", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem var(--gutter);
}

.wordmark {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ---------- main column ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- intro ---------- */

.intro {
  padding: 4.5rem 0 3rem;
  border-bottom: none;
}

h1 {
  font-family: inherit;
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
  max-width: 24ch;
}

h1 em {
  font-style: italic;
  font-weight: 400;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 38rem;
  margin: 0;
}

/* ---------- thin rule between sections ---------- */

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- generic section head ---------- */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  margin: 0 0 2rem;
}

h2 {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.section-head p {
  margin: 0;
  max-width: 36rem;
  color: var(--ink);
}

/* ---------- demos ---------- */

.demos {
  padding: 3rem 0;
}

.demo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.demo-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 14rem;
  display: flex;
}

.demo-cell > a,
.demo-cell > span:first-child,
.demo-cell > :where(.demo-index) {
  /* fall-through for non-link cells */
}

.demo-cell > a,
.demo-cell {
  position: relative;
}

.demo-cell a,
.demo-cell--pending {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  width: 100%;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  transition: background-color 120ms ease;
}

.demo-cell a:hover,
.demo-cell a:focus-visible {
  background: var(--paper-tint);
  outline: none;
}

.demo-cell a:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.demo-index {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.demo-name {
  font-size: 1.25rem;
  line-height: 1.25;
  align-self: end;
}

.demo-action {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.demo-cell--pending {
  color: var(--ink);
  opacity: 0.55;
}

.demo-cell--pending .demo-action {
  font-style: italic;
}

@media (max-width: 700px) {
  .demo-list {
    grid-template-columns: 1fr;
  }
  .demo-cell {
    min-height: 9rem;
  }
}

/* ---------- signup ---------- */

.signup {
  padding: 3rem 0;
  background: var(--paper-tint);
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.signup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  max-width: 38rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.signup-form input[type="email"] {
  font: inherit;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  color: var(--ink);
  outline: none;
}

.signup-form input[type="email"]::placeholder {
  color: var(--ink);
  opacity: 0.45;
}

.signup-form input[type="email"]:focus {
  background: var(--paper);
}

.signup-form button[type="submit"] {
  font: inherit;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 0 1.75rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  min-height: 100%;
  transition: background-color 120ms ease, color 120ms ease;
}

.signup-form button[type="submit"]:hover,
.signup-form button[type="submit"]:focus-visible {
  background: var(--ink-strong);
  outline: none;
}

.form-note {
  margin: 1rem 0 0;
  font-style: italic;
  color: var(--ink);
}

.form-note[data-state="error"] {
  font-style: normal;
  color: var(--ink-strong);
  border-left: 2px solid var(--ink-strong);
  padding-left: 0.75rem;
}

@media (max-width: 540px) {
  .signup-form {
    grid-template-columns: 1fr;
  }
  .signup-form input[type="email"] {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .signup-form button[type="submit"] {
    padding: 1rem;
  }
}

/* ---------- colophon ---------- */

.colophon {
  padding: 2.5rem 0 4rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.colophon p {
  margin: 0;
}

.colophon-logo {
  display: block;
  height: 1.5rem;
  width: auto;
}

/* ---------- a11y ---------- */

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