/* ============================================================
   SEF — Sustainable Emergency Furniture · seffurniture.com
   Design system: ollama (documentation-first radical restraint)
   Paper-white README column · black pills · hairline 12px cards
   No shadows. No gradients. One inverted moment per page.
   ============================================================ */

:root {
  /* color — tiny utility palette */
  --primary: #000000;        /* THE brand color: black pills, solid marks */
  --on-primary: #ffffff;
  --ink-deep: #090909;       /* pressed state */
  --ink: #000000;            /* headlines */
  --charcoal: #525252;       /* list items, feature bullets */
  --body: #737373;           /* paragraph default */
  --mute: #a3a3a3;           /* captions, assembly-card comments */
  --canvas: #ffffff;
  --surface-soft: #fafafa;   /* spec pills, chips */
  --surface-dark: #171717;   /* the single inverted look-here moment */
  --on-dark: #ffffff;
  --on-dark-mute: rgba(255, 255, 255, 0.7);
  --hairline: #e5e5e5;
  --hairline-strong: #d4d4d4;
  --focus-ring: rgba(59, 130, 246, 0.5);
  /* the single accent decision: safety orange, used sparingly */
  --accent: #e8500a;
  /* kraft tone: allowed inside product illustrations only, never page chrome */
  --kraft: #c8a877;

  /* type */
  --font-display: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* radius — binary vocabulary */
  --r-full: 9999px;   /* every button, pill input, snippet pill, dot */
  --r-card: 12px;     /* the few cards */
  --r-chip: 6px;      /* inline code chips. nothing else. */

  /* spacing (8px base) */
  --s-2: 2px;
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-24: 24px;
  --s-32: 32px;
  --section-air: 88px;

  /* measure */
  --col-read: 720px;
  --col-wide: 960px;
}

/* ---------- reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-chip);
}

::selection {
  background: var(--ink);
  color: var(--canvas);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* ---------- typography scale ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
}

h1 {
  font-size: 36px;
  line-height: 1.11;
}

h2 {
  font-size: 30px;
  line-height: 1.2;
}

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

h4 {
  font-size: 20px;
  line-height: 1.4;
}

p {
  font-size: 16px;
  line-height: 1.5;
}

.small {
  font-size: 14px;
  line-height: 1.43;
}

.caption {
  font-size: 12px;
  line-height: 1.33;
  color: var(--mute);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0;
}

code,
.chip {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-chip);
  padding: 1px 6px;
  color: var(--charcoal);
  white-space: nowrap;
}

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

.col {
  width: 100%;
  max-width: var(--col-read);
  margin-inline: auto;
  padding-inline: var(--s-24);
}

.col--wide {
  max-width: var(--col-wide);
}

.section {
  padding-block: var(--section-air) 0;
}

.section:last-of-type {
  padding-bottom: var(--section-air);
}

.section-rule {
  border: 0;
  border-top: 1px solid var(--hairline);
  max-width: var(--col-read);
  margin: var(--section-air) auto 0;
}

.section-head {
  margin-bottom: var(--s-32);
}

.section-head .eyebrow {
  display: block;
  margin-bottom: var(--s-12);
}

.section-head h2 {
  margin-bottom: var(--s-16);
}

.section-head .lede {
  color: var(--body);
}

.prose > p + p {
  margin-top: var(--s-16);
}

.prose h3 {
  margin: var(--s-32) 0 var(--s-12);
}

/* ---------- nav ---------- */

.site-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  height: 56px;
  max-width: var(--col-wide);
  margin-inline: auto;
  padding-inline: var(--s-24);
  display: flex;
  align-items: center;
  gap: var(--s-24);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark svg {
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.nav__menu {
  list-style: none;
  display: flex;
  gap: var(--s-24);
  margin-left: auto;
}

.nav__menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--charcoal);
}

.nav__menu a:hover,
.nav__menu a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}

.nav__cta {
  flex-shrink: 0;
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-full);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- buttons (pills only) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  height: 36px;
  padding: 8px 20px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

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

.btn--primary:hover,
.btn--primary:active {
  background: var(--ink-deep);
}

.btn--secondary {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--hairline-strong);
}

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

.btn--on-dark {
  background: var(--on-dark);
  color: var(--ink);
}

.btn--on-dark:hover {
  background: var(--surface-soft);
}

.btn--ghost-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost-dark:hover {
  border-color: var(--on-dark);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-12);
}

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

.hero {
  padding-block: var(--section-air);
  text-align: center;
}

.hero .eyebrow {
  display: block;
  margin-bottom: var(--s-16);
}

.hero h1 {
  margin-inline: auto;
  max-width: 640px;
}

.hero .lede {
  max-width: 560px;
  margin: var(--s-24) auto 0;
}

.hero .btn-row {
  justify-content: center;
  margin-top: var(--s-32);
}

.hero__mark {
  width: 190px;
  height: auto;
  margin: 0 auto var(--s-24);
  color: var(--ink);
}

.hero__meta {
  margin-top: var(--s-24);
  font-size: 14px;
  color: var(--mute);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-8) var(--s-16);
}

/* the signature spec-line pill (install-snippet analog) */
.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  margin-top: var(--s-32);
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--r-full);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--charcoal);
  text-align: left;
}

.spec-pill .arrow {
  color: var(--accent);
  font-weight: 500;
}

.spec-pill .dim {
  color: var(--mute);
}

/* ---------- readme-style rule list ---------- */

.rule-list {
  list-style: none;
  margin-top: var(--s-24);
  border-top: 1px solid var(--hairline);
}

.rule-list > li {
  padding: var(--s-16) 0;
  border-bottom: 1px solid var(--hairline);
}

.rule-list h4 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.56;
  margin-bottom: var(--s-4);
}

.rule-list p {
  color: var(--body);
}

/* ---------- assembly card (terminal analog) ---------- */

.assembly-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  margin-top: var(--s-32);
  overflow: hidden;
}

.assembly-card__bar {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-12) var(--s-16);
  border-bottom: 1px solid var(--hairline);
}

.assembly-card__bar .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
}

.dot--r { background: #ff5f56; }
.dot--y { background: #ffbd2e; }
.dot--g { background: #27c93f; }

.assembly-card__bar .title {
  margin-left: var(--s-8);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
}

.assembly-card__body {
  padding: var(--s-24) var(--s-32);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  color: var(--charcoal);
  overflow-x: auto;
}

.assembly-card__body .cmd {
  color: var(--ink);
  font-weight: 500;
}

.assembly-card__body .comment {
  color: var(--mute);
}

.assembly-card__body .ok {
  color: var(--ink);
  font-weight: 500;
}

.assembly-card__body pre {
  font: inherit;
  white-space: pre;
}

/* ---------- product line (pricing-grid analog) ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-16);
  margin-top: var(--s-32);
}

.product-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-32);
  display: flex;
  flex-direction: column;
}

.product-card__icon {
  width: 56px;
  height: 56px;
  color: var(--ink);
  margin-bottom: var(--s-16);
}

.product-card h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.product-card .sku {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  margin-top: var(--s-2);
}

.product-card .spec {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--charcoal);
  margin-top: var(--s-12);
}

.product-card p.desc {
  margin-top: var(--s-12);
  font-size: 14px;
  line-height: 1.43;
  color: var(--body);
}

.check-list {
  list-style: none;
  margin-top: var(--s-16);
  display: grid;
  gap: var(--s-8);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-8);
  font-size: 14px;
  line-height: 1.43;
  color: var(--charcoal);
}

.check-list svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--ink);
}

.product-card .btn {
  margin-top: var(--s-24);
  align-self: flex-start;
}

/* ---------- logistics spec table ---------- */

.spec-table {
  margin-top: var(--s-32);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
}

.spec-table > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-16);
  padding: var(--s-12) 0;
  border-bottom: 1px solid var(--hairline);
}

.spec-table dt {
  font-size: 14px;
  color: var(--mute);
}

.spec-table dd {
  font-size: 14px;
  color: var(--charcoal);
}

.spec-table dd b {
  color: var(--ink);
  font-weight: 500;
}

.figure {
  margin-top: var(--s-32);
}

.figure figcaption {
  margin-top: var(--s-12);
  font-size: 12px;
  line-height: 1.33;
  color: var(--mute);
}

.diagram {
  width: 100%;
  height: auto;
  color: var(--ink);
}

/* ---------- audience cards ---------- */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-16);
  margin-top: var(--s-32);
}

.audience-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-32);
}

.audience-card h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--s-8);
}

.audience-card .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  display: block;
  margin-bottom: var(--s-12);
}

.audience-card p {
  font-size: 14px;
  line-height: 1.43;
  color: var(--body);
}

/* ---------- honesty note ---------- */

.note {
  margin-top: var(--s-24);
  padding: var(--s-16) var(--s-24);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  font-size: 14px;
  line-height: 1.43;
  color: var(--body);
}

.note b {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- FAQ (always expanded) ---------- */

.faq {
  margin-top: var(--s-24);
  border-top: 1px solid var(--hairline);
}

.faq > div {
  padding: var(--s-16) 0;
  border-bottom: 1px solid var(--hairline);
}

.faq dt {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.56;
  color: var(--ink);
}

.faq dd {
  margin-top: var(--s-4);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}

/* ---------- CTA strip — THE inverted moment ---------- */

.cta-strip {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-card);
  padding: var(--s-32);
}

.cta-strip h2 {
  color: var(--on-dark);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
}

.cta-strip p {
  color: var(--on-dark-mute);
  margin-top: var(--s-8);
  max-width: 48ch;
}

.cta-strip .btn-row {
  margin-top: var(--s-24);
}

.cta-strip .mono-line {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--on-dark-mute);
  margin-top: var(--s-24);
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--section-air);
  padding: var(--s-32) 0 var(--s-24);
}

.site-footer .col {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-8) var(--s-24);
  font-size: 12px;
  line-height: 1.33;
  color: var(--body);
}

.footer__row a {
  color: var(--body);
}

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

.site-footer .wordmark {
  font-size: 16px;
}

.site-footer .wordmark svg {
  width: 22px;
  height: 22px;
}

/* ---------- contact page ---------- */

.page-head {
  padding-top: var(--section-air);
}

.page-head .eyebrow {
  display: block;
  margin-bottom: var(--s-12);
}

.page-head h1 {
  margin-bottom: var(--s-16);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-16);
  align-items: start;
  margin-top: var(--s-32);
}

.form-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-32);
}

.form-card h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
  margin-bottom: var(--s-8);
}

.form-card > p.small {
  color: var(--body);
  margin-bottom: var(--s-24);
}

.field {
  margin-bottom: var(--s-16);
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--s-8);
}

.field label .opt {
  font-weight: 400;
  color: var(--mute);
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 var(--s-16);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-full);
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23525252' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 40px;
}

.field textarea {
  width: 100%;
  min-height: 132px;
  padding: var(--s-12) var(--s-16);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card);
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--hairline-strong);
}

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

.field .hint {
  font-size: 12px;
  line-height: 1.33;
  color: var(--mute);
  margin-top: var(--s-4);
}

.field .error {
  display: none;
  font-size: 12px;
  line-height: 1.33;
  color: var(--accent);
  margin-top: var(--s-4);
}

.field .error.is-shown {
  display: block;
}

.form-status {
  display: none;
  gap: var(--s-12);
  align-items: flex-start;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-16);
  margin-bottom: var(--s-24);
}

.form-status.is-shown {
  display: flex;
}

.form-status svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--ink);
}

.form-status p b {
  color: var(--ink);
  font-weight: 500;
}

.form-status .caption {
  margin-top: var(--s-4);
}

.aside-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-32);
}

.aside-card + .aside-card,
.aside-card + .aside-dark {
  margin-top: var(--s-16);
}

.aside-card h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--s-16);
}

.contact-list {
  display: grid;
  gap: var(--s-16);
}

.contact-list > div {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--s-4) var(--s-12);
}

.contact-list svg {
  width: 18px;
  height: 18px;
  color: var(--ink);
  grid-row: span 2;
  margin-top: 2px;
}

.contact-list dt {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.contact-list dd {
  font-size: 14px;
  line-height: 1.43;
  color: var(--body);
}

/* contact page's single inverted moment */
.aside-dark {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-card);
  padding: var(--s-32);
}

.aside-dark h2 {
  color: var(--on-dark);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--s-16);
}

.aside-dark ol {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: var(--s-12);
}

.aside-dark ol li {
  counter-increment: step;
  display: flex;
  gap: var(--s-12);
  font-size: 14px;
  line-height: 1.43;
  color: var(--on-dark-mute);
}

.aside-dark ol li::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-full);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aside-dark .caption {
  color: var(--on-dark-mute);
  margin-top: var(--s-16);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav__menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    gap: 0;
    padding: var(--s-8) var(--s-24) var(--s-16);
  }

  .nav__menu li {
    border-top: 1px solid var(--hairline);
  }

  .nav__menu li:first-child {
    border-top: 0;
  }

  .nav__menu a {
    display: block;
    padding: var(--s-12) 0;
  }

  .site-header.is-open .nav__menu {
    display: flex;
  }

  .nav__toggle {
    display: inline-flex;
    order: 3;
  }

  .nav__cta {
    margin-left: auto;
    order: 2;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .spec-table > div {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }

  :root {
    --section-air: 64px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-air: 48px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  h2 {
    font-size: 25px;
  }

  .hero__mark {
    width: 150px;
  }

  .spec-pill {
    font-size: 13px;
    white-space: normal;
    border-radius: 24px;
  }

  .assembly-card__body {
    padding: var(--s-16);
    font-size: 12px;
  }

  .form-card,
  .aside-card,
  .aside-dark,
  .product-card,
  .audience-card {
    padding: var(--s-24);
  }
}
