/* ==========================================================================
   ASW Allstate Painting & Construction
   Mobile-first stylesheet. No border radius anywhere, no shadows.
   ========================================================================== */

:root {
  --ink:        #16181b;
  --ink-deep:   #111316;
  --ivory:      #fbfaf7;
  --ivory-alt:  #f2efe8;
  --cream:      #f6f4ef;
  --gold:       #b1874a;
  --body-dark:  #3b3b38;
  --body-mid:   #57544d;
  --muted:      #6b675f;
  --quote:      #4a4a45;

  /* Label tier: small uppercase text. Kept at 400 rather than 300 so the
     stems survive antialiasing at this size. */
  --label-size: 11px;
  --img-bg:     #e8e4dc;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', system-ui, -apple-system, sans-serif;

  --hair-dark:  rgba(22,24,27,0.12);
  --hair-light: rgba(246,244,239,0.12);
  --hair-gold:  rgba(177,135,74,0.24);
}

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

/* `clip`, not `hidden`: `hidden` would make this the scroll container and
   silently break the sticky header. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
img { display: block; }
::selection { background: var(--gold); color: var(--ivory); }

h1, h2, h3, p, figure { margin: 0; }

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

/* ── Shared primitives ───────────────────────────────────────────────────── */

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section { padding-top: 80px; padding-bottom: 80px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--gold);
  flex: none;
}
.h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.13;
  letter-spacing: -0.01em;
}

/* Two-column layouts collapse to one below 1000px. */
.cols2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

/* Bordered card grids: 1px gaps over a hairline background read as dividers. */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(22,24,27,0.1);
}

/* Section header rows: heading left, supporting line right. */
.head-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}
.head-row__note {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 38ch;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--ink);
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover, .btn:focus-visible { background: var(--cream); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(22,24,27,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(177,135,74,0.28);
}
.site-header__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--cream);
}
.wordmark__name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.wordmark__est {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 0;
}
.nav__link {
  font-size: 11px;
  font-weight: 400;
  padding: 6px 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.72);
  transition: color 0.2s ease;
}
.nav__link:hover, .nav__link:focus-visible { color: var(--gold); }
.nav__cta { padding: 11px 20px; }

/* Secondary links drop out on the narrowest screens; Projects and Contact stay. */
.nav__link--sec, .nav__link--tert { display: none; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18,20,23,0.96) 6%,
    rgba(18,20,23,0.62) 48%,
    rgba(18,20,23,0.72) 100%
  );
}
.hero__inner {
  position: relative;
  width: 100%;
  padding-top: 96px;
  padding-bottom: 84px;
}
.hero__eyebrow {
  color: var(--gold);
  letter-spacing: 0.36em;
  margin-bottom: 34px;
}
.hero__eyebrow::before { width: 52px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 6.4vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 15ch;
  text-wrap: balance;
  margin-bottom: 30px;
}
.hero__sub {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(246,244,239,0.78);
  max-width: 56ch;
  margin-bottom: 46px;
}
.hero__cta { padding: 16px 30px; }

/* ── Highlight bar ───────────────────────────────────────────────────────── */

.stats {
  background: var(--ink);
  border-top: 1px solid var(--hair-gold);
}
.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.stats__cell {
  padding: 28px 0;
  border-bottom: 1px solid rgba(246,244,239,0.1);
}
.stats__value {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  color: var(--cream);
}
.stats__label {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.6);
  margin-top: 10px;
}

/* ── Overview ────────────────────────────────────────────────────────────── */

.overview { background: var(--ivory); }
.overview__h2 { margin: 26px 0 28px; }
.overview__quote {
  border-left: 1px solid rgba(177,135,74,0.5);
  padding-left: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--quote);
}
.prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--body-dark);
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-wrap: pretty;
}

/* ── Capabilities ────────────────────────────────────────────────────────── */

.capabilities {
  background: var(--ivory-alt);
  border-top: 1px solid rgba(22,24,27,0.08);
}
.capabilities .head-row { margin-bottom: 64px; }
.capabilities__h2 { margin-top: 22px; }
.card {
  background: var(--ivory-alt);
  padding: 46px 40px 52px;
  transition: background 0.2s ease;
}
.card:hover { background: var(--ivory); }
.card__num {
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 30px;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin-bottom: 16px;
}
.card p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body-mid);
}

/* ── Leadership ──────────────────────────────────────────────────────────── */

.leadership {
  background: var(--ink);
  color: var(--cream);
}
.leadership .cols2 { margin-top: 44px; }
.leadership__rule { width: 56px; height: 1px; background: rgba(177,135,74,0.6); }
.leadership__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  margin: 26px 0 8px;
}
.leadership__role {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.factlist {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.factlist__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hair-light);
}
.factlist__label {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.6);
}
.factlist__value { font-size: 14px; text-align: right; }

.leadership__h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin-bottom: 34px;
}
.prose--dark {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(246,244,239,0.76);
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-wrap: pretty;
}

/* ── Projects ────────────────────────────────────────────────────────────── */

.projects {
  background: var(--ivory);
  padding-bottom: 40px;
}
.projects .head-row { margin-bottom: 20px; }
.projects__h2 { margin-top: 22px; }
.projects .head-row__note { max-width: 36ch; }

.case {
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--hair-dark);
}
/* Rails pin beside their long-form column on wide screens. Sticky only
   travels because .cols2 uses align-items: start, which keeps the rail at
   its content height inside a full-height grid row. */
.case__rail, .leadership__rail { position: static; }
.case__num {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 18px;
}
.case__address {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.15;
  margin-bottom: 8px;
}
.case__city {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.case__narrative {
  font-size: 16px;
  line-height: 1.8;
  color: var(--body-dark);
  margin-bottom: 30px;
  text-wrap: pretty;
}
.specs { display: flex; flex-direction: column; }
.specs__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(22,24,27,0.1);
}
.specs__label {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs__value { font-size: 14px; color: #2a2d31; text-align: right; }

.case__media { display: flex; flex-direction: column; gap: 34px; }
.gallery__label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.gallery__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hair-dark);
}
.gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.gallery--before {
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}
.tile {
  padding: 0;
  border: 0;
  display: block;
  width: 100%;
  background: var(--img-bg);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover { opacity: 0.9; }
.gallery--before .tile {
  aspect-ratio: 1 / 1;
  filter: saturate(0.8);
}
.gallery--before .tile:hover { opacity: 1; filter: saturate(1); }

/* ── Credentials ─────────────────────────────────────────────────────────── */

.credentials {
  background: var(--ivory-alt);
  border-top: 1px solid rgba(22,24,27,0.1);
}
.credentials__h2 { margin: 22px 0 60px; }
.cred {
  background: var(--ivory-alt);
  padding: 34px 34px 38px;
}
.cred__label {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.cred__value {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact {
  background: var(--ink);
  color: var(--cream);
}
.contact__h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin: 22px 0 30px;
}
.contact__intro {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(246,244,239,0.72);
  max-width: 42ch;
  margin-bottom: 44px;
}
.contact__blocks { display: flex; flex-direction: column; gap: 26px; }
.contact__label {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.6);
  margin-bottom: 8px;
}
.contact__value { font-size: 16px; line-height: 1.6; }

.form-panel {
  border: 1px solid rgba(246,244,239,0.16);
  padding: 46px 44px 50px;
}
.form-panel__label {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.field--wide { grid-column: 1 / -1; }
.field > span {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.6);
}
.field input,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(246,244,239,0.24);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  padding: 9px 0;
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus { border-bottom-color: var(--gold); }
.field textarea { resize: vertical; }

.form-panel__submit {
  margin-top: 36px;
  width: 100%;
  padding: 17px 0;
  letter-spacing: 0.24em;
}
.form-panel__submit[disabled] { opacity: 0.6; cursor: default; }
.form-note {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(246,244,239,0.6);
}
/* Idle state carries no text, so it must not leave a gap under the button. */
.form-note:empty { display: none; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--hair-gold);
  padding: 44px 0;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.site-footer__mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--cream);
}
.site-footer__mark span:first-child {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-footer__mark span:last-child {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: rgba(246,244,239,0.55);
}
.site-footer__meta {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.6);
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12,13,15,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 24px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lightbox__label {
  position: absolute;
  top: 26px;
  left: 24px;
  right: 70px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.6);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid rgba(246,244,239,0.28);
  color: var(--cream);
  width: 46px;
  height: 46px;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lightbox__nav:hover { border-color: var(--gold); color: var(--gold); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 0;
  color: rgba(246,244,239,0.7);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
.lightbox__close:hover { color: var(--gold); }

body.is-locked { overflow: hidden; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (min-width: 561px) {
  .shell { padding-left: 28px; padding-right: 28px; }
  .nav__link--sec, .nav__link--tert { display: inline; }
  .hero { min-height: 760px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .lightbox { padding: 70px 90px; }
  .lightbox__nav--prev { left: 24px; }
  .lightbox__nav--next { right: 24px; }
  .lightbox__label { left: 40px; }
}

@media (min-width: 821px) {
  .section { padding-top: 120px; padding-bottom: 120px; }
  .case { padding-top: 76px; padding-bottom: 76px; }

  .head-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .card-grid { grid-template-columns: 1fr 1fr; }

  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .stats__cell {
    padding: 40px 30px;
    border-bottom: 0;
    border-right: 1px solid rgba(246,244,239,0.1);
  }
  .stats__cell:first-child { padding-left: 0; }
  .stats__cell:last-child { padding-right: 0; border-right: 0; }

  .gallery--before { grid-template-columns: repeat(5, 1fr); }

  .nav { gap: 18px; }
}

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

  .overview .cols2   { grid-template-columns: 0.72fr 1fr; gap: 96px; }
  .leadership .cols2 { grid-template-columns: 0.62fr 1fr; gap: 88px; }
  .case .cols2       { grid-template-columns: 0.66fr 1fr; gap: 80px; }
  .contact .cols2    { grid-template-columns: 0.85fr 1fr; gap: 88px; }

  .case__rail, .leadership__rail { position: sticky; top: 110px; }

  .overview, .leadership { padding-top: 130px; padding-bottom: 130px; }
  .projects { padding-top: 130px; padding-bottom: 40px; }

  .nav { gap: 24px; }
}

@media (min-width: 1121px) {
  .shell { padding-left: 40px; padding-right: 40px; }
  .nav { gap: 32px; }
}
