/*! Neutral Compute · https://computeneutral.com/ · Neutral Design System 2.0.0 */
/* Homepage: the Ledger Letter. Paper canvas, Lora headings and Geist interface type. Loads after the core brand tokens. */

:root {
  color-scheme: light;
  --home-ink: #000000; /* Body text on Paper is black (2.0 decision). */
  --home-serif: "Lora", Georgia, "Times New Roman", serif;
  --home-gutter: 16px;
  --home-column: 42.5rem;
  --home-wide: 68.75rem;
  --home-rule: var(--color-silicon);
}

* { box-sizing: border-box; }
html { background: var(--color-paper); }
body {
  margin: 0;
  color: var(--home-ink);
  background: var(--color-paper);
  font-family: var(--home-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 1.3125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, blockquote, ol { margin: 0; }
h1, h2, h3 { font-weight: 600; font-synthesis: none; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
::selection { color: var(--color-paper); background: var(--color-mandate); }

:focus-visible { outline: var(--focus-width) solid var(--color-mandate); outline-offset: var(--focus-offset); }
main:focus { outline: none; }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 20;
  padding: 12px 16px; background: var(--color-mandate); color: var(--color-paper);
  font: 600 1rem/1.2 var(--font-sans); outline: var(--focus-width) solid var(--color-mandate); outline-offset: var(--focus-offset);
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--home-wide) + 2 * var(--home-gutter)); margin-inline: auto; padding-inline: var(--home-gutter); }

/* Masthead: the Nameplate left, access and booking right. */
.masthead__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding-block: 24px; border-bottom: 1px solid var(--home-rule);
}
.masthead__home { display: inline-flex; align-items: center; min-height: var(--target-touch-min); }
.masthead__home:hover { text-decoration: none; }
.masthead__home .nameplate { display: block; width: auto; height: 40px; }
.masthead__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font: 500 1rem/1.2 var(--font-sans); }
.masthead__nav a { display: inline-flex; align-items: center; min-height: var(--target-touch-min); color: var(--home-ink); }
.masthead__nav a:hover { color: var(--color-mandate); }
.masthead__nav .masthead__call { padding: 0 16px; border: 1px solid var(--color-mandate); color: var(--color-mandate); font-weight: 600; }
.masthead__nav .masthead__call:hover { background: var(--color-mandate); color: var(--color-paper); text-decoration: none; }

/* Hero: the descriptor and standfirst beside the tower engraving. */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px 64px; align-items: center; padding-top: clamp(40px, 6vw, 72px);
}
.hero__title { font-size: clamp(2.375rem, 1.4rem + 3.2vw, 3.5rem); line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; }
.hero__standfirst { margin-top: 32px; }
.hero__plate { width: 100%; max-width: 520px; justify-self: center; }
.engraving { display: block; width: 100%; height: auto; }
@keyframes engraving-in { from { opacity: 0; } to { opacity: 1; } }
.engraving-in { animation: engraving-in 1.6s ease-out both; }

/* The letter: contents, the five challenges, the quote. One reading column. */
.letter { width: 100%; max-width: calc(var(--home-column) + 2 * var(--home-gutter)); margin-inline: auto; padding: 32px var(--home-gutter) 0; }
.contents { margin-top: 64px; padding-top: 18px; border-top: 1.5px solid var(--home-ink); scroll-margin-top: 24px; }
.contents__title { margin-bottom: 12px; font-size: 1.5rem; line-height: 1.3; }
.contents__list { padding: 0; list-style: none; }
.contents__entry { display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 6px 0; min-height: var(--target-touch-min); }
.contents__entry:hover { text-decoration: none; }
.contents__entry:hover .contents__text { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.contents__numeral { flex: 0 0 40px; font-weight: 600; }
.contents__leader { flex: 1 1 24px; border-bottom: 1.5px dotted var(--home-rule); transform: translateY(-6px); }
.contents__page { font-variant-numeric: oldstyle-nums; }
.contents__arrow { color: var(--color-mandate); font-size: 0.8em; transition: transform 0.2s; }
.contents__entry:hover .contents__arrow { transform: translateX(3px); }

.essay__chapter { margin-top: 64px; scroll-margin-top: 24px; }
.essay h2 { font-size: clamp(1.625rem, 1.4rem + 0.6vw, 2rem); line-height: 1.2; }
.essay__numeral { margin-right: 8px; color: var(--color-mandate); font-size: 0.5em; vertical-align: 0.9em; line-height: 0; }
.essay__answer { margin-top: 14px; }

/* Interface buttons: Instrument Sans, square, Mandate. */
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--target-touch-min);
  padding: 12px 24px; border: 1px solid var(--color-mandate); background: var(--color-paper);
  color: var(--color-mandate); font: 600 1rem/1.2 var(--font-sans); text-align: center;
}
/* Button colour pairs must beat every link rule (.prose a, .band a, a:hover, :visited).
   The doubled class lifts these above any `.context a` or `.context a:hover` selector. */
:is(a, button, input).cta.cta { background: var(--color-paper); color: var(--color-mandate); text-decoration: none; }
:is(a, button, input).cta.cta:is(:hover, :focus-visible) { background: var(--color-vellum); color: var(--color-mandate); text-decoration: none; }
:is(a, button, input).cta.cta--primary { background: var(--color-mandate); color: var(--color-paper); text-decoration: none; }
:is(a, button, input).cta.cta--primary:is(:hover, :focus-visible) { background: var(--color-vault); color: var(--color-paper); text-decoration: none; }

/* The contact bar inside the five challenges. */
.cta-bar {
  margin-top: 64px; padding: 24px 0; border-block: 1px solid var(--home-rule);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.cta-bar__title { font: 600 0.8125rem/1.2 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-covenant); }
.cta-bar__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.pull-quote { margin-top: 88px; padding: 4px 0 4px 28px; border-left: 2px solid var(--color-bullion); }
.pull-quote p { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 600; line-height: 1.3; color: var(--color-mandate); }

/* Data-hall plate: centred, cropped to the racks. */
.hall { margin-top: 88px; }
.hall__plate { max-width: 880px; margin-inline: auto; }

/* Close */
.closing {
  width: 100%; max-width: calc(var(--home-column) + 2 * var(--home-gutter)); margin: 88px auto 0;
  padding: 40px var(--home-gutter) 0; text-align: center; scroll-margin-top: 24px;
}
.closing h2 { font-size: clamp(1.875rem, 1.5rem + 1.2vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.closing__note { margin-top: 16px; color: var(--color-covenant); }
.closing__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Engraving lamps: a slow gold pulse, phased across the racks. Off under reduced motion. */
.engraving__lamp { opacity: 0.9; }
@keyframes engraving-lamp { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .engraving__lamp { animation: engraving-lamp 3.6s ease-in-out infinite; }
  .engraving__lamp--1 { animation-delay: 0.3s; } .engraving__lamp--2 { animation-delay: 0.6s; } .engraving__lamp--3 { animation-delay: 0.9s; }
  .engraving__lamp--4 { animation-delay: 1.2s; } .engraving__lamp--5 { animation-delay: 1.5s; } .engraving__lamp--6 { animation-delay: 1.8s; }
  .engraving__lamp--7 { animation-delay: 2.1s; } .engraving__lamp--8 { animation-delay: 2.4s; } .engraving__lamp--9 { animation-delay: 2.7s; }
  .engraving__lamp--10 { animation-delay: 3s; } .engraving__lamp--11 { animation-delay: 3.3s; }
}

/* Footer on Paper */
.site-footer { margin-top: 104px; background: var(--color-paper); border-top: 1px solid var(--home-rule); font-family: var(--font-sans); font-weight: 500; font-size: 1rem; line-height: 1.5; }
.site-footer__credits {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 48px;
  padding-block: 32px 28px;
}
.site-footer__credits::after { content: ""; position: absolute; right: var(--home-gutter); bottom: 0; left: var(--home-gutter); height: 1px; background: var(--home-rule); }
.credit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.credit__label { color: var(--home-ink); font-size: 0.875rem; font-weight: 500; }
.credit__mark { position: relative; display: inline-flex; align-items: center; min-height: var(--target-touch-min); }
/* One brand colour: each mark is its vector original, inlined with fill set to Mandate. Proportions are untouched. */
.credit__logo { display: block; color: var(--color-mandate); }
.credit__fluidstack { width: calc(22px * 2550.10135 / 560.068385); height: 22px; }
.credit__aws { width: calc(24px * 304 / 182); height: 24px; }
.credit__ef { width: calc(16px * 184.3 / 12.7); height: 16px; }
.credit__transpose { width: calc(24px * 249 / 32); height: 24px; }

.site-footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 24px 32px;
  padding-block: 32px 8px; font-size: 0.9375rem;
}
.site-footer__home { display: inline-flex; align-items: center; min-height: var(--target-touch-min); }
.site-footer__home .nameplate { display: block; width: 121px; height: auto; }
.site-footer__heading { margin-bottom: 4px; color: var(--home-ink); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer__group ul { margin: 0; padding: 0; list-style: none; }
.site-footer__group a { display: inline-flex; align-items: center; min-height: 40px; color: var(--color-mandate); }
.site-footer__legal { padding-block: 24px 40px; font-size: 0.875rem; text-align: center; color: var(--color-covenant); }

/* Modals: detached Paper overlays (8px radius), 4px controls, 2px focus rings. */
.modal {
  width: min(100% - 32px, 36rem); max-height: calc(100% - 32px); padding: 0; overflow: auto;
  border: 1px solid var(--color-escrow); border-radius: var(--radius-overlay);
  background: var(--color-paper); color: var(--home-ink);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.5;
}
.modal::backdrop { background: rgba(0, 32, 75, 0.6); }
.modal__frame { padding: 24px; }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal__eyebrow { color: var(--color-covenant); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.modal h2 { margin-top: 4px; color: var(--color-mandate); font-family: var(--home-serif); font-size: 2rem; line-height: 1.1; }
.modal__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--target-touch-min); height: var(--target-touch-min); margin: -8px -10px 0 0;
  border: 0; border-radius: var(--radius-control); background: transparent; color: var(--color-mandate); cursor: pointer;
}
.modal__close:hover { background: var(--color-vellum); }
.modal__intro { margin-top: 12px; font-size: 1rem; }
.modal__form { margin-top: 20px; }
.modal__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 600; }
.field--wide { grid-column: 1 / -1; }
.field em { color: var(--color-covenant); font-style: normal; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--target-touch-min); padding: 10px 12px;
  border: 1px solid var(--color-silicon); border-radius: var(--radius-control);
  background: var(--color-paper); color: var(--home-ink); font: 500 1rem/1.4 var(--font-sans);
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--color-mandate); }
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.modal__actions { margin-top: 20px; }
.modal__submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 9rem; min-height: var(--target-touch-min); padding: 10px 24px;
  border: 1px solid var(--color-mandate); border-radius: var(--radius-control);
  background: var(--color-mandate); color: var(--color-paper); font: 600 1rem/1.2 var(--font-sans); cursor: pointer;
}
.modal__submit:hover { background: var(--color-vault); }
.modal__submit[disabled] { cursor: progress; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.modal__submit[aria-busy="true"] .spinner { display: inline-block; animation: modal-spin 800ms linear infinite; }
@keyframes modal-spin { to { transform: rotate(360deg); } }
.modal__status { margin-top: 16px; font-size: 0.9375rem; }
.modal__status:empty { display: none; }
.modal__status:focus { outline: none; }
.modal__status.is-error { color: var(--color-error); }
.modal__status.is-success { color: var(--color-mandate); font-family: var(--home-serif); font-size: 1.375rem; line-height: 1.3; font-weight: 500; }
.modal__privacy { margin-top: 16px; color: var(--color-covenant); font-size: 0.8125rem; }
.modal--booking { width: min(100% - 32px, 56rem); }
.booking-frame { margin-top: 16px; border: 1px solid var(--color-escrow); border-radius: var(--radius-control); overflow: hidden; }
.booking-frame iframe { display: block; width: 100%; height: 640px; min-height: 320px; max-height: calc(100svh - 220px); border: 0; background: var(--color-paper); }
/* After a successful request, only the confirmation and the privacy line remain. */
.modal__form[data-state="done"] .modal__grid,
.modal__form[data-state="done"] > .field,
.modal__form[data-state="done"] .modal__actions { display: none; }

/* The Mandate: a framed document in a dialog. */
.mandate {
  width: min(100% - 32px, 42.5rem); max-height: calc(100% - 48px); padding: 14px; overflow: hidden;
  border: 0; background: var(--color-paper); color: var(--home-ink);
}
.mandate[open] { display: flex; flex-direction: column; }
.mandate::backdrop { background: rgba(0, 49, 102, 0.85); }
.mandate__scroll { overflow: auto; overscroll-behavior: contain; min-height: 0; }
.mandate__frame { border: 1px solid var(--color-mandate); padding: 4px; margin: 11px; }
.mandate__inner { position: relative; border: 0.6px solid var(--color-mandate); padding: 64px clamp(20px, 7vw, 72px) 72px; }
.mandate__corner { position: absolute; width: 20px; height: 20px; background: var(--color-paper); }
.mandate__corner--tl { top: -15px; left: -15px; } .mandate__corner--tr { top: -15px; right: -15px; }
.mandate__corner--bl { bottom: -15px; left: -15px; } .mandate__corner--br { bottom: -15px; right: -15px; }
.mandate__close {
  align-self: flex-end; flex: none; margin: 0 0 6px; display: inline-flex; align-items: center; justify-content: center;
  width: var(--target-touch-min); height: var(--target-touch-min); border: 1px solid var(--color-silicon);
  background: var(--color-paper); color: var(--color-mandate); cursor: pointer;
}
.mandate__close:hover { background: var(--color-vellum); }
.mandate__head { text-align: center; }
.mandate__head .nameplate { display: inline-block; width: auto; height: 32px; }
.mandate h2 { margin-top: 36px; font-variant: small-caps; letter-spacing: 0.14em; font-size: 1.875rem; line-height: 1.2; color: var(--color-mandate); }
.mandate__rule { display: block; width: 72px; margin: 20px auto 0; border-top: 1px solid var(--color-bullion); }
.mandate__standfirst { margin-top: 36px; font-style: italic; line-height: 1.55; text-align: center; }
.mandate__passage { margin-top: 40px; scroll-margin-top: 24px; }
.mandate h3 { font-size: 1.3125rem; line-height: 1.3; }
.mandate__numeral { margin-right: 10px; color: var(--color-mandate); }
.mandate__passage p { margin-top: 10px; font-size: 1.125rem; line-height: 1.6; }
.mandate__passage .mandate__answer { font-style: italic; line-height: 1.5; color: var(--color-mandate); }
.mandate__signature { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-bullion); text-align: center; font-weight: 600; color: var(--color-mandate); }

@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}

@media (max-width: 640px) {
  .masthead__bar { padding-block: 16px; }
  .masthead__home .nameplate { height: 36px; }
  .masthead__nav { gap: 4px 20px; font-size: 0.9375rem; }
  .cta-bar__actions, .closing__actions { width: 100%; }
  .cta-bar__actions .cta, .closing__actions .cta { flex: 1 1 100%; }
  .site-footer__credits { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 24px; }
  .credit { gap: 4px 16px; }
  .credit__label { flex-basis: 100%; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding-top: 24px; }
  .site-footer__brand { grid-column: 1 / -1; }
  .modal__frame { padding: 20px 16px; }
  .modal__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .modal h2 { font-size: 1.75rem; }
  .mandate { width: calc(100% - 16px); max-height: calc(100% - 16px); padding: 8px; }
  .mandate__frame { margin: 8px; }
  .mandate__inner { padding: 48px 20px 48px; }
}

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

/* Mandate foot: book or email, then a smooth handover into the chosen dialog. */
.mandate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 36px 0 8px; padding-top: 28px; border-top: 1px solid var(--color-decorative-rule, #BA9B76); }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: dialog-in 240ms cubic-bezier(0.2, 0.65, 0.3, 1) both; }
  dialog[open]::backdrop { animation: backdrop-in 240ms ease-out both; }
  dialog.is-leaving { animation: dialog-out 220ms cubic-bezier(0.4, 0, 1, 1) both; }
}
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes dialog-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scale(0.985); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

/* The hall engraving sits below the fold: skip its rendering until it nears the viewport. */
figure.hall { content-visibility: auto; contain-intrinsic-size: auto 720px; }
