/* Panamerican Lab. System fonts only. No external stylesheets. */

:root {
  --ink: #152028;
  --ink-soft: #334048;
  --muted: #5c6a70;
  --paper: #eef2f3;
  --sheet: #fbfcfd;
  --line: #d3dcde;
  --line-strong: #b4c0c4;
  --teal: #0f2f36;
  --teal-2: #164049;
  --clay: #b85c38;
  --clay-soft: #d49274;
  --focus: #0b57d0;
  --max: 70rem;
  --gap: 1.25rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    linear-gradient(180deg, #d9e3e5 0 0.4rem, transparent 0.4rem),
    var(--paper);
  min-height: 100vh;
  overflow-x: clip;
}

img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-2);
  text-underline-offset: 0.16em;
}

a:hover { color: var(--clay); }

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

.skip {
  position: absolute;
  left: 0.8rem;
  top: -6rem;
  background: var(--sheet);
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  z-index: 80;
}

.skip:focus { top: 0.8rem; }

.wrap {
  width: min(var(--max), calc(100vw - 2rem));
  margin-inline: auto;
  container-type: inline-size;
}

.site-header,
.site-footer {
  width: auto;
  max-width: none;
}

.site-header {
  background: var(--teal);
  color: #f3f7f8;
  border-bottom: 4px solid var(--clay);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.05rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand:hover { color: var(--clay-soft); }

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--clay-soft);
  color: var(--clay-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.brand-text { min-width: 0; display: flex; flex-direction: column; gap: 0.12rem; }

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 400;
}

.brand-note {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5d0d3;
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav-toggle-btn {
  display: none;
  background: transparent;
  color: #f3f7f8;
  border: 1px solid var(--clay-soft);
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
}

.site-nav a {
  color: #f3f7f8;
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  padding: 0.2rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--clay-soft);
  border-bottom-color: var(--clay-soft);
}

main { padding: 2rem 0 3.5rem; }

.crumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.crumb a { color: inherit; }

.hero {
  display: block;
  max-width: 42rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 700;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.25;
  color: var(--teal);
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 2.4vw + 1rem, 2.35rem);
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.55rem;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.lede, .prose p, .team-card p, li {
  color: var(--ink-soft);
}

.lede { margin: 0 0 1.1rem; font-size: 1.12rem; max-width: 40rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.btn {
  display: inline-block;
  background: var(--teal);
  color: #f3f7f8;
  text-decoration: none;
  padding: 0.55rem 1.05rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--teal);
}

.btn:hover { background: var(--teal-2); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--teal);
}

.btn-ghost:hover { background: #e4ecee; color: var(--teal); }

.section { margin: 0 0 2.5rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.15rem;
  padding-bottom: 0.45rem;
}

.section-head h2 { margin: 0; }

.more { font-size: 0.9rem; }

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.service-card {
  display: block;
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid var(--clay);
}

.service-card:hover {
  border-color: var(--clay);
  color: inherit;
}

.service-card h3 {
  margin-bottom: 0.3rem;
  font-size: 1.08rem;
}

.service-card p {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
}

.service-card p:last-child { margin-bottom: 0; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.team-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 0.95rem 1rem 1.05rem;
}

.team-card h3 {
  font-size: 1.02rem;
  margin: 0 0 0.25rem;
}

.team-card p { margin: 0; font-size: 0.92rem; }

.cta {
  background: var(--teal);
  color: #f3f7f8;
  padding: 1.5rem 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.cta h2 { color: #f3f7f8; margin: 0 0 0.35rem; }

.cta p { margin: 0; color: #d5dde0; }

.cta .btn {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
  white-space: nowrap;
}

.cta .btn:hover { background: #9a4b2e; }

.prose { max-width: 42rem; }

.contact-block {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
  padding: 1.2rem 1.25rem 1.3rem;
  max-width: 32rem;
}

.contact-list { margin: 0; }

.contact-list dt {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.85rem 0 0.2rem;
  font-weight: 700;
}

.contact-list dt:first-child { margin-top: 0; }

.contact-list dd { margin: 0; }

.site-footer {
  background: var(--teal);
  color: #d5dde0;
  padding: 2rem 0 1.6rem;
  border-top: 4px solid var(--clay);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1.5rem;
}

.site-footer h2 {
  color: #f3f7f8;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.site-footer a { color: #f3f7f8; }

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li { margin: 0 0 0.3rem; color: #d5dde0; }

.legal {
  margin: 1.4rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid #2a5158;
  font-size: 0.85rem;
  color: #b7c4c7;
}

.page-404 {
  text-align: left;
  max-width: 36rem;
  padding: 2rem 0 3rem;
}

@media (max-width: 64rem) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 52rem) {
  .service-grid,
  .footer-inner,
  .cta,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle-btn { display: inline-block; }

  .site-nav { display: none; }

  .header-inner { position: relative; }

  .nav-toggle:checked ~ .site-nav,
  .header-inner:focus-within .site-nav {
    display: block;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    background: var(--teal-2);
    border: 1px solid var(--clay);
    padding: 0.7rem 1rem;
    z-index: 50;
    min-width: 12rem;
  }

  .site-nav ul { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 36rem) {
  main { padding: 1.4rem 0 2.4rem; }
}
