/* Diplomatic Advisory · the letterhead at night
   Midnight paper throughout, cream type, one drop of terracotta wax.
   A lit band (near-white paper, navy ink) runs through sections 02 and 03.
   Left-aligned letterhead grid: section labels in the margin, ruled rows. */

:root {
  --paper: #111B30;
  --paper-shade: #1A2542;
  --ink: #F2EDE0;
  --ink-soft: #BDB9AC;
  --wax: #CC7857;
  --wax-deep: #DE8E6F;

  --line: rgba(242, 237, 224, 0.18);
  --rule: var(--ink);

  --display: 'Besley', 'Georgia', 'Times New Roman', serif;
  --body: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;

  --step-hero: clamp(2.5rem, 1.2rem + 4.8vw, 4.4rem);
  --step-h2: clamp(1.7rem, 1.25rem + 1.7vw, 2.5rem);
  --step-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* The lit band: sections marked .lit re-scope to a bright interior
   (near-white ground, navy ink, sealing-wax red) between the midnight bookends.
   One contiguous band, never alternating stripes. */
.section.lit {
  --paper: #FDFBF7;
  --ink: #16213C;
  --ink-soft: #4C5670;
  --wax: #8C3826;
  --wax-deep: #722C1D;
  --line: rgba(22, 33, 60, 0.16);
  --rule: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

@supports (color: oklch(50% 0 0)) {
  :root {
    --paper: oklch(0.215 0.042 262);
    --paper-shade: oklch(0.26 0.045 262);
    --ink: oklch(0.945 0.013 90);
    --ink-soft: oklch(0.78 0.018 92);
    --wax: oklch(0.665 0.122 34);
    --wax-deep: oklch(0.73 0.115 36);
  }

  .section.lit {
    --paper: oklch(0.985 0.005 92);
    --ink: oklch(0.248 0.048 262);
    --ink-soft: oklch(0.455 0.033 262);
    --wax: oklch(0.435 0.122 32);
    --wax-deep: oklch(0.37 0.115 32);
  }
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--wax);
  outline-offset: 4px;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.4rem, 5vw, 3rem);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.05rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
}

.monogram {
  width: 27px;
  height: auto;
  flex: none;
}

/* The printer's plate: monogram boxed in a square hairline block. */
.brand .monogram,
.footer-brand .monogram {
  width: 21px;
  box-sizing: content-box;
  padding: 0.36rem 0.3rem;
  border: 1px solid var(--ink);
}

.wordmark {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: clamp(1.1rem, 2.6vw, 2.2rem);
}

.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.site-nav a:hover {
  color: var(--wax);
}

/* ---------- Letterhead rule pair ---------- */

.rule-pair {
  border: 0;
  border-top: 3px solid var(--rule);
  position: relative;
  margin: 0;
}

.rule-pair::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(1.6rem, 4vh, 3rem) clamp(4.5rem, 10vh, 7rem);
}

.hero .kicker {
  margin-top: clamp(2.6rem, 7vh, 5rem);
}

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wax);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 550;
  font-size: var(--step-hero);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-top: 1.4rem;
  max-width: 21ch;
  text-wrap: balance;
}

.hero .lede {
  margin-top: 1.8rem;
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
}

.cta-row {
  margin-top: 2.6rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem 1.8rem;
}

.cta {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--paper);
  background: var(--wax);
  padding: 0.95rem 1.7rem;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.cta:hover {
  background: var(--wax-deep);
}

.email-link {
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.email-link:hover {
  color: var(--wax);
  border-bottom-color: var(--wax);
}

.hero .aside {
  margin-top: 2.2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ---------- Sections: the margin-label grid ---------- */

.section {
  border-top: 1px solid var(--line);
  padding-block: clamp(3.8rem, 9vh, 6.2rem);
  scroll-margin-top: 4.5rem;
}

.section.shaded {
  background: var(--paper-shade);
  border-top: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 2.2rem clamp(2.2rem, 6vw, 5.5rem);
  align-items: start;
}

.section-label {
  display: grid;
  gap: 0.4rem;
}

.section-numeral {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--wax);
}

.section-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.section-body {
  max-width: 64ch;
}

.section-body h2,
.statement-heading {
  font-family: var(--display);
  font-weight: 550;
  font-size: var(--step-h2);
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.section-body .prose {
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

.section-body .prose + .prose {
  margin-top: 1.1rem;
}

.footnote {
  margin-top: 2rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Ruled rows (serve, practices, tenets) ---------- */

.rows {
  list-style: none;
  padding: 0;
  margin: 0;
}

h2 + .rows,
.prose + .rows {
  margin-top: 2.4rem;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 0.5rem 2.5rem;
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}

.row:last-child {
  border-bottom: 1px solid var(--line);
}

.row-title {
  font-family: var(--display);
  font-weight: 550;
  font-size: var(--step-h3);
  line-height: 1.25;
}

.row p,
.row dd {
  margin: 0;
  align-self: center;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

dl.rows .row {
  margin: 0;
}

/* ---------- Engagement steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 2.4rem 0 0;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0 1.2rem;
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--wax);
  padding-top: 0.35rem;
}

.step h3 {
  font-family: var(--display);
  font-weight: 550;
  font-size: 1.22rem;
  line-height: 1.3;
}

.step p {
  grid-column: 2;
  margin-top: 0.5rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Statement band ---------- */

.statement {
  background: var(--paper-shade);
  padding-block: clamp(4.5rem, 11vh, 7.5rem);
}

.statement-rule {
  width: 3rem;
  height: 3px;
  background: var(--wax);
  margin-bottom: 2rem;
}

.statement-line {
  font-family: var(--display);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.7rem, 1rem + 2.8vw, 3rem);
  line-height: 1.25;
  max-width: 22ch;
  text-wrap: balance;
}

/* ---------- Contact ---------- */

.contact-email {
  display: inline-block;
  margin-top: 2.2rem;
  font-family: var(--display);
  font-weight: 550;
  font-size: clamp(1.35rem, 1rem + 1.8vw, 2.3rem);
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--wax);
  padding-bottom: 0.25rem;
  overflow-wrap: anywhere;
  transition: color 0.3s ease;
}

.contact-email:hover {
  color: var(--wax);
}

.contact-note {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 0 clamp(2.8rem, 7vh, 4.5rem);
}

.footer-inner {
  padding-top: clamp(2.2rem, 5vh, 3.2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem 2.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.site-footer .monogram {
  width: 23px;
  color: var(--ink);
}

.footer-name {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-line {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.footer-legal {
  flex-basis: 100%;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reveal motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .section-label {
    grid-auto-flow: column;
    justify-content: start;
    align-items: baseline;
    gap: 0.8rem;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .row p,
  .row dd {
    align-self: start;
  }
}

@media (max-width: 640px) {
  .header-row {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.65rem;
    padding-block: 0.9rem 0.8rem;
  }

  .site-nav {
    gap: 1.1rem;
  }

  .site-nav a {
    font-size: 0.82rem;
  }

  .section {
    scroll-margin-top: 6.5rem;
  }

  .step {
    grid-template-columns: 2.6rem minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1.2rem;
  }

  .cta {
    width: 100%;
    text-align: center;
  }
}
