/* ==========================================================================
   BASE — reset, document, typography, utilities
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  background: var(--bone);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Paper-grain texture across the whole document */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.no-scroll { overflow: hidden; }

img, svg, video, canvas, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Tint acts as a placeholder while photos decode — but must never sit behind
   a transparent logo or icon. */
img { background-color: var(--linen); }
.brand img,
.footer__brand img,
img[src$=".gif"],
img[src$=".svg"] { background-color: transparent; }

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-base) var(--ease-out);
}

/* --- Focus: visible, gilt, never removed -------------------------------- */
:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-ink :focus-visible { outline-color: var(--gilt); }

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

/* --- Scrollbar ---------------------------------------------------------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bone-200); }
::-webkit-scrollbar-thumb {
  background: var(--linen);
  border: 3px solid var(--bone-200);
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--brass); }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-heading);
  color: var(--ink);
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.on-ink h1, .on-ink h2, .on-ink h3, .on-ink h4, .on-ink h5 { color: #F4F0E7; }

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.028em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.022em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { max-width: var(--measure); text-wrap: pretty; }

/* Long unbroken strings (email addresses, URLs) must never widen the page */
p, li, td, th, address, h1, h2, h3, .contact-item__value, .review__text {
  overflow-wrap: break-word;
}

strong, b { font-weight: 600; color: var(--ink); }
.on-ink strong, .on-ink b { color: #F4F0E7; }

em { font-style: italic; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--gilt-deep);
  margin-bottom: var(--sp-2);
}
.on-ink .eyebrow { color: var(--gilt); }

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: .75;
  flex: none;
}

/* Serif italic flourish, echoing the logo's ampersand */
.flourish {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--gilt-deep);
}
.on-ink .flourish { color: var(--gilt); }

.lede {
  font-size: var(--fs-lg);
  line-height: 1.62;
  color: var(--mist);
}
.on-ink .lede { color: var(--mist-dark); }

.section-head { max-width: 760px; margin-bottom: var(--sp-6); }
.section-head.is-centered { margin-inline: auto; text-align: center; }
.section-head.is-centered .eyebrow::before { display: none; }
.section-head.is-centered p { margin-inline: auto; }
.section-head > p { margin-top: var(--sp-2); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section-sm { padding-block: clamp(52px, 6vw, 88px); }

.bg-bone-200 { background: var(--bone-200); }
.bg-linen    { background: var(--linen); }

.on-ink {
  background: var(--grad-ink);
  color: #E4DFD5;
  position: relative;
}
/* Faint vertical hairline grid on dark chapters */
.on-ink::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: repeating-linear-gradient(
    90deg, transparent 0 119px, rgba(205,191,72,.055) 119px 120px
  );
}
.on-ink > * { position: relative; z-index: 1; }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
/* Deliberately asymmetric splits — never a page of equal boxes.
   These carry their own display:grid so they work on a bare .container. */
.split-7-5,
.split-5-7 {
  display: grid;
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.split-7-5 { grid-template-columns: 7fr 5fr; }
.split-5-7 { grid-template-columns: 5fr 7fr; }

.stack-1 > * + * { margin-top: var(--sp-1); }
.stack-2 > * + * { margin-top: var(--sp-2); }
.stack-3 > * + * { margin-top: var(--sp-3); }
.stack-4 > * + * { margin-top: var(--sp-4); }

.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }

/* Hairline divider with a gilt centre pip */
.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  position: relative;
  margin-block: var(--sp-5);
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gilt);
}

/* ==========================================================================
   ACCESSIBILITY UTILITIES
   ========================================================================== */

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-2);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--gilt);
  padding: 14px 22px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top var(--t-base) var(--ease-out);
}
.skip-link:focus { top: var(--sp-2); }
