/* The brand's own faces (old DESIGN.md section 2), self-hosted, OFL. Plex Mono is only in the footer lockup. */
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-variable.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-vf-upright.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; } /* taste-skill-ignore: brand lockup only (Wordmark.astro) */

/* Blueprint blue, the owner-approved palette (old DESIGN.md section 1, exact). Light (daytime) is the
   default for every first visit whatever the OS preference (D-10); dusk only on the toggle.
   --field is blueprint, --brass is a draughtsman blue-grey (not brass), --slate is enamel. */
:root {
  --m: clamp(20px, 5vw, 88px);
  --gut: clamp(12px, 1.6vw, 28px);
  --gap: clamp(72px, 9vw, 144px);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  /* five sizes, no more */
  --t-small: 1rem;
  --t-body: clamp(1.125rem, 1.06rem + 0.28vw, 1.25rem);
  --t-lead: clamp(1.375rem, 1.2rem + 0.75vw, 1.875rem);
  --t-head: clamp(2.375rem, 1.4rem + 3.6vw, 4.75rem);
  --t-xs: 0.875rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ink: #131A1E;  --ink-2: #39464E;  --ink-3: #5F6D76;
  --field: #123246;  --field-dk: #0C2432;
  --brass: #3E6076;  --brass-hi: #4E7590;  --brass-dk: #2C4757;
  --paper: #F4F5F3;  --paper-2: #E9EBE8;  --paper-3: #DCDFDB;
  --slate: #94B5C9;  --rule: #C6CCCE;  --card: #FBFBF9;
  --day: 1; --dusk: 0;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #E8EDF0;  --ink-2: #B4C0C8;  --ink-3: #86939C;
  --field: #8FB6D0;  --field-dk: #769EB9;
  --brass: #9FBACD;  --brass-hi: #BDD2E0;  --brass-dk: #B0C8D8;
  --paper: #0E1418;  --paper-2: #151D22;  --paper-3: #1E272D;
  --slate: #A9C4D4;  --rule: #2B363D;  --card: #131B20;
  --day: 0; --dusk: 1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--sans);
  font-kerning: normal;
  transition: background-color 600ms ease, color 600ms ease;
  display: flex; flex-direction: column; min-height: 100svh;
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: var(--t-head); }
p, ul, dl, figure { margin: 0; }
p { max-width: 62ch; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; transition: text-decoration-color 180ms ease, text-decoration-thickness 180ms ease; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-thickness: 3px; } }
a[href^="mailto:"] { overflow-wrap: anywhere; }
a[href^="tel:"] { white-space: nowrap; }
/* Links inside running text get a 44px tall target without moving the lines. */
p a:not(.btn) { padding-block: 12px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--field); color: var(--paper); }
.skip { position: absolute; left: var(--m); top: -100px; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 10; }
.skip:focus { top: 16px; }
.lead { font-size: var(--t-lead); line-height: 1.32; font-family: var(--serif); max-width: 30ch; }
.small { font-size: var(--t-small); color: var(--ink-2); }

/* One grid for every page: equal outer margins, twelve columns. */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); padding-inline: var(--m); }
.grid > * { grid-column: 1 / -1; }
.section { padding-block: var(--gap); }

/* Buttons: square, flat, one fill (the brand's Field button); a 3px brass rule wipes in on hover. */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  background: var(--field); color: var(--paper);
  font: 600 var(--t-body)/1.2 var(--sans); letter-spacing: 0.01em; text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: background-color 180ms ease, transform 140ms var(--ease-out);
}
.btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--field-dk); } .btn:hover::after { transform: scaleX(1); } }
.btn:active { transform: scale(0.97); }

/* Header: the full legal name, three links, and the phone and email. */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 clamp(18px, 2.2vw, 36px); padding: 14px var(--m) 0; font-size: var(--t-small); position: relative; z-index: 2; }
.bar__name { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font: 600 var(--t-small)/1.15 var(--sans); letter-spacing: 0.005em; text-decoration: none; margin-right: auto; }
/* The three-block mark, from Logo.astro: blueprint, draughtsman, enamel. */
.mark { flex: none; }
.mark__rule { stroke: var(--brass); }
.mark__field { fill: var(--field); }
.mark__brass { fill: var(--brass); }
.mark__slate { fill: var(--slate); }
.bar ul { display: flex; flex-wrap: wrap; align-items: center; column-gap: clamp(18px, 2vw, 30px); list-style: none; padding: 0; }
.bar a:not(.bar__name) { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
.bar nav a { text-decoration: none; }
.bar nav a[aria-current="page"] { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .bar nav a:hover { text-decoration: underline; } }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; transition: transform 140ms var(--ease-out); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle[hidden] { display: none; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: inline; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (max-width: 1099px) {
  .bar__name { flex: 1 1 auto; min-width: 0; }
  .theme-toggle { order: 1; }
  .bar nav { order: 2; margin-right: auto; }
  .bar__reach { order: 3; }
  .bar nav, .bar__reach { flex-basis: auto; }
}
@media (max-width: 1099px) and (min-width: 600px) { .bar nav { flex: 1 0 auto; } }
/* On a phone the phone and email sit in each page's own first screen instead. */
@media (max-width: 599px) { .bar .bar__reach { display: none; } .bar nav { flex: 1 0 100%; } .bar ul { column-gap: 22px; } }

/* Pictures: a day and a dusk version of each scene, stacked. The theme decides which shows; it never
   changes on scroll, only when the theme changes (then it crossfades, like the light going down). */
.pic { position: relative; display: grid; overflow: hidden; background: var(--paper-3); }
.pic > img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.pic > .is-day { opacity: var(--day); transition: opacity 1200ms ease; }
.pic > .is-dusk { opacity: var(--dusk); transition: opacity 1200ms ease; }
.pic--wide { aspect-ratio: 16 / 9; }
.pic--sq { aspect-ratio: 1; }
.pic--tall { aspect-ratio: 4 / 5; }
.pic--photo { aspect-ratio: 900 / 1074; }
figcaption { margin-top: 12px; font-size: var(--t-small); color: var(--ink-2); max-width: 40ch; }

/* Lists of phone and email: each a full 44px target. */
.reach-list { list-style: none; padding: 0; display: grid; gap: 0; }
.reach-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* HOME. Hero: two prints lit on the dark field, the name docked bottom-left. */
.hero { grid-template-rows: minmax(260px, 1fr) auto; row-gap: clamp(24px, 4.5vh, 48px); padding-block: 20px clamp(28px, 5vh, 56px); height: calc(100svh - var(--bar-h, 58px)); min-height: 560px; max-height: 1080px; }
/* The header wraps to two rows below 1100px. */
@media (max-width: 1099px) { .hero { --bar-h: 108px; } }
/* The house fills what the window leaves above the name, so the name and the button stay on the first screen. */
.hero__main { grid-column: 3 / -1; grid-row: 1; margin-right: calc(var(--m) * -1); aspect-ratio: auto; height: 100%; min-height: 0; }
.hero__main > img { animation: drift 16s var(--ease-out) both; object-position: 50% 30%; } /* keeps the roofline in the widest (2.8:1) frames */
.hero__small { grid-column: 1 / 4; grid-row: 1; align-self: end; margin-bottom: -8%; z-index: 1; }
.hero__title { grid-column: 1 / 7; grid-row: 2; align-self: end; font-size: var(--t-head); line-height: 1; }
.hero__side { grid-column: 7 / -1; grid-row: 2; align-self: end; display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: end; justify-items: start; }
.hero__lead { grid-column: 1 / -1; font-size: var(--t-body); max-width: 44ch; }
@media (max-width: 899px) {
  .hero { height: auto; min-height: 0; max-height: none; grid-template-rows: auto; padding-top: 12px; row-gap: 0; }
  .hero__main { grid-column: 1 / -1; margin-inline: calc(var(--m) * -1); aspect-ratio: 16 / 10; height: auto; }
  .hero__small { grid-column: 1 / 4; grid-row: 2; align-self: start; margin: -12% 0 0; }
  .hero__title { grid-column: 1 / -1; grid-row: 3; margin-top: 24px; }
  .hero__side { grid-column: 1 / -1; grid-row: 4; margin-top: 18px; grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 599px) {
  .hero__main { aspect-ratio: 4 / 3; }
  .hero__small { display: none; }
  .hero__title { margin-top: 22px; }
}

.page-head__text .lead { max-width: 46ch; font-size: min(var(--t-lead), 1.5rem); }
@media (max-width: 599px) {
  .owner__portrait, .person__card, .page-head__pic, .page-head__pic--side, .page-head__pic--sq { grid-column: 1 / -1; }
}

/* Owner: James's portrait and the heading share one top edge. */
.owner { row-gap: 32px; align-items: center; }
.owner__portrait { grid-column: 2 / 6; }
.owner__head { grid-column: 7 / -1; display: grid; gap: 24px; justify-items: start; }
.owner__head > a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 899px) { .owner__portrait { grid-column: 1 / 9; } .owner__head { grid-column: 1 / -1; } }

/* Inner pages: title and reach on the left, one print on the right. */
.page-head { row-gap: 36px; align-items: start; padding-block: clamp(36px, 8vh, 96px) var(--gap); }
.page-head__text { grid-column: 1 / 7; display: grid; gap: 26px; justify-items: start; align-content: start; }
.page-head__text h1 { font-size: var(--t-head); }
.page-head__pic { grid-column: 8 / -1; margin-right: calc(var(--m) * -1); }
@media (max-width: 899px) {
  .page-head__text { grid-column: 1 / -1; }
  .page-head__pic, .page-head__pic--side { grid-column: 3 / -1; margin-right: 0; position: static; }
}
.prose { display: grid; gap: 18px; }
.prose p { max-width: 64ch; }

/* James page */
/* James's portrait on the right margin, the gate print overlapping its lower-left corner. */
.person__card { grid-column: 8 / -1; justify-self: end; width: 100%; max-width: 460px; display: grid; }
.person__card > .pic { grid-area: 1 / 1; }
.person__small { width: 40%; align-self: end; justify-self: start; transform: translate(-45%, 14%); z-index: 1; }
@media (max-width: 899px) { .person__card { grid-column: 1 / -1; justify-self: start; } .person__small { width: 36%; transform: translate(0, 18%); justify-self: end; } }
.page-head__pic--sq { grid-column: 8 / 12; margin-right: 0; }
.page-head__pic--side { grid-column: 8 / 12; margin-right: 0; position: sticky; top: 6vh; }
@media (max-width: 899px) { .page-head__pic--sq { grid-column: 1 / 9; } }
/* Phones: the privacy print would only trail the text as a thumbnail, so it is left out. */
@media (max-width: 599px) { .page-head__pic--side { display: none; } }
.h-sub { font-size: var(--t-lead); margin-top: 12px; }
.reach-dl { display: grid; gap: 10px; }
.reach-dl dt { font-size: var(--t-small); color: var(--ink-2); }
.reach-dl dd { margin: 0; }
.reach-dl a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* Contact form: filled fields (no outlines at rest), labels close to their fields. */
.form { display: grid; gap: 22px; max-width: 34rem; width: 100%; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field label span { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 var(--t-body)/1.4 var(--sans); color: var(--ink);
  background: var(--paper-3); border: 0; border-bottom: 2px solid var(--ink-3); border-radius: 0;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-bottom-color: var(--field); }
.field__hint { font-size: var(--t-small); color: var(--ink-2); }
.form .btn { justify-self: start; }
.form__note { font-size: var(--t-small); color: var(--ink-2); }
/* The honeypot: off-screen for people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: honeypot box, not a rule */
.contact .page-head__text { grid-row: 1; }
.contact__pic { grid-column: 1 / 7; grid-row: 2; }
.contact .form { grid-column: 8 / -1; grid-row: 1 / 3; align-self: start; max-width: none; }
@media (max-width: 899px) {
  .contact__pic { grid-column: 1 / -1; grid-row: 3; }
  .contact .form { grid-column: 1 / -1; grid-row: 2; }
}

/* Footer: a slim close. The full stacked lockup, the legal lines, the pages. */
.foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 clamp(28px, 4vw, 64px); padding: 20px var(--m); background: var(--paper-2); font-size: var(--t-small); line-height: 1.45; color: var(--ink-2); }
.foot .wordmark { grid-row: 1 / 3; }
.foot__id { display: grid; gap: 2px; max-width: 80ch; padding-top: 6px; }
.foot__id p:first-child { color: var(--ink); }
.foot__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; column-gap: 22px; color: var(--ink); }
.foot__links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
@media (min-width: 1280px) {
  .foot { grid-template-columns: auto minmax(0, 1fr) auto; }
  .foot__links { grid-column: 3; grid-row: 1 / 3; justify-content: flex-end; max-width: 380px; }
}
@media (max-width: 599px) {
  .foot { grid-template-columns: 1fr; padding-block: 20px 8px; row-gap: 10px; font-size: 0.9375rem; line-height: 1.4; }
  .foot .wordmark { grid-row: auto; justify-self: start; }
  .foot__id { padding-top: 0; }
}

/* The full stacked lockup, from Wordmark.astro, exact: never below 240px wide. */
.wordmark { display: grid; justify-items: center; gap: 0.15rem; width: 15rem; text-transform: uppercase; color: var(--ink); }
.wordmark__veteran { font-family: var(--serif); font-weight: 700; font-size: 1.75rem; line-height: 1.1; letter-spacing: 0.02em; }
.wordmark__frontline { font-family: var(--sans); font-weight: 700; font-size: 1.35rem; line-height: 1.1; letter-spacing: 0.08em; }
.wordmark__services { font-family: var(--mono); font-size: 0.9rem; line-height: 1.6; letter-spacing: 0.3em; color: var(--field); margin-right: -0.3em; } /* taste-skill-ignore: brand lockup */
.wordmark__joint { display: flex; align-items: center; gap: 0.4rem; width: 100%; max-width: 16rem; margin-top: 0.4rem; }
.wordmark__joint i { flex: 1; height: 3px; background: var(--brass); }
.wordmark__joint b { width: 0.8rem; height: 0.8rem; }
.wordmark__joint .j-slate { background: var(--slate); }
.wordmark__joint .j-brass { background: var(--brass); }
.wordmark__joint .j-field { background: var(--field); }

/* Motion: the hero prints rise on arrival and the main print settles slowly; section parts rise in
   once as they arrive. Without script or with reduced motion everything is simply there. */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.07); } to { transform: scale(1); } }
.bar > * { animation: rise 700ms var(--ease-out) both; }
.bar > :nth-child(3) { animation-delay: 60ms; }
.bar > :nth-child(4) { animation-delay: 120ms; }
.bar > :nth-child(5) { animation-delay: 180ms; }
.form > * { animation: rise 800ms var(--ease-out) both; }
.form > :nth-child(2) { animation-delay: 220ms; }
.form > :nth-child(3) { animation-delay: 280ms; }
.form > :nth-child(4) { animation-delay: 340ms; }
.form > :nth-child(n+5) { animation-delay: 400ms; }
.hero__main { animation: rise 1100ms var(--ease-out) both; }
.hero__small { animation: rise 1100ms 220ms var(--ease-out) both; }
.hero__title { animation: rise 1000ms 380ms var(--ease-out) both; }
.hero__side { animation: rise 1000ms 520ms var(--ease-out) both; }
.page-head__text > * { animation: rise 900ms var(--ease-out) both; }
.page-head__text > :nth-child(2) { animation-delay: 90ms; }
.page-head__text > :nth-child(3) { animation-delay: 180ms; }
.page-head__text > :nth-child(n+4) { animation-delay: 270ms; }
.page-head > .pic, .person__card, .contact__pic { animation: rise 1100ms 160ms var(--ease-out) both; }
.js [data-rise] > * { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
.js [data-rise].in > * { opacity: 1; transform: none; }
.js [data-rise].in > :nth-child(2) { transition-delay: 90ms; }
.js [data-rise].in > :nth-child(3) { transition-delay: 180ms; }
.js [data-rise].in > :nth-child(4) { transition-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-rise] > * { opacity: 1; transform: none; }
}
