/* Shape Policy — "The Gazette"
   Visual source of truth: /STYLE_GUIDE.md */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  font-family: var(--f-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

:root {
  --paper: #F4F2EC;
  --paper-dark: #EDEAE2;
  --ink: #16140F;
  --charcoal: #2B2925;
  --mute: #6B675C;
  --mute-dark: #9B978C;
  --green: #1E5438;
  --gold: #B8862D;
  --gold-dark: #D2A33F;
  --hair: #DAD6CA;
  --hair-dark: #3A3730;
  --f-sans: "Archivo", sans-serif;
  --f-mono: "IBM Plex Mono", monospace;
  --measure: 66ch;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-110%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

/* Masthead */
.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 1.75rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.mast b {
  color: var(--ink);
  font-weight: 500;
}

/* Page frame */
.body-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.railcol {
  border-right: 1px solid var(--ink);
}

.rail {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 3.5rem 1.25rem 2.5rem;
}

.wordmark {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.rail-navlabel {
  margin-bottom: 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.rail-index {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  list-style: none;
}

.rail-index a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 8px 6px 17px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.rail-index a::before {
  content: "›";
  position: absolute;
  left: 5px;
  font-size: 11px;
  line-height: 1;
  color: var(--paper);
  opacity: 0;
}

.rail-index a:hover,
.rail-index a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.rail-index a:hover::before,
.rail-index a[aria-current="page"]::before {
  opacity: 1;
}

.rail-meta {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--mute);
  line-height: 2;
  text-transform: uppercase;
}

.main {
  min-width: 0;
}

.seclabel {
  display: block;
  padding: 3rem 2.5rem 0;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--green);
}

.kicker {
  margin-bottom: 1.75rem;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

/* Hero */
.hero {
  padding: 4.5rem 3rem 5rem 2.5rem;
}

.hero h1 {
  max-width: 640px;
  margin-bottom: 1.75rem;
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ink);
}

.hero-p {
  max-width: 460px;
  margin-bottom: 2.5rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--mute);
}

.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-gold,
.btn-out {
  display: inline-block;
  padding: 13px 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.btn-gold {
  background: var(--green);
  color: var(--paper);
}

.btn-gold:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-out {
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn-out:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Document artefact */
.doc {
  max-width: 720px;
  margin: 0 3rem 1.5rem 2.5rem;
  border: 1.5px solid var(--ink);
}

.doc-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 1.25rem;
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='1' cy='1' r='.6' fill='%2316140F'/%3E%3C/svg%3E");
}

.doc-head span {
  padding: 0 6px;
  background: var(--paper);
}

.doc-head b {
  color: var(--green);
  font-weight: 500;
}

.doc-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding: 1.75rem 1.25rem;
}

.doc-title {
  margin-bottom: 0.6rem;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.doc-desc {
  max-width: 440px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mute);
}

.doc-doi {
  margin-top: 0.9rem;
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--mute);
}

.doc-link {
  padding: 10px 18px;
  border: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}

.doc-link:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Shaip slab */
.slab {
  padding: 4rem 3rem 4rem 2.5rem;
  background: var(--charcoal);
  color: var(--paper-dark);
}

.slab .kicker {
  color: var(--gold-dark);
}

.slab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.slab-logo {
  font-size: 58px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--paper-dark);
}

.slab-sub {
  margin: 0.85rem 0 1.5rem;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.slab-desc {
  max-width: 380px;
  margin-bottom: 1.5rem;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mute-dark);
}

.slab-more {
  margin-top: 1.5rem;
}

.slab-link {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--paper-dark);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dark);
  text-decoration: none;
}

.slab-link:hover {
  background: var(--paper-dark);
  border-color: var(--paper-dark);
  color: var(--ink);
}

.pillar {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.9rem;
  padding: 1.1rem 0;
}

.pillar + .pillar {
  border-top: 1px solid var(--hair-dark);
}

.glyph {
  padding-top: 2px;
  font-family: var(--f-mono);
  font-size: 11px;
  text-align: center;
  color: var(--paper-dark);
}

.pillar-t {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper-dark);
}

.pillar-b {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--mute-dark);
}

/* Figure */
.fig {
  max-width: 480px;
}

.fig-frame {
  padding: 0.75rem;
  border: 1px solid var(--hair-dark);
  background: var(--ink);
}

.fig-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 0.7rem;
}

.fig-dot {
  width: 6px;
  height: 6px;
  background: var(--mute);
}

.fig-screen {
  padding: 1rem;
  background: var(--paper);
}

.fig-apphead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.7rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--hair);
}

.fig-appname {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.fig-appsub,
.fig-docmeta {
  font-family: var(--f-mono);
  font-size: 7px;
  color: var(--mute);
}

.fig-appsub {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fig-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
}

.fig-row + .fig-row {
  border-top: 1px solid var(--hair);
}

.fig-doctitle {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

.fig-docmeta {
  margin-top: 2px;
}

.fig-status {
  padding: 2px 7px;
  border: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

.fig-caption {
  margin-top: 0.7rem;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* Services */
.services {
  padding: 1.25rem 3rem 4rem 2.5rem;
}

.sec-h {
  margin-bottom: 0.75rem;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sec-p {
  max-width: 460px;
  margin-bottom: 2.5rem;
  font-size: 13px;
  line-height: 1.65;
  color: var(--mute);
}

.svc {
  display: grid;
  grid-template-columns: 60px 220px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.6rem 0.25rem;
}

.svc + .svc {
  border-top: 1px solid var(--hair);
}

.svc:hover {
  background: var(--ink);
}

.svc:hover .svc-n,
.svc:hover .svc-t,
.svc:hover .svc-b {
  color: var(--paper);
}

.svc-n {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--green);
}

.svc-t {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--green);
}

.svc-b {
  max-width: 440px;
  padding-right: 1rem;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mute);
}

/* People */
.people {
  padding: 1.25rem 3rem 4.5rem 2.5rem;
}

.byline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  margin-top: 1.5rem;
}

.person {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.1rem;
  align-items: start;
}

.photo {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.5) brightness(1.02) contrast(1.04);
}

.portrait-harry {
  transform: scale(1.7);
  transform-origin: 50% 25%;
}

.portrait-dandan {
  transform: scale(1.75);
  transform-origin: 50% 24%;
}

.portrait-cath {
  transform: scale(1.18);
  transform-origin: 50% 42%;
}

.portrait-alix {
  transform: scale(1.28);
  transform-origin: 50% 36%;
}

.person-name {
  margin-bottom: 3px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.person-role {
  margin-bottom: 0.6rem;
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.person-bio {
  margin-bottom: 0.6rem;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mute);
}

.person-li {
  display: inline-block;
  min-height: 24px;
  padding: 4px 2px 2px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.person-li:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Record */
.record {
  padding: 1.25rem 3rem 4rem 2.5rem;
}

.rec-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1.5rem;
  padding: 0.9rem 0.25rem;
  font-family: var(--f-mono);
  font-size: 10.5px;
}

.rec-row + .rec-row {
  border-top: 1px solid var(--hair);
}

.rec-row span:first-child,
.rec-row span:last-child {
  color: var(--mute);
}

.rec-row span:nth-child(2) {
  color: var(--ink);
  font-weight: 500;
}

/* Contact */
.contact {
  padding: 4rem 3rem 4rem 2.5rem;
  background: var(--charcoal);
  color: var(--paper-dark);
}

.contact .kicker {
  color: var(--gold-dark);
}

.contact .btn-gold {
  background: var(--gold-dark);
  color: var(--ink);
}

.contact .btn-gold:hover {
  background: var(--paper-dark);
  color: var(--ink);
}

.contact h2 {
  max-width: 480px;
  margin-bottom: 1rem;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contact-p {
  max-width: 400px;
  margin-bottom: 2.25rem;
  font-size: 13px;
  line-height: 1.65;
  color: var(--mute-dark);
}

/* Interior page sections */

.section-close {
  max-width: var(--measure);
  height: 1px;
  margin: 0.5rem 2.5rem 0;
  background: var(--hair);
}

.lead-panel {
  max-width: var(--measure);
  padding: 1.25rem;
  margin-bottom: 2rem;
  background: var(--paper-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='1' cy='1' r='.6' fill='%2316140F'/%3E%3C/svg%3E");
}

.lead-panel .hero-p {
  max-width: 100%;
  margin-bottom: 0;
}

.lead-text {
  background: var(--paper);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0.15em 0.35em;
}

/* ─── Interior page content ──────────────────────────── */

.content {
  padding: 1.25rem 3rem 1.5rem 2.5rem;
}

.hero-lead {
  padding-bottom: 0;
}

.hero-lead::after {
  content: "";
  display: block;
  max-width: var(--measure);
  height: 1px;
  margin-top: 0.35rem;
  background: var(--hair);
}

.content-ruled {
  padding-bottom: 0;
}

.content-ruled::after {
  content: "";
  display: block;
  max-width: var(--measure);
  height: 1px;
  margin-top: 0.35rem;
  background: var(--hair);
}

.seclabel-ruled {
  padding-top: 2.25rem;
}

.content-cta {
  margin-top: 2rem;
}

.content-p {
  max-width: var(--measure);
  margin-bottom: 1.25rem;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mute);
}

.sub-h {
  margin-bottom: 0.6rem;
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}

.sub-block {
  padding: 1.1rem 0;
}

.sub-block + .sub-block {
  border-top: none;
}

.content ul {
  margin: 0.75rem 0 1rem 1.4rem;
}

.content ul li {
  max-width: var(--measure);
  margin-bottom: 0.4rem;
  font-size: 13px;
  line-height: 1.65;
  color: var(--mute);
}

/* Light-surface pillar overrides */
.pillars-light {
  max-width: var(--measure);
}

.pillars-light .glyph {
  color: var(--ink);
}

.pillars-light .pillar-t {
  color: var(--green);
  font-size: 15px;
  margin-bottom: 6px;
}

.pillars-light .pillar-b {
  color: var(--mute);
}

.pillars-light .pillar + .pillar {
  border-top-color: var(--hair);
}

.fig img {
  display: block;
  width: 100%;
  height: auto;
}

.hero .fig {
  margin-top: 2rem;
}

.hero .fig-caption {
  color: var(--green);
}

/* Inline body links */
.link-inline {
  display: inline;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
}

.link-inline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Colophon */
.colophon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.colophon a {
  display: inline-block;
  min-height: 24px;
  padding: 5px 2px;
  color: var(--ink);
  text-decoration: none;
}

.colophon a:hover {
  background: var(--ink);
  color: var(--paper);
}

.colophon-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

@media (max-width: 899px) {
  .body-grid {
    display: block;
  }

  .railcol {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .rail {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    padding: 1.5rem 1.75rem;
  }

  .rail nav {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .rail-index {
    width: max-content;
    flex-flow: row nowrap;
    gap: 0.5rem 1.25rem;
  }

  .rail-meta {
    display: none;
  }

  .rail-navlabel {
    display: none;
  }

  .rail-index a {
    min-height: 24px;
    padding: 4px 6px;
  }

  .rail-index a::before {
    display: none;
  }

  .slab-grid,
  .byline {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .doc-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 519px) {
  .mast {
    padding-inline: 1.25rem;
  }

  .rail {
    gap: 1.25rem;
    padding-inline: 1.25rem;
  }

  .hero {
    padding: 3rem 1.25rem;
  }

  .seclabel {
    padding: 2.5rem 1.25rem 0;
  }

  .doc {
    margin: 0 1.25rem 3.5rem;
  }

  .slab,
  .contact {
    padding: 3rem 1.25rem;
  }

  .services,
  .people,
  .record,
  .content {
    padding: 1.25rem 1.25rem 3rem;
  }

  .svc {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .rec-row {
    grid-template-columns: 80px 1fr;
  }

  .rec-row span:last-child {
    display: none;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-link {
    text-align: center;
  }

  .fig-row {
    align-items: flex-start;
  }

  .fig-appsub {
    display: none;
  }

  .colophon {
    padding-inline: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
