@import url("./tokens.css");

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

body {
  margin: 0;
  background: var(--po-paper);
  color: var(--po-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-heading);
  margin: 0;
}
p { margin: 0; text-wrap: pretty; }

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

img { display: block; }

input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--po-brick); outline-offset: 2px; }

/* The [hidden] attribute is how this page shows and hides things. It must beat
   any display value a component sets, or a hidden flex container stays visible. */
[hidden] { display: none !important; }

.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;
}

/* Skip link — keyboard users land here first. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--po-brick); color: var(--po-white);
  padding: var(--space-3) var(--space-4); font-weight: var(--weight-semibold);
}
.skip-link:focus { left: 0; color: var(--po-white); }

/* ============================================================
   Layout primitives
   ============================================================ */
.wrap {
  max-width: var(--container-page);
  margin: 0 auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

/* A full-bleed horizontal band. Modifiers set the surface. */
.band--white { background: var(--po-white); }
.band--panel { background: var(--po-panel); }
.band--rule-top { border-top: 1px solid var(--po-rule); }
.band--rule-bottom { border-bottom: 1px solid var(--po-rule); }

/* Aside + main two-column split used by most sections. */
.split { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.split__aside { flex: 1 1 260px; display: flex; flex-direction: column; gap: var(--space-4); }
.split__main { flex: 2 1 520px; display: flex; flex-direction: column; gap: var(--space-12); }
.split__main--wide { flex: 2 1 560px; }
.split--top { align-items: flex-start; }

.section-pad { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.section-pad--tight { padding-top: 72px; padding-bottom: 72px; }

/* ============================================================
   Type helpers
   ============================================================ */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.eyebrow--brick { color: var(--po-brick); }

.h2 { font-size: var(--text-2xl); }

/* Serif sub-heading used inside cards and lists. */
.subhead {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 20px;
  line-height: 1.25;
}
.subhead--lg { font-size: 21px; }
.subhead--xl { font-size: var(--text-xl); }

.small { font-size: var(--text-md); }
.fine { font-size: var(--text-sm); }

.pullquote {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: 20px;
  line-height: 1.45;
  max-width: 52ch;
}
.pullquote--lead { font-size: var(--text-xl); max-width: none; }

.measure { max-width: 640px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height-lg);
  padding: 0 var(--space-6);
  font-size: 16px;
  font-weight: var(--weight-semibold);
  border: 0;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.btn--primary { background: var(--po-brick); color: var(--po-white); }
.btn--primary:hover { background: var(--po-brick-hover); color: var(--po-white); }
.btn--primary:active { background: var(--po-brick-active); }
.btn--primary[disabled] { opacity: 0.55; cursor: progress; }

.btn--outline { border: 1px solid var(--po-ink); color: var(--po-ink); background: transparent; }
.btn--outline:hover { background: var(--po-panel); color: var(--po-ink); }

.btn--sm { height: var(--control-height-sm); padding: 0 var(--space-4); font-size: 14px; }

.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ============================================================
   Header / footer
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--po-rule);
  background: var(--po-paper);
  position: relative;
  z-index: 2;
}
.site-header .wrap {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 26px;
  letter-spacing: var(--tracking-display);
  color: var(--po-ink);
  white-space: nowrap;
}
.wordmark:hover { color: var(--po-ink); }
.wordmark__lead { color: var(--po-brick); }
/* The brand sets a fixed, slightly tight space between the two words. */
.wordmark__gap { display: inline-block; width: var(--wordmark-word-gap); }
.wordmark--sm { font-size: 20px; }

.nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.nav__link { color: var(--po-ink); font-size: var(--text-md); }
.nav__link:hover { color: var(--po-brick); }

.site-footer { border-top: 1px solid var(--po-rule); background: var(--po-paper); }
.site-footer .wrap {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: var(--space-24);
  padding-bottom: var(--space-20);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  align-items: flex-end;
}
.hero__body { flex: 2 1 480px; display: flex; flex-direction: column; gap: 28px; }
.hero__title {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}
.hero__lead { font-size: var(--text-lg); max-width: 560px; }

.hero__panel {
  flex: 1 1 300px;
  background: var(--po-panel);
  border-top: 4px solid var(--po-brick);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.promises { display: flex; flex-direction: column; gap: var(--space-4); }
.promise { border-top: 1px solid var(--po-rule); padding-top: var(--space-3); }
.promise p { font-size: var(--text-md); margin-top: var(--space-1); }

/* ============================================================
   What we do
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px var(--space-10);
}
/* Card with a heavy rule above it — the repeating unit of this section. */
.rule-card { border-top: 2px solid var(--po-ink); padding-top: 14px; }
.rule-card p { font-size: var(--text-md); margin-top: var(--space-2); }

/* Pulls the following pullquote up against the grid above it. */
.tuck-up { margin-top: -20px; }

.panel-2up {
  background: var(--po-panel);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
}
.panel-2up__figure {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--space-6);
  line-height: 1.25;
  margin-top: var(--space-3);
}
.panel-2up p.small { margin-top: var(--space-2); }

.never__head {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--po-ink);
}
.list-plain { margin: 0; padding: 0; list-style: none; }
.never__list { font-size: var(--text-md); }
.never__list li { padding: var(--space-3) 0; border-bottom: 1px solid var(--po-rule); }
.never__list li:last-child { border-bottom: 0; }

/* ============================================================
   How it runs
   ============================================================ */
.steps {
  flex: 2 1 520px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
.step {
  border-top: 2px solid var(--po-brick);
  padding-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step__when {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.step p { font-size: var(--text-md); line-height: 1.55; }

/* ============================================================
   Where we differ
   ============================================================ */
.differ { flex: 2 1 520px; max-width: 640px; display: flex; flex-direction: column; gap: var(--space-4); }
.tick-list { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.tick-list li { padding-left: 18px; border-left: 2px solid var(--po-brick); }

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq { flex: 2 1 520px; border-top: 1px solid var(--po-rule); }
.faq__item { border-bottom: 1px solid var(--po-rule); }
.faq__q {
  width: 100%;
  background: none;
  border: 0;
  padding: var(--space-5) 0;
  display: flex;
  gap: var(--space-6);
  align-items: baseline;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}
.faq__q-text {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 19px;
  line-height: 1.35;
}
.faq__q:hover .faq__q-text { color: var(--po-brick); }
.faq__sign { font-family: var(--font-mono); font-size: 16px; color: var(--po-brick); flex: none; }
/* The sign is decorative; aria-expanded on the button carries the real state. */
.faq__q[aria-expanded="true"] .faq__sign::before { content: "\2013"; }
.faq__q[aria-expanded="false"] .faq__sign::before { content: "+"; }

.faq__a { font-size: var(--text-md); max-width: 60ch; padding: 0 0 var(--space-5); }

/* ============================================================
   Who we are
   ============================================================ */
.people { flex: 2 1 520px; display: flex; flex-wrap: wrap; gap: var(--space-6); }
.person { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; }
.person__frame { aspect-ratio: 4 / 5; border: 1px solid var(--po-rule); overflow: hidden; }
.person__frame img { width: 100%; height: 100%; object-fit: cover; }
.person__meta { display: flex; flex-direction: column; gap: 2px; }
.person__name { font-weight: var(--weight-semibold); }

/* ============================================================
   Contact
   ============================================================ */
.contact__intro { flex: 1 1 300px; display: flex; flex-direction: column; gap: var(--space-5); }
.contact__card {
  border-top: 2px solid var(--po-ink);
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}
.contact__card-name { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-lg); }

.panel {
  flex: 2 1 560px;
  border: 1px solid var(--po-rule);
  background: var(--po-paper);
}
.panel__head {
  border-bottom: 1px solid var(--po-rule);
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.panel__title { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 19px; }
.panel__meta { font-size: var(--text-sm); font-family: var(--font-mono); }

.form { padding: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }
.field--full { flex: 1 1 100%; }
.field__label { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.field__label .optional { font-weight: var(--weight-regular); opacity: 0.65; }

.input, .select, .textarea {
  border: 1px solid var(--po-rule);
  background: var(--po-white);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--text-md);
  color: var(--po-ink);
}
.input, .select { height: var(--control-height-md); padding: 0 var(--space-3); }
.textarea { padding: 10px var(--space-3); resize: vertical; }

/* Native select arrow replaced with two flat triangles — no rounded UA chrome. */
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--space-10);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--po-ink) 50%),
    linear-gradient(135deg, var(--po-ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form__foot { flex: 1 1 100%; display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* Honeypot — a field only a bot will fill in. Hidden from people and screen readers. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Status message, swapped in place of the form on success. */
.form-status { padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.form-status__title {
  border-top: 4px solid var(--po-brick);
  padding-top: var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xl);
}
.form-status p { max-width: 52ch; }

.form-error {
  flex: 1 1 100%;
  border-left: 2px solid var(--po-brick);
  padding: var(--space-2) var(--space-3);
  background: var(--po-panel);
  font-size: var(--text-sm);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding-top: var(--space-16); padding-bottom: var(--space-12); align-items: flex-start; }
  .hero__title { font-size: 42px; }
  .split, .hero { gap: var(--space-8); }
  .steps { grid-template-columns: 1fr; }
  .panel-2up { grid-template-columns: 1fr; gap: var(--space-6); }
  .section-pad { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .section-pad--tight { padding-top: var(--space-12); padding-bottom: var(--space-12); }
}

@media (max-width: 640px) {
  :root { --page-gutter: 20px; }
  .hero__title { font-size: 34px; }
  .hero__lead { font-size: 16px; }
  .h2 { font-size: 26px; }
  .grid-2 { grid-template-columns: 1fr; gap: var(--space-6); }
  .nav { gap: var(--space-4); width: 100%; }
  .nav__link { font-size: 14px; }
  .site-header .wrap { gap: var(--space-3); }
  .wordmark { font-size: 22px; }
  .form, .panel__head, .form-status { padding-left: var(--space-4); padding-right: var(--space-4); }
  .site-footer .wrap { gap: var(--space-3); }
  .pullquote--lead { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Print — the brand puts everything on a white page, no panels. */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .btn, .panel { display: none; }
}
