/* =====================================================================
   TOKENS — palette drawn directly from the Perfect Site logo (navy +
   orange). Keep --accent for small/decorative use only: at the sizes
   used on this page, orange text on white does not meet WCAG AA
   contrast, so it is reserved for dots, underlines, borders, and the
   triangle marks — never body or link text.
   ===================================================================== */
:root {
  --navy: #002141;          /* brand ink — headings, nav, logo-adjacent */
  --ink: #1B2733;           /* body text */
  --muted: #55606B;         /* secondary text, labels, captions */
  --accent: #FD5200;        /* brand orange — decorative/interactive only */
  --paper: #FFFFFF;
  --paper-alt: #F5F6F7;
  --rule: #E1E4E8;
  --rule-strong: #C7CCD1;

  --granted: #1F7A46;
  --pending: #9A5B12;
  --published: #2F5C7A;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --max-width: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ===================== SKIP LINK ===================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
  font-family: var(--font-body);
  font-weight: 600;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ===================== LINKS / FOCUS ===================== */
a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

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

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

/* ===================== SIGNATURE DETAIL — logo triangle ===================== */
.tri {
  display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--accent);
  margin-right: 9px;
  transform: translateY(-1px);
  vertical-align: middle;
}

.eyebrow {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

/* ===================== SECTIONS ===================== */
.section { padding: 56px 0; scroll-margin-top: 84px; }
.section + .section { border-top: 1px solid var(--rule); }
.contact { background: var(--paper-alt); }

h1, h2 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 18px;
}
h1 {
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.25;
  max-width: 24ch;
}
h2 {
  font-weight: 600;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.lede {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ===================== HEADER ===================== */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}
.brand { display: block; line-height: 0; }
.brand-mark { display: block; height: 22px; width: auto; }

.nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  margin-left: 28px;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav a:first-child { margin-left: 0; }
.nav a:hover { border-bottom-color: var(--accent); }

/* ===================== STATUS TABLE ===================== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

table.registry {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  min-width: 760px;
}

table.registry th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

table.registry td {
  padding: 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
  vertical-align: top;
}
table.registry td.mono { font-size: 0.85rem; }
table.registry tbody tr:last-child td { border-bottom: none; }
table.registry tbody tr:hover { background: var(--paper-alt); }

.tag { display: inline-flex; align-items: center; font-weight: 500; color: var(--ink); white-space: nowrap; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 7px;
}
.dot-granted { background: var(--granted); }
.dot-pending { background: var(--pending); }
.dot-published { background: var(--published); }

.needs-info {
  color: var(--pending);
  text-decoration: underline dashed;
  text-underline-offset: 3px;
  cursor: help;
}

.status-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.status-legend li { display: flex; align-items: center; }

/* ===================== CONTACT ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  margin-top: 22px;
}

.contact-info p { margin: 0 0 22px; }
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 5px;
}
.contact-info a { font-size: 1.02rem; }

.contact-form { display: flex; flex-direction: column; }
.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 16px 0 6px;
}
.contact-form label:first-child { margin-top: 0; }

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 13px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px;
}
.contact-form input:hover, .contact-form textarea:hover { border-color: var(--navy); }

.contact-form button {
  margin-top: 22px;
  align-self: start;
  background: var(--navy);
  color: var(--paper);
  border: none;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.contact-form button:hover { background: var(--accent); }

/* ===================== BUTTON LINKS ===================== */
.button-link {
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 3px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.button-link:hover {
  background: var(--accent);
  color: var(--paper);
}

/* ===================== FOOTER ===================== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}
.footer-row p { margin: 0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav a { margin-left: 0; margin-right: 22px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-row { flex-direction: column; gap: 6px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .contact-form button { transition: none; }
}