/* ============================================================
   MDS Construction
   Design language: construction documents. Drafting-sheet whites,
   hairline rules, mono spec labels, dimension lines, and a real
   title block for the footer. One accent — drafting blue — spent
   sparingly. Single light theme, painted explicitly.
   ============================================================ */

:root{
  /* Concrete grey ground, drafting-sheet white surfaces */
  --ground:   #EAECE8;
  --sheet:    #FBFCFA;
  --sheet-2:  #F3F5F1;

  --ink:      #0E1110;
  --ink-2:    #4E5551;
  --ink-3:    #636A64;

  --line:     #C7CBC5;
  --line-2:   #DCDFD9;

  --blue:     #1F4A7D;
  --blue-2:   #163A64;
  --blue-wash:#E4EAF1;

  --wrap: 1220px;
  --sec-y: clamp(4.5rem, 9vw, 8rem);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.2,.6,.3,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--ground);
  color:var(--ink);
  font-family:var(--display);
  font-variation-settings:"wdth" 100,"wght" 400;
  font-size:1.0625rem;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

img,svg{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3{ margin:0; font-weight:400; }
p{ margin:0; }
ul,ol{ margin:0; padding:0; list-style:none; }

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

.wrap{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:clamp(1.25rem,4vw,2.75rem); }

.skip{ position:absolute; left:-9999px; top:0; z-index:100; background:var(--ink); color:var(--sheet); padding:.75rem 1.25rem; }
.skip:focus{ left:0; }

/* ---------- Spec label (the mono voice) ---------------------- */
.eyebrow,.mini-h,.cl-label,label,.photo-note,.tb-key,.baseline li,.spec-key{
  font-family:var(--mono);
  font-size:.7rem;
  letter-spacing:.13em;
  text-transform:uppercase;
  font-weight:400;
}
.eyebrow{ color:var(--ink-2); }
.mini-h{ color:var(--ink-2); margin:0 0 1rem; }

/* ---------- Buttons ------------------------------------------ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font-family:var(--mono); font-size:.78rem; letter-spacing:.11em; text-transform:uppercase;
  padding:1.05rem 1.7rem; border:1px solid var(--ink); border-radius:0;
  text-decoration:none; cursor:pointer; background:none; color:var(--ink);
  transition:background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary{ background:var(--ink); color:var(--sheet); }
.btn-primary:hover{ background:var(--blue); border-color:var(--blue); }
.btn-ghost{ border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--ink); background:var(--sheet); }
.btn-block{ width:100%; }
.btn-sm{ padding:.7rem 1.1rem; font-size:.7rem; }

/* ---------- Header ------------------------------------------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid transparent;
  transition:border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-stuck{ border-bottom-color:var(--line); background:color-mix(in srgb, var(--ground) 97%, transparent); }
.header-inner{ display:flex; align-items:center; gap:clamp(1.5rem,4vw,3rem); min-height:78px; }

/* ---------- Logo lockup ---------------------------------------
   Matt's mark, rebuilt as live text so it stays crisp at any size:
   heavy slab MDS + condensed CONSTRUCTION on one baseline, over the
   heavy rule. Scale the whole lockup by setting font-size on .logo. */
.logo{
  display:inline-grid; justify-items:start; gap:.26em;
  text-decoration:none; color:var(--ink); font-size:1rem;
}
.logo-row{ display:flex; align-items:baseline; gap:.36em; }
.logo-mds{
  font-family:"Roboto Slab", Rockwell, "Clarendon", Georgia, serif;
  font-weight:900; font-size:1.68em; line-height:1; letter-spacing:-.012em;
}
.logo-word{
  font-family:var(--display); font-variation-settings:"wdth" 70,"wght" 700;
  font-size:.88em; line-height:1; letter-spacing:.012em; text-transform:uppercase;
}
.logo-rule{ width:100%; height:.19em; background:currentColor; margin-top:-.12em; }
.logo-sub{
  font-family:var(--mono); font-size:.56em; letter-spacing:.17em;
  text-transform:uppercase; color:var(--ink-3); line-height:1;
}
a.logo:hover .logo-mds,a.logo:hover .logo-word{ color:var(--blue); }
a.logo:hover .logo-rule{ background:var(--blue); }

.brand{ margin-right:auto; font-size:1.02rem; }

.nav{ display:flex; align-items:center; gap:1.9rem; }
.nav a{
  font-family:var(--mono); font-size:.72rem; letter-spacing:.11em; text-transform:uppercase;
  text-decoration:none; color:var(--ink-2); position:relative; padding-block:.3rem;
  transition:color .2s var(--ease);
}
.nav a::after{ content:""; position:absolute; left:0; right:100%; bottom:0; height:1px; background:var(--blue); transition:right .28s var(--ease); }
.nav a:hover{ color:var(--ink); }
.nav a:hover::after{ right:0; }
.nav .nav-cta{ display:none; }

.header-phone{
  display:inline-flex; align-items:center; gap:.5rem;
  font-family:var(--mono); font-size:.78rem; letter-spacing:.04em;
  text-decoration:none; padding:.6rem .95rem; border:1px solid var(--line);
  transition:border-color .2s var(--ease), background-color .2s var(--ease);
}
.header-phone svg{ width:14px; height:14px; color:var(--blue); }
.header-phone:hover{ border-color:var(--ink); background:var(--sheet); }

.menu-btn{ display:none; width:42px; height:42px; padding:0; background:none; border:1px solid var(--line); cursor:pointer; position:relative; }
.menu-btn span{ position:absolute; left:11px; width:18px; height:1.5px; background:var(--ink); transition:transform .28s var(--ease); }
.menu-btn span:first-child{ top:16px; }
.menu-btn span:last-child{ top:23px; }
.menu-btn[aria-expanded="true"] span:first-child{ transform:translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child{ transform:translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero --------------------------------------------- */
.hero{ padding-top:clamp(2.5rem,6vw,5rem); padding-bottom:clamp(2rem,4vw,3rem); }
.hero-grid{ display:grid; grid-template-columns:1.08fr .92fr; gap:clamp(2rem,4.5vw,4rem); align-items:end; }
.hero-copy .eyebrow{ display:block; margin-bottom:1.75rem; }
.hero h1{
  font-variation-settings:"wdth" 86,"wght" 680;
  font-size:clamp(2.9rem,7vw,5.6rem);
  line-height:.96; letter-spacing:-.028em; text-wrap:balance;
  margin-bottom:1.6rem;
}
.lede{ font-size:clamp(1.02rem,1.4vw,1.15rem); color:var(--ink-2); max-width:48ch; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:.75rem; margin-top:2.25rem; }

/* Photo slots: crop marks + a drafting placeholder until photos land */
.hero-figure,.shot{ margin:0; position:relative; background:var(--sheet); overflow:hidden; }
.hero-figure{ aspect-ratio:4/3; }
[data-photo] img{ width:100%; height:100%; object-fit:cover; }
[data-photo].no-photo img{ display:none; }
.photo-fallback{ display:none; }
[data-photo].no-photo .photo-fallback{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.1rem;
  position:absolute; inset:0; background:var(--sheet); color:var(--ink-3);
  border:1px solid var(--line-2);
}
[data-photo].no-photo .photo-fallback::before,
[data-photo].no-photo .photo-fallback::after{
  content:""; position:absolute; width:14px; height:14px; border:1px solid var(--line);
}
[data-photo].no-photo .photo-fallback::before{ top:10px; left:10px; border-right:0; border-bottom:0; }
[data-photo].no-photo .photo-fallback::after{ bottom:10px; right:10px; border-left:0; border-top:0; }
.frame-drawing{ width:min(80%,400px); color:var(--ink-2); opacity:.5; }
.frame-drawing .fd-roof{ stroke:var(--blue); opacity:.9; }
.frame-drawing .fd-ground{ opacity:.45; }
.photo-note{ color:var(--ink-3); }

/* Dimension line — the service-area baseline */
.baseline-wrap{ margin-top:clamp(3rem,6vw,5rem); }
.baseline-cap{ display:block; margin-bottom:.85rem; color:var(--ink-3); }
.baseline{
  display:grid; grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--ink-3); position:relative;
}
.baseline li{ position:relative; padding-top:.95rem; color:var(--ink-2); }
.baseline li::before{ content:""; position:absolute; top:0; left:0; width:1px; height:9px; background:var(--ink-3); }
.baseline::after{ content:""; position:absolute; top:0; right:0; width:1px; height:9px; background:var(--ink-3); }

/* Spec strip */
.spec{
  display:grid; grid-template-columns:repeat(4,1fr);
  border:1px solid var(--line); background:var(--sheet);
  margin-top:2.5rem;
}
.spec li{ padding:1.4rem 1.5rem; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:.5rem; }
.spec li:last-child{ border-right:0; }
.spec-key{ color:var(--blue); }
.spec-val{ font-size:.98rem; color:var(--ink-2); }

/* ---------- Section shell ------------------------------------ */
.section{ padding-block:var(--sec-y); border-top:1px solid var(--line); }
/* the header is sticky and ~79px tall - without this an in-page nav jump can
   tuck a section's first line underneath it at narrow widths */
section[id]{ scroll-margin-top:6rem; }
.section-sheet{ background:var(--sheet); }
.section-grid{ display:grid; grid-template-columns:200px 1fr; gap:clamp(2rem,5vw,4.5rem); align-items:start; }
.section-label{ position:sticky; top:112px; }
.section-label h2{ font-family:var(--mono); font-size:.72rem; letter-spacing:.15em; text-transform:uppercase; color:var(--ink-2); font-weight:400; }
.section-label .rule{ display:block; width:100%; height:1px; background:var(--blue); margin-bottom:1rem; }
.section-intro{ color:var(--ink-2); max-width:54ch; margin-bottom:2.75rem; }

/* ---------- Scope -------------------------------------------- */
.capability{ padding-block:2.5rem; border-top:1px solid var(--line-2); }
.capability:first-child{ border-top:0; padding-top:0; }
.capability h3{
  font-variation-settings:"wdth" 88,"wght" 650;
  font-size:clamp(1.7rem,3.2vw,2.5rem); line-height:1.06; letter-spacing:-.02em;
  margin-bottom:1rem;
}
.capability > p{ color:var(--ink-2); max-width:58ch; }
.ticks{ margin-top:1.75rem; display:grid; gap:0; border-top:1px solid var(--line-2); max-width:62ch; }
.ticks li{
  display:flex; gap:1rem; align-items:baseline;
  padding-block:.7rem; border-bottom:1px solid var(--line-2);
  font-size:.98rem; color:var(--ink-2);
}
.ticks li::before{
  content:""; flex:none; width:16px; height:1px; background:var(--blue); transform:translateY(-.35em);
}
.honest{
  margin-top:2rem; padding:1.4rem 1.6rem;
  background:var(--blue-wash); border-left:2px solid var(--blue);
  color:var(--ink-2); font-size:.98rem; max-width:62ch;
}

/* ---------- Process (a real sequence, so it's numbered) ------- */
.steps{ display:grid; }
.steps li{
  display:grid; grid-template-columns:5.5rem 1fr; gap:0 1.5rem;
  padding-block:2.1rem; border-top:1px solid var(--line-2);
}
.steps li:first-child{ border-top:0; padding-top:0; }
.step-n{
  font-family:var(--mono); font-size:.78rem; letter-spacing:.1em; color:var(--blue);
  grid-row:1 / span 2; padding-top:.35rem;
  border-right:1px solid var(--line-2); margin-right:1.5rem; padding-right:1.5rem;
  min-height:100%;
}
.steps h3{ font-variation-settings:"wdth" 94,"wght" 600; font-size:1.25rem; margin-bottom:.5rem; letter-spacing:-.01em; }
.steps p{ color:var(--ink-2); max-width:56ch; }

/* ---------- Gallery ------------------------------------------ */
/* 6 photos, one wide lead: 4+2 / 3+3 / 3+3 — every row fills, no orphan tile. */
.gallery{ display:grid; grid-template-columns:repeat(6,1fr); gap:1.25rem; }
.shot{ aspect-ratio:4/3; grid-column:span 3; }
.shot img{ transition:transform .7s var(--ease); }
.shot:hover img{ transform:scale(1.025); }
.gallery .shot:first-child{ grid-column:span 4; aspect-ratio:16/10; }
.gallery .shot:nth-child(2){ grid-column:span 2; aspect-ratio:auto; }

/* ---------- About -------------------------------------------- */
.big-copy{
  font-variation-settings:"wdth" 92,"wght" 500;
  font-size:clamp(1.4rem,2.8vw,2.05rem); line-height:1.25; letter-spacing:-.018em;
  max-width:30ch; text-wrap:balance;
}
.about-cols{ display:grid; grid-template-columns:repeat(2,1fr); gap:2.5rem; margin-top:3rem; padding-top:2.5rem; border-top:1px solid var(--line-2); }
.about-cols p{ color:var(--ink-2); font-size:.98rem; }
.areas{ line-height:1.95; }

/* ---------- Estimate ----------------------------------------- */
.estimate-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:clamp(2rem,4vw,3.5rem); align-items:start; }
.form-intro{ color:var(--ink-2); margin-bottom:2.25rem; }
/* honeypot - off-screen rather than display:none, which some bots detect */
.botcheck{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.form-intro a{ color:var(--blue); text-underline-offset:3px; }

.field{ display:flex; flex-direction:column; gap:.5rem; margin-bottom:1.35rem; }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
label{ color:var(--ink-2); }
.req{ color:var(--blue); }

input,select,textarea{
  font-family:var(--display); font-size:1rem; color:var(--ink);
  background:var(--sheet); border:1px solid var(--line); border-radius:0;
  padding:.9rem 1rem; width:100%;
  transition:border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.section-sheet input,.section-sheet select,.section-sheet textarea{ background:var(--ground); }
textarea{ resize:vertical; min-height:130px; line-height:1.6; }
input::placeholder,textarea::placeholder{ color:var(--ink-3); }
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--blue);
  box-shadow:inset 0 0 0 1px var(--blue);
}
input[aria-invalid="true"],textarea[aria-invalid="true"]{ border-color:#9B2C1E; box-shadow:inset 0 0 0 1px #9B2C1E; }
select{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%234E5551' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 1rem center; background-size:11px; padding-right:2.5rem;
}
.hint{ font-size:.85rem; color:var(--ink-3); margin:-.5rem 0 1.5rem; }
.hint.is-error{ color:#9B2C1E; }
.form-status{ margin-top:1rem; font-size:.92rem; color:var(--ink-2); min-height:1.4em; }
.form-status.is-error{ color:#9B2C1E; }

.fallback{ margin-top:1.5rem; padding:1.25rem; border:1px solid var(--line); background:var(--sheet-2); }
.fallback p{ font-size:.92rem; color:var(--ink-2); margin-bottom:.85rem; }
.fallback pre{
  font-family:var(--mono); font-size:.78rem; line-height:1.65;
  white-space:pre-wrap; word-break:break-word;
  background:var(--sheet); border:1px solid var(--line); padding:.9rem;
  max-height:220px; overflow:auto; margin:0 0 .9rem;
}

.contact-card{ border:1px solid var(--line); background:var(--sheet); padding:clamp(1.5rem,3vw,2rem); position:sticky; top:112px; }
.section-sheet .contact-card{ background:var(--ground); }
.contact-line{ display:flex; flex-direction:column; gap:.3rem; padding-block:1.05rem; border-top:1px solid var(--line-2); text-decoration:none; }
.contact-line:first-of-type{ border-top:0; padding-top:0; }
.cl-label{ color:var(--ink-3); }
.cl-value{ font-variation-settings:"wdth" 92,"wght" 550; font-size:1.2rem; letter-spacing:-.01em; word-break:break-word; }
a.contact-line:hover .cl-value{ color:var(--blue); }
.card-note{ margin-top:1.35rem; padding-top:1.35rem; border-top:1px solid var(--line-2); font-size:.88rem; color:var(--ink-3); }

/* ---------- Footer: a drawing title block --------------------- */
.site-footer{ background:var(--sheet); border-top:1px solid var(--line); padding-block:clamp(3rem,6vw,4.5rem); }
.title-block{ border:1px solid var(--ink); display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; }
.tb-cell{ padding:1.35rem 1.5rem; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:.55rem; }
.tb-cell:last-child{ border-right:0; }
.tb-key{ color:var(--ink-3); }
.tb-val{ font-size:.98rem; color:var(--ink); line-height:1.45; }
.tb-val a{ text-decoration:none; border-bottom:1px solid var(--line); }
.tb-val a:hover{ color:var(--blue); border-color:var(--blue); }
.tb-cell .logo{ font-size:1.12rem; }
.footer-legal{
  display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between;
  margin-top:1.5rem; font-family:var(--mono); font-size:.68rem;
  letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3);
}

/* ---------- Reveal ------------------------------------------- */
.reveal{ opacity:0; transform:translateY(14px); }
.reveal.is-in{ opacity:1; transform:none; transition:opacity .65s var(--ease), transform .65s var(--ease); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
  .shot img,.btn,.nav a::after{ transition:none !important; }
}

/* ---------- Responsive --------------------------------------- */
@media (max-width: 1024px){
  .hero-grid{ grid-template-columns:1fr; align-items:start; }
  .hero-figure{ order:-1; aspect-ratio:16/10; }
  .section-grid{ grid-template-columns:1fr; }
  .section-label{ position:static; }
  .section-label .rule{ width:56px; margin-bottom:.8rem; }
  .estimate-grid{ grid-template-columns:1fr; }
  .contact-card{ position:static; }
  .spec{ grid-template-columns:repeat(2,1fr); }
  .spec li:nth-child(2n){ border-right:0; }
  .spec li:nth-child(-n+2){ border-bottom:1px solid var(--line); }
  .title-block{ grid-template-columns:repeat(2,1fr); }
  .tb-cell:nth-child(2n){ border-right:0; }
  .tb-cell:nth-child(-n+2){ border-bottom:1px solid var(--line); }
  .gallery{ grid-template-columns:repeat(2,1fr); }
  .gallery .shot,
  .gallery .shot:first-child,
  .gallery .shot:nth-child(2){ grid-column:span 1; aspect-ratio:4/3; }
}

@media (max-width: 860px){
  .header-phone{ display:none; }
  .menu-btn{ display:block; }
  .nav{
    position:fixed; inset:78px 0 auto; z-index:49;
    flex-direction:column; align-items:stretch; gap:0;
    background:var(--ground); border-bottom:1px solid var(--line);
    padding:.25rem clamp(1.25rem,4vw,2.75rem) 1.5rem;
    transform:translateY(-8px); opacity:0; pointer-events:none;
    transition:opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav.is-open{ transform:none; opacity:1; pointer-events:auto; }
  .nav a{ padding-block:1rem; border-bottom:1px solid var(--line-2); font-size:.8rem; }
  .nav a::after{ display:none; }
  .nav .nav-cta{ display:block; border-bottom:0; margin-top:1rem; background:var(--ink); color:var(--sheet); text-align:center; padding:1rem; }
  .about-cols{ grid-template-columns:1fr; gap:2rem; }
  .baseline{ grid-template-columns:repeat(2,1fr); }
  .baseline li:nth-child(n+3){ margin-top:1rem; }
}

@media (max-width: 560px){
  .steps li{ grid-template-columns:1fr; gap:0; }
  .step-n{ grid-row:auto; border-right:0; margin:0 0 .65rem; padding:0; min-height:0; }
  .field-row{ grid-template-columns:1fr; gap:0; }
  .gallery{ grid-template-columns:1fr; gap:1rem; }
  .gallery .shot,.gallery .shot:first-child,.gallery .shot:nth-child(2){ grid-column:span 1; aspect-ratio:4/3; }
  .spec{ grid-template-columns:1fr; }
  .spec li{ border-right:0; border-bottom:1px solid var(--line); }
  .spec li:last-child{ border-bottom:0; }
  .title-block{ grid-template-columns:1fr; }
  .tb-cell{ border-right:0; border-bottom:1px solid var(--line); }
  .tb-cell:last-child{ border-bottom:0; }
  .hero-actions .btn{ flex:1 1 100%; }
}

@media print{
  .site-header{ position:static; }
  .reveal{ opacity:1; transform:none; }
}
