/* Modern Tile Company, round two, option Cadence.
   Look: "Grout line". The page is a tiled surface: ink tiles separated by
   paper grout, images set into frames, the logo's nested-square tile used
   as the one signature motif. Tokens come from the logo; ink is the one
   added deep neutral. */

:root {
  --charcoal: #4A4A4A;
  --leaf: #87C767;
  --slate: #61828B;
  --sky: #C1E6F6;
  --paper: #F8F8F8;
  --ink: #22262A;
  --white: #FFFFFF;

  --grout: 3px;
  --header-h: 75px; /* 72px row plus the 3px grout border; same at every width */
  --font-display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1320px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::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(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; }

/* Focus: an ink ring set off by a paper halo. On paper, sky and leaf the
   ring carries the contrast (14.3, 11.5, 7.5); on ink and charcoal the halo
   does (14.3, 8.3). Every surface has a 3px band at 3:1 or better. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--paper);
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 100; text-decoration: none;
}
.skip:focus-visible { top: 1rem; }

/* Type */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: .92;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(3.25rem, 11vw, 8rem); }
h2 { font-size: clamp(2.75rem, 6.5vw, 5rem); }
h3 { font-size: clamp(1.85rem, 3.2vw, 2.5rem); }
p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.on-dark .label { color: var(--sky); }

.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; }

.todo { color: var(--charcoal); font-weight: 600; }
.on-dark .todo { color: var(--sky); }

/* Layout */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
section { padding-block: clamp(4rem, 9vw, 8rem); }
.on-dark { background: var(--ink); color: var(--paper); }
.on-sky { background: var(--sky); color: var(--ink); }

.section-head { margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head .label { display: block; margin-bottom: .75rem; }
.rule {
  display: block; height: var(--grout); width: 100%;
  background: var(--leaf); margin-top: 1.25rem;
  transform-origin: left center;
}

/* Signature motif: the nested-square tile */
.tile-mark {
  display: inline-block; width: 1em; height: 1em; flex: none;
  background:
    linear-gradient(var(--sky), var(--sky)) center / 44% 44% no-repeat,
    linear-gradient(var(--slate), var(--slate)) center / 76% 76% no-repeat,
    var(--leaf);
  vertical-align: -.1em;
}
.tile-mark.is-charcoal {
  background:
    linear-gradient(var(--sky), var(--sky)) center / 44% 44% no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) center / 76% 76% no-repeat,
    var(--leaf);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.35rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; line-height: 1.2;
  border: 2px solid transparent;
  transition: transform .25s var(--ease-out), background-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-leaf { background: var(--leaf); color: var(--ink); border-color: var(--leaf); }
.btn-leaf:hover { background: var(--sky); border-color: var(--sky); }
.btn-outline { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-outline:hover { background: var(--paper); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink:hover { background: var(--charcoal); border-color: var(--charcoal); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: var(--grout) solid var(--ink);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: calc(var(--header-h) - var(--grout));
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 150px; height: 57px; }
.nav { display: none; gap: 1.6rem; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .5rem 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--grout); background: var(--leaf);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.header-cta { display: flex; align-items: center; gap: .75rem; }
.header-cta .phone {
  text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.header-cta .btn { display: none; min-height: 44px; padding: .5rem 1rem; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-cta .btn { display: inline-flex; }
}

/* Hero */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100vh, 960px); min-height: min(100svh, 960px);
  display: grid; align-items: end;
  padding: 0; color: var(--paper);
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; z-index: -2; 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(to top, rgba(34, 38, 42, .92) 0%, rgba(34, 38, 42, .55) 45%, rgba(34, 38, 42, .15) 100%);
}
/* The set: 24 ink tiles over the image, lifted in a diagonal wave on load.
   Last tile (--i: 8) finishes at 100 + 8 * 55 + 700 = 1140ms, so the image
   is clear before 1.3s; script.js removes the set at 2s as a fallback. */
.hero-set {
  position: absolute; inset: 0; z-index: -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--grout);
  pointer-events: none;
}
.hero-set span {
  background: var(--ink);
  animation: lift .7s var(--ease-out) both;
  animation-delay: calc(var(--i) * 55ms + 100ms);
}
@keyframes lift {
  to { opacity: 0; transform: translateY(-6%) scale(.96); }
}
@media (min-width: 720px) { .hero-set { grid-template-columns: repeat(6, 1fr); } }

.hero-copy {
  padding-block: clamp(7rem, 16vw, 11rem) clamp(2.5rem, 5vw, 4rem);
  display: grid; gap: 1.5rem;
}
.hero-copy .label { color: var(--sky); animation: rise .8s var(--ease-out) both; animation-delay: .1s; }
.hero-copy h1 { max-width: 12ch; animation: rise 1s var(--ease-out) both; animation-delay: .2s; }
.hero-copy .lede { max-width: 42ch; animation: rise .9s var(--ease-out) both; animation-delay: .3s; }
.hero-copy .btn-row { animation: rise .9s var(--ease-out) both; animation-delay: .4s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.hero-rail {
  border-top: var(--grout) solid var(--paper);
  background: var(--ink);
}
.hero-rail ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: var(--grout);
  background: var(--paper);
}
.hero-rail li {
  background: var(--ink); color: var(--paper);
  padding: 1rem var(--gutter); font-size: .95rem;
  display: flex; align-items: center; gap: .75rem;
}
.hero-rail strong { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .02em; line-height: 1; }
@media (min-width: 720px) {
  .hero-rail ul { grid-template-columns: repeat(3, 1fr); }
  .hero-rail li { padding-inline: 1.5rem; justify-content: center; text-align: center; }
}

/* Media frame (shared) */
.media {
  position: relative; overflow: hidden; background: var(--charcoal);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
/* Parallax headroom only once script.js has confirmed GSAP; at rest, and
   without the CDN, every frame shows the full picture. */
.js-motion .media.parallax img { height: 118%; margin-top: -9%; will-change: transform; }

/* Three lines of work: sticky image per block */
.work { padding-bottom: 0; }
.work-block {
  display: grid; gap: 1.5rem;
  padding-block: clamp(2rem, 5vw, 4rem);
  border-top: var(--grout) solid var(--ink);
}
.work-block:first-of-type { border-top: 0; padding-top: 0; }
.work-block .media { aspect-ratio: 3 / 2; }
.work-block h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.work-block h3 .tile-mark { font-size: .55em; }
.trade {
  margin: 1.25rem 0 0; padding: 0; list-style: none;
  display: grid; gap: .35rem .75rem; font-size: .95rem; color: var(--charcoal);
}
.trade li { padding-left: 1.1rem; position: relative; }
.trade li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: .5rem; height: .5rem; background: var(--leaf);
}
@media (min-width: 900px) {
  .work-block {
    grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  .work-block .media { position: sticky; top: 96px; aspect-ratio: 4 / 5; }
  .work-block:nth-of-type(even) .media { order: 2; }
  .trade { grid-template-columns: 1fr 1fr; }
}

/* Full-bleed interstitial image */
.bleed { padding: 0; }
.bleed .media { width: 100%; aspect-ratio: 16 / 7; min-height: 320px; max-height: 720px; }

/* Where we work */
.where-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.counties {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grout);
  background: var(--paper);
}
.counties li {
  background: var(--ink); aspect-ratio: 1; padding: .75rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden;
}
.counties li::before {
  content: ""; position: absolute; inset: 0;
  border: var(--grout) solid var(--leaf); opacity: 0;
  transition: opacity .3s;
}
.counties li:hover::before { opacity: 1; }
.counties .name { font-family: var(--font-display); font-size: clamp(1.4rem, 3.6vw, 2.4rem); line-height: 1; }
.counties .kind { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sky); }
.cities { margin-top: 1.5rem; }
.cities span { display: inline-block; padding: .1rem .5rem .1rem 0; }
.cities span + span::before { content: "\00B7"; padding-right: .5rem; color: var(--leaf); }
@media (min-width: 900px) {
  .where-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* Context facts */
.context ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--grout); background: var(--ink);
}
.context li { background: var(--sky); padding: 1.5rem; }
.context li strong {
  display: block; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1; margin-bottom: .5rem;
}
.context .note { margin-top: 1rem; font-size: .9rem; color: var(--charcoal); }
@media (min-width: 720px) { .context ol { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .context ol { grid-template-columns: repeat(4, 1fr); } }

/* Wall of work */
.wall { background: var(--paper); }
.sector { margin-top: 2.5rem; }
.sector h3 { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; color: var(--slate); }
.sector h3::after { content: ""; flex: 1; height: var(--grout); background: var(--ink); align-self: center; }
.chips { display: flex; flex-wrap: wrap; gap: var(--grout); margin: 0; padding: 0; list-style: none; }
.chip {
  background: var(--ink); color: var(--paper);
  padding: .8rem 1rem; flex: 1 1 auto; min-width: 12rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.chip .val { font-family: var(--font-display); font-size: 1.35rem; color: var(--leaf); white-space: nowrap; letter-spacing: .02em; }
.chip .loc { display: block; font-size: .82rem; color: var(--sky); }
.chip.recent { background: var(--leaf); color: var(--ink); }
.chip.recent .loc { color: var(--ink); }
.chip.recent .val { color: var(--ink); }
.wall .foot { margin-top: 2rem; font-size: .9rem; color: var(--charcoal); }

/* Voices */
.voices-grid { display: grid; gap: var(--grout); background: var(--paper); }
.voice {
  background: var(--ink); color: var(--paper); padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.voice blockquote { margin: 0; font-size: 1.1rem; line-height: 1.55; }
.voice blockquote p { max-width: none; }
.voice.big blockquote { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.voice cite { font-style: normal; margin-top: auto; }
.voice cite strong { display: block; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .02em; line-height: 1; color: var(--leaf); }
.voice cite span { font-size: .9rem; color: var(--sky); }
@media (min-width: 900px) {
  .voices-grid { grid-template-columns: 3fr 2fr; }
}

/* Prequalification */
.facts {
  margin: 0; display: grid; gap: var(--grout); background: var(--ink);
  border: var(--grout) solid var(--ink);
}
.facts div { background: var(--paper); padding: 1.25rem; }
.facts dt { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--charcoal); margin-bottom: .35rem; }
.facts dd { margin: 0; }
.facts .wide { grid-column: 1 / -1; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .facts { grid-template-columns: repeat(3, 1fr); } }

/* Contact */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.person { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; align-items: center; }
.person img { width: 120px; height: 120px; object-fit: cover; border: var(--grout) solid var(--leaf); }
.person .name { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.person a { text-decoration: none; }
.person a:hover { text-decoration: underline; }
.contact-cta { display: grid; gap: var(--grout); background: var(--paper); }
.contact-cta a {
  display: grid; gap: .25rem; padding: 1.25rem 1.5rem;
  background: var(--ink); color: var(--paper); text-decoration: none;
  transition: background-color .25s, transform .25s var(--ease-out);
  min-height: 44px;
}
.contact-cta a:hover { transform: translateX(6px); }
.contact-cta a strong { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: .02em; line-height: 1; color: var(--leaf); }
.contact-cta a span { font-size: .92rem; color: var(--sky); }
.contact-cta a.primary { background: var(--leaf); color: var(--ink); }
.contact-cta a.primary strong, .contact-cta a.primary span { color: var(--ink); }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .person { grid-template-columns: 160px 1fr; }
  .person img { width: 160px; height: 160px; }
}

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); border-top: var(--grout) solid var(--leaf); padding-block: 3rem; font-size: .92rem; }
.site-footer .wrap { display: grid; gap: 2rem; }
.site-footer img { width: 180px; height: 69px; }
.site-footer p { max-width: none; }
.site-footer a { color: var(--sky); }
.site-footer .disclosure { color: var(--sky); }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr 2fr; } }

/* Reveal states are applied by script.js only when GSAP has loaded;
   without it every element is visible at rest. */
.js-motion [data-reveal] { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-set { display: none; }
  .hero-copy .label, .hero-copy h1, .hero-copy .lede, .hero-copy .btn-row { animation: none; }
  .btn, .contact-cta a, .nav a::after, .counties li::before { transition: none; }
}
