/* PEC site. System fonts only. No external stylesheets. */

:root {
  --ink: #1c1a16;
  --ink-soft: #3f3b34;
  --muted: #6a655c;
  --paper: #f3f0e8;
  --sheet: #fffcf7;
  --line: #d8d2c6;
  --line-strong: #b7ad9c;
  --navy: #1a2740;
  --navy-2: #243552;
  --brass: #8c7344;
  --brass-soft: #c4a574;
  --photo: #d6d2cb;
  --photo-ink: #5a564e;
  --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, #ebe6da 0 0.45rem, transparent 0.45rem),
    var(--paper);
  min-height: 100vh;
  overflow-x: clip;
}

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

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

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

a:focus-visible,
button:focus-visible,
input: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.5rem; }

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

/* Header and footer chrome is full-bleed; inner .wrap centers the content. */
.site-header,
.site-footer {
  width: auto;
  max-width: none;
}

.site-header {
  background: var(--navy);
  color: #f3efe6;
  border-bottom: 4px solid var(--brass);
}

.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(--brass-soft); }

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

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

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

.brand-note {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: #c9c1b3;
}

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

.nav-toggle-btn {
  display: none;
  background: transparent;
  color: #f3efe6;
  border: 1px solid var(--brass-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: #f3efe6;
  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(--brass-soft);
  border-bottom-color: var(--brass-soft);
}

.has-sub { position: relative; }

.has-sub > .sub {
  display: none;
  position: absolute;
  right: 0;
  top: 2.2rem;
  background: var(--navy-2);
  border: 1px solid var(--brass);
  min-width: 18rem;
  padding: 0.5rem 0;
  z-index: 40;
  box-shadow: 0 0.6rem 1.2rem rgba(16, 20, 28, 0.28);
}

.has-sub:hover > .sub,
.has-sub:focus-within > .sub {
  display: block;
}

.has-sub > .sub a {
  display: block;
  padding: 0.4rem 0.9rem;
  text-transform: none;
  letter-spacing: 0.01em;
  border-bottom: 0;
  font-size: 0.92rem;
}

.has-sub > .sub a:hover,
.has-sub > .sub a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
}

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: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  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(--brass);
  font-weight: 700;
}

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

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, .card p, .team-card p, li {
  color: var(--ink-soft);
}

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

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

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

.card, .sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem 1.25rem;
}

.card p:last-child,
.sheet p:last-child,
.prose > :last-child { margin-bottom: 0; }

.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(--brass);
}

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

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

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

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

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

.team-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
}

.team-card .who { padding: 1rem 1.05rem 1.1rem; }

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

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

.comments { display: grid; gap: 0.75rem; }

.comment {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
}

.comment p { margin: 0; }

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

.cta h2, .cta p { color: inherit; }

.cta p { margin: 0; }

.btn {
  display: inline-block;
  background: var(--brass);
  color: #1a1408;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  border: 0;
}

.btn:hover { color: #1a1408; filter: brightness(1.08); }

.prose { max-width: 44rem; }

.prose p { margin: 0 0 0.9rem; }

.prose ul, .prose ol {
  margin: 0 0 0.9rem;
  padding-left: 1.2rem;
}

.contact-block {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1.3rem 1.35rem;
  max-width: 40rem;
}

.contact-block dl { margin: 0; }

.contact-block dt {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
  margin: 0.85rem 0 0.15rem;
}

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

.contact-block dd { margin: 0; }

.note {
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  background: var(--navy);
  color: #d9d3c7;
  padding: 2rem 0 1.5rem;
  border-top: 4px solid var(--brass);
  font-size: 0.92rem;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.footer-title {
  font-family: Georgia, "Times New Roman", serif;
  color: #f3efe6;
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
}

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

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

.footer-meta {
  border-top: 1px solid #3a4a66;
  padding-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #b7b0a3;
  font-size: 0.82rem;
}

.not-found {
  text-align: left;
  padding: 2rem 0 3rem;
  max-width: 38rem;
}

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

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

  .header-inner { flex-wrap: wrap; }

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

  .site-nav {
    display: none;
    width: auto;
    flex-basis: min(var(--max), calc(100vw - 2rem));
    padding: 0 0 1rem;
  }

  .nav-toggle:checked ~ .site-nav { display: block; }

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

  .has-sub > .sub {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    background: transparent;
    min-width: 0;
    padding: 0 0 0 0.7rem;
  }

  .has-sub > .sub a { padding-left: 0; }
}

@media (max-width: 30rem) {
  .team-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.92rem; }
  .brand-mark { width: 2.5rem; height: 2.5rem; }
  .brand-logo { height: 2.6rem; max-width: min(12.5rem, 62vw); }
}


.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.service-list > li {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--brass);
}

.service-list h3 { margin-bottom: 0.25rem; }
.service-list h3:only-child { margin-bottom: 0; }
.service-list p { margin: 0; }

.service-card h3 { margin-bottom: 0; }

/* Keep grid/flex children from forcing a horizontal overflow. */
.wrap,
.hero,
.prose,
.section,
.split,
.service-grid,
.work-grid,
.team-grid,
.team-card,
.footer-grid,
.cta,
.header-inner,
.contact-block {
  container-type: inline-size;
  min-width: 0;
}

.hero > *,
.split > *,
.service-grid > *,
.work-grid > *,
.team-grid > *,
.footer-grid > *,
.header-inner > * {
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 3.15rem;
  width: auto;
  max-width: min(15.5rem, 58vw);
  background: #fff;
  padding: 0.28rem 0.4rem;
  border-radius: 2px;
  flex: 0 1 auto;
  object-fit: contain;
}

.photo {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--photo);
  border: 1px solid var(--line-strong);
  max-width: 100%;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

.hero .photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* Keep real photos inside overflow-safe containers. */
.photo {
  container-type: inline-size;
  min-width: 0;
}

/* v4: new circular PEC logo */
.brand { display:flex; align-items:center; gap:.65rem; text-decoration:none; }
.brand-mark { display:block; width:3.6rem; height:3.6rem; border-radius:50%; background:#fff; flex:0 0 auto; }
.brand-name { color:#fff; font-weight:700; font-size:.95rem; line-height:1.15; letter-spacing:.01em; }
@media (max-width: 480px) { .brand-mark { width:3rem; height:3rem; } .brand-name { font-size:.8rem; } }
.cta a:not(.btn) { color: #fff; text-decoration: underline; }
