/* option-prism: Swiss modular grid, image-led. Every value resolves to MASTER.md. */

:root {
  color-scheme: light dark;

  /* primitives */
  --charcoal: hsl(0 0% 29%);
  --leaf: hsl(100 46% 59%);
  --slate: hsl(193 18% 46%);
  --slate-700: hsl(193 18% 34%);
  --sky: hsl(198 75% 86%);
  --paper: hsl(0 0% 97%);
  --ink: hsl(210 11% 15%);
  --white: hsl(0 0% 100%);

  /* semantic, light */
  --surface: var(--paper);
  --surface-2: var(--white);
  --surface-inverse: var(--ink);
  --surface-tint: var(--sky);
  --text: var(--ink);
  --text-2: var(--charcoal);
  --text-muted: var(--slate-700);
  --text-muted-inverse: var(--sky);
  --text-on-inverse: var(--paper);
  --accent: var(--leaf);
  --accent-text: var(--ink);
  --band: var(--slate);
  --line: hsl(0 0% 29% / 0.18);
  --overlay: hsl(210 11% 15% / 0.78);
  --overlay-strong: hsl(210 11% 15% / 0.86);
  --focus: var(--ink);
  --focus-inverse: var(--sky);
  --logo-light: block;
  --logo-dark: none;

  /* type */
  --font-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --t-1: 0.8125rem;
  --t-2: 0.9375rem;
  --t-3: 1.0625rem;
  --t-4: 1.25rem;
  --t-5: 1.5rem;
  --d-1: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  --d-2: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
  --d-3: clamp(3.25rem, 2rem + 7vw, 7.5rem);
  --lh-tight: 0.95;
  --lh-snug: 1.3;
  --lh-body: 1.55;
  --track-display: 0.02em;
  --track-eyebrow: 0.12em;

  /* space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;
  --sect-y: clamp(var(--s-16), 8vw, var(--s-32));
  --gutter: clamp(var(--s-4), 4vw, var(--s-12));
  --grout: var(--s-1);
  --max: 1360px;

  /* shape and motion */
  --r-0: 0;
  --frame: 6px;
  --dot: 10px;
  --line-w: 1px;
  --border-w: 2px;
  --focus-w: 3px;
  --underline-offset: 0.18em;
  --tap: 44px;
  --tap-lg: 48px;
  --logo-h: 44px;
  --logo-h-footer: 32px;
  --avatar: 120px;
  --shadow-header: 0 1px 0 var(--line);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lift: -2px;
  --offscreen: -100px;
  --dur-0: 120ms;
  --dur-1: 240ms;
  --dur-2: 700ms;
  --dur-3: 1400ms;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: var(--ink);
    --surface-2: var(--ink);
    --surface-inverse: var(--paper);
    --surface-tint: var(--ink);
    --text: var(--paper);
    --text-2: var(--sky);
    --text-muted: hsl(198 75% 86% / 0.78);
    --text-muted-inverse: var(--slate-700);
    --text-on-inverse: var(--ink);
    --line: hsl(0 0% 97% / 0.18);
    --focus: var(--sky);
    --focus-inverse: var(--ink);
    --logo-light: none;
    --logo-dark: block;
  }
}

:root[data-theme="dark"] {
  --surface: var(--ink);
  --surface-2: var(--ink);
  --surface-inverse: var(--paper);
  --surface-tint: var(--ink);
  --text: var(--paper);
  --text-2: var(--sky);
  --text-muted: hsl(198 75% 86% / 0.78);
  --text-muted-inverse: var(--slate-700);
  --text-on-inverse: var(--ink);
  --line: hsl(0 0% 97% / 0.18);
  --focus: var(--sky);
  --focus-inverse: var(--ink);
  --logo-light: none;
  --logo-dark: block;
}

@media (min-width: 720px) {
  :root {
    --grout: var(--s-2);
    --header-h: 76px;
    --logo-h: 52px;
    --avatar: 160px;
  }
}

/* base */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-3);
  line-height: var(--lh-body);
  font-feature-settings: "kern";
}

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

a {
  color: inherit;
  text-decoration-thickness: var(--line-w);
  text-underline-offset: var(--underline-offset);
}

:focus-visible {
  outline: var(--focus-w) solid var(--focus);
  outline-offset: var(--focus-w);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-display);
  text-transform: uppercase;
}

h2 {
  font-size: var(--d-2);
}

h3 {
  font-size: var(--t-5);
}

p {
  margin: 0 0 var(--s-4);
}

p:last-child {
  margin-bottom: 0;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: var(--line-w);
  height: var(--line-w);
  margin: calc(-1 * var(--line-w));
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8) var(--gutter);
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  /* column placement on the 12-column grid; single column below this width */
  .intro .grid > :first-child { grid-column: 1 / 7; }
  .intro .grid > :last-child { grid-column: 8 / 13; }
  .service .frame { grid-column: 1 / 8; }
  .service .service__text { grid-column: 8 / 13; }
  .service--flip .frame { grid-column: 6 / 13; grid-row: 1; }
  .service--flip .service__text { grid-column: 1 / 6; grid-row: 1; }
  .context .grid > :first-child { grid-column: 1 / 6; }
  .context .grid > :last-child { grid-column: 6 / 13; }
  .area .grid > :first-child { grid-column: 1 / 6; }
  .area .grid > :last-child { grid-column: 6 / 13; }
  .quote { grid-column: span 6; }
  .prequal .grid > :first-child { grid-column: 1 / 5; }
  .prequal .grid > :last-child { grid-column: 5 / 13; }
  .contact .grid > :first-child { grid-column: 1 / 8; }
  .contact .grid > :last-child { grid-column: 8 / 13; }
}

.section {
  padding-block: var(--sect-y);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-4);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: var(--dot);
  height: var(--dot);
  background: var(--accent);
}

.lede {
  font-size: var(--t-4);
  line-height: var(--lh-snug);
  color: var(--text-2);
  max-width: 44ch;
}

.todo {
  font-family: var(--font-mono);
  font-size: var(--t-1);
  color: var(--text-muted);
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap-lg);
  padding: var(--s-3) var(--s-6);
  border: var(--border-w) solid var(--accent);
  border-radius: var(--r-0);
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-body);
  font-size: var(--t-3);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur-1) var(--ease);
}

.btn:hover {
  transform: translateY(var(--lift));
}

.btn--outline {
  background: transparent;
  border-color: currentcolor;
  color: inherit;
}

.btn--on-image {
  color: var(--paper);
}

.btn--pending {
  border-style: dashed;
  cursor: default;
}

.btn--pending:hover {
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

/* skip link */

.skip {
  position: absolute;
  top: var(--offscreen);
  left: var(--s-4);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--accent);
  color: var(--accent-text);
}

.skip:focus {
  top: var(--s-4);
}

/* header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-2);
  box-shadow: var(--shadow-header);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  flex: none;
}

.logo img {
  width: auto;
  height: var(--logo-h);
}

.logo__light {
  display: var(--logo-light);
}

.logo__dark {
  display: var(--logo-dark);
}

.nav {
  display: none;
}

.nav ul {
  display: flex;
  gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--t-2);
  font-weight: 500;
  text-decoration: none;
  border-bottom: var(--border-w) solid transparent;
}

.nav a:hover,
.nav a[aria-current="true"] {
  border-bottom-color: var(--accent);
}

.header__cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: 0 var(--s-3);
  border: var(--border-w) solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--t-2);
  font-weight: 500;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] + .nav,
.nav.is-open {
  display: block;
  position: absolute;
  inset: var(--header-h) 0 auto 0;
  padding: var(--s-4) var(--gutter) var(--s-6);
  background: var(--surface-2);
  box-shadow: var(--shadow-header);
}

.nav.is-open ul {
  flex-direction: column;
  gap: 0;
}

.nav.is-open a {
  width: 100%;
  min-height: var(--tap-lg);
  border-bottom: var(--line-w) solid var(--line);
}

/* without JavaScript the toggle cannot open the sheet, so the nav renders inline and the bar wraps */
html.no-js .nav-toggle {
  display: none;
}

html.no-js .header__bar {
  height: auto;
  min-height: var(--header-h);
  flex-wrap: wrap;
  padding-block: var(--s-2);
}

html.no-js .nav {
  display: block;
}

html.no-js .nav ul {
  flex-wrap: wrap;
  gap: 0 var(--s-4);
}

@media (min-width: 960px) {
  .nav,
  .nav.is-open {
    display: block;
    position: static;
    padding: 0;
    box-shadow: none;
  }

  .nav.is-open ul {
    flex-direction: row;
    gap: var(--s-6);
  }

  .nav.is-open a {
    width: auto;
    border-bottom: var(--border-w) solid transparent;
  }

  .nav-toggle {
    display: none;
  }

  .header__cta {
    display: inline-flex;
    min-height: var(--tap);
    padding-block: var(--s-2);
  }
}

/* hero */

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - var(--header-h));
  background: var(--ink);
  color: var(--paper);
  isolation: isolate;
  --focus: var(--sky);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--overlay-strong) 0%, var(--overlay) 60%, var(--overlay) 100%);
}

.hero__body {
  align-self: end;
  padding-block: var(--s-16) var(--s-12);
}

.hero__grid {
  display: grid;
  gap: var(--s-8);
}

.hero h1 {
  font-size: var(--d-3);
  max-width: 12ch;
  border-left: var(--frame) solid var(--accent);
  padding-left: var(--s-5);
}

.hero .lede {
  color: var(--paper);
  max-width: 40ch;
}

.hero .eyebrow {
  color: var(--sky);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--t-4);
  letter-spacing: var(--track-eyebrow);
  color: var(--sky);
}

@media (min-width: 720px) {
  .hero__body {
    padding-block: var(--s-24) var(--s-16);
  }

  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
  }

  .hero__grid > :first-child {
    grid-column: 1 / 9;
  }

  .hero__grid > :last-child {
    grid-column: 1 / 8;
  }
}

@media (min-width: 1080px) {
  .hero__grid > :last-child {
    grid-column: 9 / 13;
    align-self: end;
  }
}

/* intro strip */

.intro {
  background: var(--surface-2);
  border-bottom: var(--line-w) solid var(--line);
}

.intro h2 {
  font-size: var(--d-1);
}

.intro p {
  color: var(--text-2);
}

/* frame image */

.frame {
  position: relative;
  margin: 0;
  background: var(--surface-inverse);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.frame::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--frame);
  background: var(--accent);
}

.frame--band::before {
  background: var(--band);
}

/* services */

.service {
  padding-block: var(--sect-y);
  border-top: var(--line-w) solid var(--line);
}

.service:first-of-type {
  border-top: 0;
}

.service h3 {
  font-size: var(--d-1);
  margin-bottom: var(--s-4);
}

.service__text p {
  color: var(--text-2);
}

.terms {
  margin: var(--s-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.terms dt {
  font-family: var(--font-display);
  font-size: var(--t-4);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

.terms dd {
  margin: 0 0 var(--s-2);
  color: var(--text-2);
}

@media (min-width: 720px) {
  .terms {
    grid-template-columns: max-content 1fr;
    gap: var(--s-2) var(--s-6);
  }

  .terms dd {
    margin: 0;
  }
}

/* image band (four renders, grout gaps): two by two, four across from 1080px */

.band {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grout);
  background: var(--surface-inverse);
  padding: var(--grout);
}

.band .frame::before {
  display: none;
}

@media (min-width: 1080px) {
  .band {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* market context */

.context {
  background: var(--surface-tint);
}

.context h2 {
  font-size: var(--d-1);
}

.stat-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-4);
}

.stat-list li {
  padding: var(--s-4) 0 var(--s-4) var(--s-5);
  border-left: var(--frame) solid var(--band);
  color: var(--text-2);
}

.stat-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-5);
  font-weight: 400;
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  color: var(--text);
}

@media (min-width: 720px) {
  .stat-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-6);
  }
}

/* service area */

.area h2 {
  font-size: var(--d-1);
}

.area p {
  color: var(--text-2);
}

.city-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grout);
}

.city-grid li {
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: var(--line-w) solid var(--line);
  border-left: var(--frame) solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--t-5);
  letter-spacing: var(--track-display);
  text-transform: uppercase;
}

.county-line {
  margin-top: var(--s-6);
  color: var(--text-2);
}

.county-line strong {
  font-weight: 600;
  color: var(--text);
}

@media (min-width: 720px) {
  .city-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* project wall */

.wall {
  background: var(--surface-inverse);
  color: var(--text-on-inverse);
}

.wall .eyebrow {
  color: var(--text-on-inverse);
}

.wall__head {
  display: grid;
  gap: var(--s-6);
  margin-bottom: var(--s-12);
}

.wall__head p {
  max-width: 52ch;
}

.wall__grid {
  display: grid;
  gap: var(--grout);
}

.sector {
  background: var(--surface-inverse);
}

.sector h3 {
  padding: var(--s-4) 0;
  border-bottom: var(--frame) solid var(--accent);
  margin-bottom: var(--grout);
}

.sector ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--grout);
}

.tile {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  color: var(--text);
  font-size: var(--t-2);
}

.tile__name {
  flex: 1 1 auto;
}

.tile__place {
  color: var(--text-muted);
}

.tile__value {
  flex: none;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-1);
  color: var(--text-muted);
}

@media (min-width: 720px) {
  .wall__head {
    grid-template-columns: 5fr 7fr;
    align-items: end;
  }

  .wall__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .wall__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* testimonials */

.quotes .grid {
  gap: var(--s-12) var(--gutter);
}

.quotes h2 {
  grid-column: 1 / -1;
  font-size: var(--d-1);
}

.quote {
  margin: 0;
  padding-left: var(--s-5);
  border-left: var(--frame) solid var(--band);
}

.quote p {
  font-size: var(--t-4);
  line-height: var(--lh-snug);
  color: var(--text-2);
}

.quote footer {
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-4);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* prequal facts */

.prequal {
  background: var(--surface-tint);
}

.prequal h2 {
  font-size: var(--d-1);
}

.facts {
  margin: 0;
  display: grid;
  gap: var(--grout);
}

.facts > div {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-4);
  background: var(--surface);
  border: var(--line-w) solid var(--line);
  border-left: var(--frame) solid var(--band);
}

.facts dt {
  font-family: var(--font-display);
  font-size: var(--t-4);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

.facts dd {
  margin: 0;
  color: var(--text-2);
}

@media (min-width: 720px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* contact */

.contact {
  background: var(--surface-inverse);
  color: var(--text-on-inverse);
}

.contact .eyebrow {
  color: var(--text-on-inverse);
}

/* the first column sits directly on the inverse ground; the person card in the second column is a surface tile and keeps the base tokens */
.contact .grid > :first-child {
  --text-muted: var(--text-muted-inverse);
  --focus: var(--focus-inverse);
}

.contact p {
  max-width: 48ch;
}

.contact .btn--outline {
  color: var(--text-on-inverse);
}

.person {
  display: grid;
  grid-template-columns: var(--avatar) 1fr;
  gap: var(--s-5);
  align-items: start;
  padding: var(--s-5);
  background: var(--surface);
  color: var(--text);
}

.person img {
  width: var(--avatar);
  height: var(--avatar);
  object-fit: cover;
}

.person h3 {
  font-size: var(--t-5);
}

.person__role {
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}

.person a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.person .mono {
  font-size: var(--t-2);
}

/* footer */

.footer {
  padding-block: var(--s-10);
  background: var(--surface-2);
  border-top: var(--line-w) solid var(--line);
  font-size: var(--t-2);
  color: var(--text-2);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4) var(--s-8);
}

.footer .logo img {
  height: var(--logo-h-footer);
}

.footer__note {
  margin-top: var(--s-6);
  font-size: var(--t-1);
  color: var(--text-muted);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-3);
  border: var(--border-w) solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--t-2);
  cursor: pointer;
}

/* motion: one entrance on the hero, one reveal on framed images */

.hero__body > * {
  opacity: 0;
  transform: translateY(var(--s-6));
  animation: rise var(--dur-2) var(--ease) forwards;
}

.hero__body > :nth-child(2) {
  animation-delay: var(--dur-0);
}

.hero__media img {
  transform: scale(1.06);
  animation: settle var(--dur-3) var(--ease) forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  to {
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(var(--s-6));
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

.reveal.is-in,
html.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__body > *,
  .hero__media img,
  .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}
