/* Law Vault Pro — Ivory Chambers / Parchment & Ink */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=JetBrains+Mono:wght@400&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --parchment: #F6F3EE;
  --vellum: #EFEBE3;
  --sheet: #FFFFFF;
  --inkband: #0E1A2B;
  --inkband-text: #F4F1EA;
  --text-primary: #1A2332;
  --text-secondary: #4A5568;
  --text-muted: #7A8494;
  --hairline: #D4CFC4;
  --gold: #A68B4B;
  --gold-bright: #C4A862;
  --gold-hairline: rgba(166, 139, 75, 0.35);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --base: 17px;
  --scale: 1.25;
  --s1: calc(var(--base) * var(--scale));
  --s2: calc(var(--s1) * var(--scale));
  --s3: calc(var(--s2) * var(--scale));
  --s4: calc(var(--s3) * var(--scale));
  --s5: calc(var(--s4) * var(--scale));
  --pad-sm: 72px;
  --pad-md: 96px;
  --pad-lg: 120px;
  --pad-xl: 152px;
  --citation: 72px;
  --max: 1180px;
  --measure: 68ch;
  --gutter: clamp(20px, 4vw, 32px);
}

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

html {
  scroll-behavior: smooth;
  font-size: var(--base);
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  line-height: 1.68;
  color: var(--text-primary);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-width: 0;
  padding-bottom: 88px;
}

main {
  overflow-x: clip;
  min-width: 0;
}

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

a { color: var(--text-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Surfaces */
.surface-parchment { background: var(--parchment); color: var(--text-primary); }
.surface-vellum { background: var(--vellum); color: var(--text-primary); }
.surface-sheet { background: var(--sheet); color: var(--text-primary); }
.surface-inkband { background: var(--inkband); color: var(--inkband-text); }

.surface-inkband a { color: var(--inkband-text); }
.surface-inkband a:hover { color: var(--gold-bright); }

/* Layout shell */
.site-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  min-width: 0;
}

@media (min-width: 1100px) {
  .site-shell.has-citation { padding-left: calc(var(--gutter) + var(--citation)); }
}

/* Citation margin */
.citation-rail {
  display: none;
}

@media (min-width: 1100px) {
  .citation-rail {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: var(--citation);
    padding-top: 8px;
  }
  .citation-ref {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 8px 0;
    transition: color 180ms ease;
  }
  .citation-ref.is-active { color: var(--gold); }
}

.citation-inline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

@media (min-width: 1100px) {
  .citation-inline { display: none; }
}

/* Header */
.site-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--s3);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wordmark a { text-decoration: none; color: inherit; }
.wordmark a:hover { color: var(--gold); }

.tagline-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.nav-primary, .nav-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
}

.nav-primary a {
  font-weight: 500;
  text-decoration: none;
  font-size: var(--base);
}

.nav-secondary a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text-secondary);
}

.nav-secondary a:hover { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-drawer { display: none; }
  .nav-drawer.is-open { display: block; }
  .nav-secondary { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: var(--s4); margin-bottom: 24px; word-wrap: break-word; overflow-wrap: break-word; }
h2 { font-size: var(--s3); margin-bottom: 20px; word-wrap: break-word; overflow-wrap: break-word; }
h3 { font-size: var(--s2); margin-bottom: 16px; word-wrap: break-word; overflow-wrap: break-word; }

@media (max-width: 768px) {
  h1 { font-size: var(--s3); }
  h2 { font-size: var(--s2); }
}

.text-gold { color: var(--gold); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.prose {
  max-width: var(--measure);
  min-width: 0;
  overflow-wrap: break-word;
}

.prose p { margin-bottom: 1.2em; }
.prose p:last-child { margin-bottom: 0; }

.prose-secondary { color: var(--text-secondary); }

/* Sections */
.section {
  padding: var(--pad-sm) 0;
}

@media (min-width: 900px) {
  .section { padding: var(--pad-md) 0; }
}

.section-lg { padding: var(--pad-lg) 0; }

@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .section-lg { padding: 64px 0; }
  .hero-inkband { padding: 64px 0 80px; }
}

.hairline-rule {
  height: 1px;
  background: var(--hairline);
  border: none;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 420ms ease;
}

.hairline-rule.is-visible { transform: scaleX(1); }

.hairline-gold {
  height: 1px;
  background: var(--gold-hairline);
  border: none;
}

/* Hero */
.hero-inkband {
  padding: var(--pad-md) 0 var(--pad-lg);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  min-width: 0;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.hero-fields-list {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--inkband-text);
  opacity: 0.85;
  overflow-wrap: break-word;
}

.hero-photo-wrap {
  width: 100%;
  min-width: 0;
}

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

.hero-photo-wrap img {
  border: 1px solid var(--gold-hairline);
}

/* Fields register */
.fields-register { list-style: none; }

.fields-register li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
  min-width: 0;
}

.fields-register li > div {
  min-width: 0;
}

.field-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.field-name {
  font-family: var(--font-display);
  font-size: var(--s2);
  font-weight: 500;
}

.field-desc {
  grid-column: 2;
  color: var(--text-secondary);
  font-size: var(--base);
}

/* Enquiry steps */
.enquiry-steps {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  list-style: none;
  counter-reset: step;
}

.enquiry-steps li {
  counter-increment: step;
  padding-left: 32px;
  position: relative;
}

.enquiry-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* Sectors preview */
.sectors-mixed {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .sectors-mixed {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .sectors-wide { grid-row: span 2; }
}

.sector-block {
  padding: 28px;
  border: 1px solid var(--hairline);
  background: var(--sheet);
  min-width: 0;
  overflow: hidden;
}

.sector-block p,
.sector-block strong {
  overflow-wrap: break-word;
}

/* Chambers glimpse */
.chambers-glimpse {
  display: grid;
  gap: 24px;
  min-width: 0;
}

@media (min-width: 768px) {
  .chambers-glimpse { grid-template-columns: 1fr 1fr; }
}

.photo-frame {
  overflow: hidden;
  min-width: 0;
  line-height: normal;
}

.photo-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--hairline);
}

.sector-block .photo-frame,
.chambers-glimpse .photo-frame,
.contact-grid .photo-frame {
  margin-bottom: 0;
}

.sector-block .photo-frame img,
.chambers-glimpse .photo-frame img {
  aspect-ratio: 3 / 2;
  min-height: 160px;
}

.sectors-wide .photo-frame img {
  aspect-ratio: 4 / 3;
  min-height: 220px;
}

.sector-block--photo .photo-frame img {
  aspect-ratio: 16 / 10;
  min-height: 120px;
  margin-bottom: 12px;
}

.photo-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.photo-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.photo-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sticky sub-nav */
.sub-nav {
  position: sticky;
  top: 0;
  background: var(--vellum);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 0;
  z-index: 10;
  display: none;
}

@media (min-width: 900px) {
  .sub-nav { display: block; }
}

.sub-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
}

.sub-nav a { text-decoration: none; color: var(--text-secondary); }
.sub-nav a:hover { color: var(--gold); }

/* Field entries */
.field-entry {
  padding: var(--pad-sm) 0;
  border-bottom: 1px solid var(--hairline);
}

.field-entry:last-child { border-bottom: none; }

/* Principles blocks */
.principle-block {
  padding: 32px;
  border: 1px solid var(--hairline);
  margin-bottom: 24px;
  background: var(--sheet);
  min-width: 0;
  overflow-wrap: break-word;
}

/* Mandate blocks */
.mandate-block {
  padding: 36px 0;
  border-bottom: 1px solid var(--hairline);
}

/* Timeline */
.timeline { list-style: none; position: relative; padding-left: 48px; min-width: 0; }

@media (max-width: 600px) {
  .timeline { padding-left: 36px; }
  .timeline-item::before { left: -28px; }
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline);
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 8px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  background: var(--parchment);
  border-radius: 50%;
}

.timeline-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 8px;
}

.timeline-artefacts {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--hairline);
  padding: 24px 0;
}

.faq-q {
  font-family: var(--font-display);
  font-size: var(--s1);
  font-weight: 600;
  margin-bottom: 12px;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 40px;
  min-width: 0;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.contact-block address {
  font-style: normal;
  line-height: 1.8;
}

.contact-block a { font-weight: 500; }

/* Maps */
.map-b,
.map-c,
.map-d {
  width: 100%;
  min-width: 0;
}

.map-b > .map-caption {
  padding: 8px var(--gutter) 0;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.map-c,
.map-d {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter) 24px;
  box-sizing: border-box;
}

.map-c .map-caption,
.map-d .map-caption {
  padding-top: 8px;
}

.map-frame {
  border: 1px solid var(--hairline);
  overflow: hidden;
  position: relative;
}

.map-frame iframe {
  width: 100%;
  border: 0;
  display: block;
  filter: saturate(0.88) contrast(0.96);
}

.map-a { height: 300px; }
.map-a .map-frame { height: 100%; min-height: 300px; }
.map-a .map-frame iframe { height: 100%; min-height: 300px; }

@media (min-width: 768px) {
  .map-a .map-frame, .map-a .map-frame iframe { min-height: 500px; }
  .map-a-primary .map-frame { box-shadow: inset 0 0 0 1px var(--gold-hairline); }
}

.map-b { height: 130px; }
.map-b .map-frame, .map-b .map-frame iframe { height: 130px; }

@media (min-width: 768px) {
  .map-b { height: 185px; }
  .map-b .map-frame, .map-b .map-frame iframe { height: 185px; }
}

.map-c .map-frame, .map-c .map-frame iframe { height: 200px; }

@media (min-width: 768px) {
  .map-c .map-frame, .map-c .map-frame iframe { height: 300px; }
}

.map-d .map-frame, .map-d .map-frame iframe { height: 150px; }

@media (min-width: 768px) {
  .map-d .map-frame, .map-d .map-frame iframe { height: 170px; }
}

.map-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  overflow-wrap: break-word;
}

.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  background: var(--vellum);
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}

.map-load-btn {
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--inkband);
  color: var(--inkband-text);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
}

.map-load-btn:hover { background: var(--text-primary); }
.map-load-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  padding: var(--pad-sm) 0 40px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--text-secondary);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-width: 0;
  overflow-wrap: break-word;
}

.footer-entity { font-weight: 500; color: var(--text-primary); margin-bottom: 8px; }

.footer-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }

.footer-disclaimer {
  margin-top: 16px;
  font-size: 14px;
  font-style: italic;
}

/* Cookie consent */
.cookie-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px var(--gutter);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -4px 24px rgba(14, 26, 43, 0.06);
}

.cookie-strip.is-hidden { display: none; }

.cookie-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  justify-content: space-between;
}

.cookie-text {
  flex: 1 1 280px;
  font-size: 15px;
  color: var(--text-secondary);
}

.cookie-text a { color: var(--text-primary); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-btn {
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--hairline);
  background: var(--parchment);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 180ms, color 180ms;
}

.cookie-btn:hover { border-color: var(--gold); color: var(--gold); }
.cookie-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cookie-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -8px 32px rgba(14, 26, 43, 0.1);
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-panel.is-hidden { display: none; }

.cookie-panel-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.cookie-toggle {
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--hairline);
  background: var(--parchment);
  cursor: pointer;
  min-width: 64px;
}

.cookie-toggle[aria-pressed="true"] {
  background: var(--inkband);
  color: var(--inkband-text);
  border-color: var(--inkband);
}

.cookie-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Legal pages */
.legal-content { max-width: var(--measure); min-width: 0; overflow-wrap: break-word; }
.legal-content h2 { margin-top: 40px; }
.legal-content ul, .legal-content ol { margin: 1em 0 1em 1.5em; }
.legal-content li { margin-bottom: 0.5em; }

.disclaimer-block {
  padding: 28px;
  border: 1px solid var(--hairline);
  background: var(--vellum);
  margin: 32px 0;
  font-size: 15px;
  color: var(--text-secondary);
  overflow-wrap: break-word;
}

/* 404 */
.error-links {
  list-style: none;
  margin-top: 24px;
}

.error-links li { margin-bottom: 8px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hairline-rule { transition: none; transform: scaleX(1); }
  .photo-reveal { opacity: 1; transform: none; transition: none; }
  .citation-ref { transition: none; }
}

/* Print */
@media print {
  .cookie-strip, .cookie-panel, .nav-toggle, .map-frame { display: none !important; }
}
