/* Fortress Black. The page opens on a fortification plan seen as a photostat negative:
   bone linework on sable. Gamboge is the engineer's wash for works projected and
   marks what the visitor can do. */

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/libre-franklin-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Routed Gothic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/routed-gothic.woff2") format("woff2");
}
@font-face {
  font-family: "Routed Gothic Wide";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/routed-gothic-wide.woff2") format("woff2");
}

/* Stand-ins sized to the real faces, so the words do not reflow when the fonts arrive. */
@font-face { font-family: "Franklin Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 105.1%; ascent-override: 91.9%; descent-override: 23.4%; line-gap-override: 0%; }
@font-face { font-family: "Routed Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 99.4%; }
@font-face { font-family: "Routed Wide Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 124.3%; }

:root {
  --sable: #0a0a09;
  --sable-2: #2b2a26;
  --rule: #33312c;
  --rule-2: #56534b;
  --bone: #ece8dd;
  --bone-2: #bcb8ab;
  --bone-3: #8f8b7f;
  --rule-ink: #0a0a0940;
  --gamboge: #e2a012;

  --f-text: "Libre Franklin", "Franklin Fallback", "Helvetica Neue", Arial, sans-serif;
  --f-letter: "Routed Gothic", "Routed Fallback", "Helvetica Neue", Arial, sans-serif;
  --f-wide: "Routed Gothic Wide", "Routed Wide Fallback", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4.4vw, 4.5rem);
  --bar: 4rem;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--sable); color-scheme: dark; scroll-padding-top: var(--bar); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--rule-2) var(--sable); }
body { margin: 0; background: var(--sable); color: var(--bone); font: 400 1.0625rem/1.55 var(--f-text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
::selection { background: var(--gamboge); color: var(--sable); }
:focus-visible { outline: 2px solid var(--gamboge); outline-offset: 3px; }
h1, h2, p, dl, dd, ul { margin: 0; }
/* Headings are drawn back by the side bearing of their first capital, so its stem stands on the text edge. */
h1, h2 { margin-left: -0.075em; font-weight: 400; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
svg { display: block; }

/* Lettering: the single-stroke capitals of a drawing's notes and title block. */
.letter { font: 400 0.8125rem/1.35 var(--f-letter); letter-spacing: 0.085em; text-transform: uppercase; }

/* Anything longer than a label is set in sentence case, small. */
.small { font-size: 0.875rem; line-height: 1.45; }

/* Holds a dash to the word before it, so that no line begins with the dash. */
.nowrap { white-space: nowrap; }

.skip { position: absolute; z-index: 40; left: var(--gutter); top: -5rem; padding: 0.8rem 1rem; background: var(--gamboge); color: var(--sable); text-decoration: none; }
.skip:focus { top: 0.75rem; }

/* ── Drawings ───────────────────────────────────────────────────────────── */
/* --u is drawing units per CSS pixel. The script keeps it true to the plan's
   scale, so line weights and lettering hold their size on screen at any zoom.
   --line is the ink; --ground is whatever the drawing sits on. */
.dwg { --line: var(--bone); --ground: var(--sable); overflow: visible; }
.dwg path, .dwg circle { fill: none; stroke: var(--line); stroke-linecap: butt; stroke-linejoin: miter; }
.dwg .ln-obj { stroke-width: calc(var(--u) * 2px); }
.dwg .ln-med { stroke-width: calc(var(--u) * 1.25px); stroke-opacity: 0.92; }
.dwg .ln-thin { stroke-width: calc(var(--u) * 1px); stroke-opacity: 0.66; }
.dwg .ln-hair { stroke-width: calc(var(--u) * 0.75px); stroke-opacity: 0.5; }
.dwg .hatch { stroke-width: calc(var(--u) * 0.75px); stroke-opacity: 0.4; }
/* The glacis is ruled in rows. Three cover the slope; five more thin out until the ground is bare. */
.dwg .hach-1 { stroke-width: calc(var(--u) * 1px); stroke-opacity: 0.5; }
.dwg .hach-2 { stroke-width: calc(var(--u) * 0.9px); stroke-opacity: 0.4; }
.dwg .hach-3 { stroke-width: calc(var(--u) * 0.8px); stroke-opacity: 0.31; }
.dwg .hach-4 { stroke-width: calc(var(--u) * 0.75px); stroke-opacity: 0.22; }
.dwg .hach-5 { stroke-width: calc(var(--u) * 0.75px); stroke-opacity: 0.16; }
.dwg .hach-6 { stroke-width: calc(var(--u) * 0.7px); stroke-opacity: 0.115; }
.dwg .hach-7 { stroke-width: calc(var(--u) * 0.7px); stroke-opacity: 0.08; }
.dwg .hach-8 { stroke-width: calc(var(--u) * 0.7px); stroke-opacity: 0.05; }
.dwg .con { stroke-width: calc(var(--u) * 0.75px); stroke-opacity: 0.32; }
.dwg .con--poly { stroke-dasharray: calc(var(--u) * 7px) calc(var(--u) * 5px); }
.dwg .con--capital { stroke-dasharray: calc(var(--u) * 14px) calc(var(--u) * 4px) calc(var(--u) * 2px) calc(var(--u) * 4px); stroke-opacity: 0.24; }
.dwg .con--defence { stroke-dasharray: calc(var(--u) * 2px) calc(var(--u) * 4px); stroke-opacity: 0.4; }
.dwg .con--parade { stroke-dasharray: calc(var(--u) * 3px) calc(var(--u) * 5px); stroke-opacity: 0.5; }
.dwg .block { fill: var(--line); fill-opacity: 0.16; stroke-width: calc(var(--u) * 1px); stroke-opacity: 0.7; }
.dwg .knock { stroke: var(--ground); stroke-width: calc(var(--u) * 9px); }
.dwg .knock--road { stroke-width: calc(var(--u) * 7px); }
.dwg .road { stroke-dasharray: calc(var(--u) * 9px) calc(var(--u) * 3px); stroke-opacity: 0.55; }
/* The numerals of the bastions, the plan's only lettering. */
.dwg .note { fill: var(--line); stroke: none; font: 400 calc(var(--u) * 15px) / 1 var(--f-letter); letter-spacing: 0.04em; text-anchor: middle; dominant-baseline: central; fill-opacity: 0.94; }
.dwg .proj-wash { fill: var(--gamboge); fill-opacity: 0.2; stroke: none; }
.dwg .proj-hatch { stroke: var(--gamboge); stroke-width: calc(var(--u) * 0.75px); stroke-opacity: 0.6; }
.dwg .proj-line { stroke: var(--gamboge); stroke-width: calc(var(--u) * 1.5px); }
/* A point marked on a drawing: a ring and a dot that hold their size on screen. */
.dwg .point__ring { stroke-width: calc(var(--u) * 1.3px); r: calc(var(--u) * 6px); }
.dwg .point__dot { fill: var(--line); stroke: none; r: calc(var(--u) * 1.7px); }

/* ── Bar ────────────────────────────────────────────────────────────────── */
.bar { position: absolute; z-index: 20; inset: 0 0 auto; height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 var(--gutter); border-bottom: 1px solid transparent; transition: background-color 0.3s var(--out), border-color 0.3s var(--out); }
.js .bar { position: fixed; }
.bar.is-stuck { background: var(--sable); border-bottom-color: var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--bone); text-decoration: none; }
.brand__mark { flex: none; width: 1.5rem; height: 1.5rem; }
.brand__name { font: 400 0.9375rem/1 var(--f-wide); letter-spacing: 0.15em; text-transform: uppercase; white-space: nowrap; }
.bar__cta { padding: 0.6875rem 1rem; border: 1px solid var(--bone-3); color: var(--bone); text-decoration: none; white-space: nowrap; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.bar__cta:hover { background: var(--gamboge); border-color: var(--gamboge); color: var(--sable); }
.bar__short { display: none; }

/* ── Sheets ─────────────────────────────────────────────────────────────── */
.sheet { position: relative; padding: clamp(5rem, 9vw, 9rem) var(--gutter) clamp(3.5rem, 6vw, 6rem); }
h2 { font-size: clamp(2.375rem, 1.3rem + 3.7vw, 4.5rem); line-height: 0.98; letter-spacing: -0.036em; }

.btn { display: inline-flex; align-items: center; padding: 1.0625rem 1.5rem; background: var(--gamboge); color: var(--sable); font: 400 0.9375rem/1 var(--f-letter); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: background-color 0.18s var(--out), color 0.18s var(--out); }
.btn:hover { background: var(--bone); }
.btn:active { translate: 0 1px; }

/* ── The general plan: the ground of the first screen ───────────────────── */
.sheet--plan {
  --u: 1.07;
  --copy: 27rem;
  /* The plan is as large as the height allows. Its centre stands at 64vw, or as far to the right of that
     as it must (never past 78vw) to hold the works 2rem clear of the words: the salient of the work
     projected stands 0.404 of the plan's width to the left of its centre. */
  --plan-x: clamp(64vw, var(--gutter) + var(--copy) + 2rem + 0.404 * 112svh, 78vw);
  --plan: min(112svh, (var(--plan-x) - var(--gutter) - var(--copy) - 2rem) / 0.404);
  display: grid; min-height: 100svh; padding: 0; overflow: clip; isolation: isolate;
}
/* The plan and the words are centred on one line: the middle of the screen under the bar. */
.plan-box { position: absolute; z-index: -1; left: var(--plan-x); top: calc(50% + var(--bar) * 0.5); width: var(--plan); aspect-ratio: 1; translate: -50% -50%; }
.plan { width: 100%; height: 100%; }
/* Held back until the script takes over the drawing; shown regardless if it never does. */
.js .sheet--plan:not(.is-live) .plan-box { visibility: hidden; animation: show 0s linear 4s forwards; }
@keyframes show { to { visibility: visible; } }

.hero { position: relative; align-self: center; width: min(var(--copy), 100% - 2 * var(--gutter)); margin: calc(var(--bar) + 1.5rem) var(--gutter) 1.5rem; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -3rem -2.5rem -3rem calc(-1 * var(--gutter)); background: linear-gradient(90deg, var(--sable) calc(100% - 4rem), transparent); -webkit-mask-image: linear-gradient(transparent, #000 3rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(transparent, #000 3rem, #000 calc(100% - 3rem), transparent); pointer-events: none; }
/* Sized by the width of the window and by its height, so a short window keeps the action on the first screen.
   The first size is for a browser that does not know the svh unit. */
h1 { font-size: clamp(3.25rem, 1.1rem + 6.3vw, 6rem); font-size: clamp(3.25rem, min(1.1rem + 6.3vw, 12.5svh), 6rem); line-height: 0.94; letter-spacing: -0.038em; }
.lede { margin-top: 1.75rem; max-width: 33ch; font-size: 1.1875rem; line-height: 1.45; color: var(--bone-2); }
.actions { display: flex; margin-top: 2.25rem; }

/* ── The company, as a positive print ───────────────────────────────────── */
.sheet--company { padding-bottom: clamp(4.5rem, 8vw, 8rem); background: var(--bone); color: var(--sable); }
.sheet--company ::selection { background: var(--sable); color: var(--bone); }
/* The name is set at display size on one line: it runs the width of a phone and holds at 8rem. */
.sheet--company h2 { font-size: clamp(2.5rem, 13.4vw, 8rem); line-height: 0.9; letter-spacing: -0.045em; }
.company__body { margin-top: clamp(1.75rem, 3.6vw, 3rem); max-width: 30em; font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.5rem); line-height: 1.5; color: var(--sable-2); }

/* ── Contact, washed as a work projected ────────────────────────────────── */
.sheet--contact { background: var(--gamboge); color: var(--sable); }
.sheet--contact ::selection { background: var(--sable); color: var(--gamboge); }
.sheet--contact :focus-visible { outline-color: var(--sable); }
/* Two audiences side by side, ruled off above; then the one way to reach us, set large. */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(3rem, 9vw, 10rem); margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.75rem; border-top: 2px solid var(--sable); }
.who__k { display: block; margin-bottom: 0.875rem; }
.who__v { display: block; max-width: 40ch; font-size: 1.1875rem; line-height: 1.45; text-wrap: pretty; }
.contact__direct { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.75rem; border-top: 1px solid var(--rule-ink); max-width: 32em; font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); line-height: 1.4; text-wrap: pretty; }
.contact__direct a { text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; white-space: nowrap; }

/* ── Foot ───────────────────────────────────────────────────────────────── */
/* One row: the name, then contact and privacy. The year stands last, ruled off. */
.foot { padding: clamp(3rem, 6vw, 5rem) var(--gutter) 2rem; }
.foot__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 2rem clamp(2.5rem, 6vw, 7rem); }
.foot__block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1.75rem 2rem; }
.foot__block dt { margin-bottom: 0.25rem; line-height: 1.5rem; color: var(--bone-3); }   /* as tall as the mark, so the row reads on one line */
.foot__block dd { color: var(--bone); }
.foot__block a { display: inline-block; padding: 0.25rem 0; text-decoration: none; }
.foot__block a:hover { text-decoration: underline; }
.foot__legal { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.8125rem; line-height: 1.5; color: var(--bone-3); }

/* ── Off the sheet (404) ────────────────────────────────────────────────── */
.lost { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding: calc(var(--bar) + 3rem) var(--gutter) 4rem; }
.lost__dwg { --u: 1; width: min(100%, 40rem); height: auto; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.lost h1 { margin-left: -0.04em; }   /* a round capital needs less drawing back than a stem */

/* ── Narrow screens ─────────────────────────────────────────────────────── */
@media (max-width: 73.75rem) {
  .sheet--plan { --copy: 25rem; }
}
@media (max-width: 56.25rem) {
  /* One column: the plan stands above the words, as large as the height left over allows, so the action
     stays on the first screen. The words and their margins take about 23.75rem of that height; the works
     reach 0.74 of the plan's width below the bar, and the words begin just under them. */
  .sheet--plan { --plan-x: 53vw; --plan: clamp(10rem, (100svh - var(--bar) - 23.75rem) / 0.74, 118vw); --copy: 34rem; }
  .plan-box { top: calc(var(--bar) + var(--plan) * 0.39); }
  .hero { align-self: end; margin-top: calc(var(--bar) + var(--plan) * 0.74 + 1.25rem); margin-bottom: 2rem; }
  .hero::before { inset: -2rem calc(-1 * var(--gutter)) -2rem; background: linear-gradient(transparent, var(--sable) 2rem); -webkit-mask-image: none; mask-image: none; }
  h1 { font-size: clamp(2.75rem, 1rem + 9vw, 4.5rem); }
  .lede { margin-top: 1.25rem; font-size: 1.0625rem; max-width: 36ch; }
  .actions { margin-top: 1.5rem; }
  /* The plan runs under the bar here, so the bar carries its own ground until the page scrolls. */
  .bar:not(.is-stuck) { background: linear-gradient(var(--sable) 62%, transparent); }
  .foot__row { grid-template-columns: minmax(0, 1fr); }
}
/* On a short phone the plan is very small, and is drawn as the works alone: no construction, no lettering. */
@media (max-width: 56.25rem) and (max-height: 41.5rem) {
  .plan__construct, .plan__notes, .plan .con--parade { display: none; }
}
/* Short desktop windows (a small laptop with the browser's own bars showing, a page zoomed in): the same
   screen, set tighter, so the action stays on it. */
@media (min-width: 56.26rem) and (max-height: 34rem) {
  .hero { margin-top: calc(var(--bar) + 0.75rem); margin-bottom: 0.75rem; }
  .lede { margin-top: 1.25rem; font-size: 1.125rem; }
  .actions { margin-top: 1.5rem; }
}
/* Where "Request Information" no longer fits beside the name, the bar's action is one word. */
@media (max-width: 34rem) {
  .bar__long { display: none; }
  .bar__short { display: inline; }
}
@media (max-width: 40rem) {
  .brand__name { font-size: 0.8125rem; }
  .who, .foot__block { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 23.5rem) {
  .bar { gap: 0.5rem; }
  .brand { gap: 0.5rem; }
  .brand__name { font-size: 0.6875rem; letter-spacing: 0.08em; }
  .bar__cta { padding-inline: 0.625rem; }
}
@media (max-width: 36rem) { .lost__dwg { --u: 1.25; } }
@media (max-width: 30rem) { .lost__dwg { --u: 1.55; } }
@media (max-width: 25rem) { .lost__dwg { --u: 1.9; } }
@media (max-width: 21.5rem) { .lost__dwg { --u: 2.3; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}
@media (forced-colors: active) {
  .dwg path, .dwg circle { stroke: CanvasText; }
  .dwg .note { fill: CanvasText; }
  .btn, .bar__cta { border: 1px solid ButtonText; }
  .dwg .knock { stroke: Canvas; }
  .dwg .point__dot { fill: CanvasText; }
}
