/* ============================================================
   Standard Cybernetics — landing page
   Type:  Fraunces (headings) · IBM Plex Sans (text)
   Look:  warm paper + ink, restrained. One accent, used sparingly.
   ============================================================ */

:root {
  --paper:   #f6f3ec;
  --panel:   #efeae0;
  --ink:     #1b1d21;
  --muted:   #585d65;
  --faint:   #8b9098;
  --line:    #ddd6c8;
  --accent:  #b0432c;
  --accent-700: #8f3622;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1060px;
  --gut: clamp(1.25rem, 5vw, 3.5rem);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-700); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper); padding: .55rem .9rem; border-radius: var(--radius);
  z-index: 100; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 1rem; }

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 1rem; font-weight: 500;
  padding: .7rem 1.4rem;
  background: var(--accent); color: #fff; text-decoration: none;
  border: 1px solid var(--accent); border-radius: var(--radius);
  cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--accent-700); border-color: var(--accent-700); color: #fff; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; min-height: 64px; padding-block: 1rem; }
.brand { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.kicker { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.hero-title {
  font-size: clamp(2rem, 1.3rem + 2.9vw, 3.15rem);
  max-width: 24ch; line-height: 1.12;
}
/* A damped Lissajous curve as the hero's ground — one continuous ink line, a
   feedback system ringing down to stability. Generated in-house
   (assets/lissajous.svg), so it stays sharp at any scale. */
.hero {
  background: url("assets/lissajous.svg") right center / auto 115% no-repeat var(--paper);
}
.hero .intake { margin-top: 2.5rem; width: min(540px, 100%); }

/* ---------- shared section rhythm ---------- */
.principals, .process, .closing { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.25rem); max-width: 26ch; }

/* ---------- principals ---------- */
.people { display: grid; gap: clamp(2rem, 3.5vw, 2.75rem); grid-template-columns: 1fr; }
@media (min-width: 560px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .people { grid-template-columns: repeat(4, 1fr); } }

.person { display: flex; flex-direction: column; }
.person-photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  filter: grayscale(1);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
.person-name { font-size: 1.2rem; margin-top: 1.1rem; }

.person-teaser {
  margin-top: .55rem; color: var(--muted); font-size: .95rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.bio-toggle {
  align-self: flex-start; margin-top: .9rem; padding: 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: .95rem; color: var(--accent);
  text-decoration: underline; text-underline-offset: 2px;
}
.bio-toggle:hover { color: var(--accent-700); }

/* bio dialog — wide, centered, two text columns so it fits without scrolling */
.bio-modal {
  width: min(60rem, 92vw);
  max-height: 90vh; overflow: auto;
  margin: auto;                 /* centers in the viewport */
  padding: 0; border: none; border-radius: 8px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 70px -30px rgba(20, 20, 20, .55);
}
.bio-modal::backdrop { background: rgba(22, 24, 28, .5); }
.bio-modal-close { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: .55rem .6rem 0; background: var(--paper); }
.bio-modal-close button { background: none; border: none; cursor: pointer; font-size: 1.75rem; line-height: 1; color: var(--muted); padding: .1rem .5rem; }
.bio-modal-close button:hover { color: var(--ink); }
.bio-modal-body { padding: 0 clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2.25rem); line-height: 1.5; }
.bio-modal-name { font-size: clamp(1.4rem, 1.15rem + .9vw, 1.85rem); line-height: 1.15; margin-bottom: 1.15rem; }
.bio-modal-body p { margin: 0 0 .72rem; color: var(--ink); break-inside: avoid; }
@media (min-width: 720px) {
  .bio-modal-body { columns: 2; column-gap: 2.5rem; }
  .bio-modal-name { column-span: all; }
}

/* No-JS fallback: show bios inline, hide the trigger/close affordances */
.no-js .bio-toggle { display: none; }
.no-js .bio-modal { display: block; position: static; width: auto; max-height: none; overflow: visible; box-shadow: none; border: none; border-top: 1px solid var(--line); border-radius: 0; margin-top: 1.25rem; }
.no-js .bio-modal-close { display: none; }

/* ---------- process ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); grid-template-columns: 1fr; }
@media (min-width: 620px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px)  { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.step-num { font-family: var(--serif); font-size: 1.5rem; color: var(--faint); line-height: 1; }
.step-title { font-size: 1.18rem; margin-top: .55rem; }
.step p { margin-top: .6rem; color: var(--muted); font-size: .98rem; }

/* ---------- closing / intake ---------- */
.closing-grid { display: grid; gap: clamp(2.25rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .closing-grid { grid-template-columns: 1.05fr 0.95fr; } }
.closing-copy p { font-size: 1.15rem; line-height: 1.6; max-width: 46ch; color: var(--ink); }

.intake { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); }
.intake-title { font-size: 1.35rem; margin-bottom: 1.3rem; }

/* Three-step intake form (script.js drives the steps and submits to HubSpot). */
.form-progress { font-size: .85rem; color: var(--faint); margin-bottom: 1.1rem; }

.form-step { border: none; padding: 0; min-inline-size: 0; }
.form-step legend { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; padding: 0; margin-bottom: 1rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.form-field { display: block; margin-bottom: .9rem; }
.form-label { display: block; font-size: .88rem; font-weight: 500; color: var(--muted); margin-bottom: .3rem; }
.form-label em { font-style: normal; font-weight: 400; color: var(--faint); }

.intake-form input[type="text"],
.intake-form input[type="email"],
.intake-form input[type="tel"] {
  width: 100%; padding: .6rem .75rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}

.form-choice { display: flex; align-items: baseline; gap: .65rem; padding: .4rem 0; cursor: pointer; }
.form-choice input { accent-color: var(--accent); flex: none; transform: translateY(1px); }

.form-nav { display: flex; gap: .75rem; margin-top: 1.5rem; }
.form-nav .btn { margin-left: auto; }
.btn-ghost {
  font-family: var(--sans); font-size: 1rem; font-weight: 500;
  padding: .7rem 1.4rem;
  background: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }

.form-error { margin-top: 1rem; font-size: .92rem; color: var(--accent-700); }

.form-success:focus { outline: none; }
.form-success h3 { font-size: 1.35rem; margin-bottom: .6rem; }
.form-success p { color: var(--muted); }

/* No-JS fallback: the form can't submit without script.js, so hide it and say so. */
.form-nojs { display: none; }
.no-js .intake-form { display: none; }
.no-js .form-nojs { display: block; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; }
.footer-legal { color: var(--faint); font-size: .9rem; }
