/* Calderon Construction — v3 */
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --paper: #f3efe7;
  --paper-2: #e9e3d8;
  --ink: #1d1a16;
  --ink-2: #4a443c;
  --muted: #7a7166;
  --rule: #d6cdbf;
  --field-border: #8a8075; /* >= 3:1 on white for form controls */
  --accent: #b5531d;       /* fired clay / lumber stain */
  --accent-ink: #8f3f12;
  --dark: #1d1a16;
  --dark-2: #2a2621;
  --on-dark: #f3efe7;
  --on-dark-muted: #b9ae9f;
  --ok: #2f6b3c;
  --err: #a3271b;
  --radius: 4px;
  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --font: "Archivo", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h2 {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.02;
  font-variation-settings: "wdth" 72;
  text-transform: uppercase;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
main:focus { outline: none; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: 700 16px/1 var(--font); letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-ink); }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: #fff;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.site-header.is-solid { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.header-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: .9; }
.brand-name {
  font-weight: 800; font-size: 26px; text-transform: uppercase;
  font-variation-settings: "wdth" 70; letter-spacing: 0.02em;
}
.brand-sub {
  font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.32em;
  margin-top: 4px; opacity: .85;
}
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; opacity: .9; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.phone-link { font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.phone-link:hover { text-decoration: underline; }

/* Hero */
.hero {
  position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; background: var(--dark);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,17,14,.55) 0%, rgba(20,17,14,0) 22%),
    linear-gradient(0deg, rgba(20,17,14,.88) 0%, rgba(20,17,14,.55) 38%, rgba(20,17,14,0) 70%);
}
.hero-content { position: relative; padding-bottom: clamp(48px, 9vh, 96px); padding-top: 140px; width: 100%; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: #f1c9a8; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: .92;
  text-transform: uppercase;
  font-variation-settings: "wdth" 66;
  max-width: 13ch;
}
.hero-lede { font-size: clamp(17px, 1.6vw, 20px); max-width: 46ch; margin: 22px 0 30px; color: #ece5da; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }


/* Credentials */
.creds { background: var(--dark); color: var(--on-dark); }
.creds-row { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin-top: 0; margin-bottom: 0; }
.cred { padding: 22px 20px 24px 0; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #3a342d; }
.cred + .cred { padding-left: 20px; border-left: 1px solid #3a342d; }
.cred-k { font-weight: 800; font-size: 18px; text-transform: uppercase; font-variation-settings: "wdth" 75; letter-spacing: .02em; }
.cred-v { color: var(--on-dark-muted); font-size: 14px; }

/* Section rhythm */
section { scroll-margin-top: 72px; }
.work, .services, .about { padding: clamp(64px, 10vw, 128px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }

/* Gallery */
.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 88px;
}
.g { position: relative; margin: 0; overflow: hidden; background: var(--paper-2); border-radius: var(--radius); }
.g picture { display: block; width: 100%; height: 100%; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .g img { transition: none; } .g:hover img { transform: none; } }
.g figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 28px 14px 12px; color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(0deg, rgba(20,17,14,.75), rgba(20,17,14,0));
}
.g-a { grid-column: 1 / 8;  grid-row: 1 / 6; }
.g-b { grid-column: 8 / 13; grid-row: 1 / 9; }
.g-c { grid-column: 1 / 5;  grid-row: 6 / 9; }
.g-d { grid-column: 5 / 8;  grid-row: 6 / 9; }
.g-e { grid-column: 1 / 7;  grid-row: 9 / 13; }
.g-f { grid-column: 7 / 13; grid-row: 9 / 13; }

/* Services */
.services { background: var(--paper-2); }
.services-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.services-intro { position: sticky; top: 104px; }
.services-intro p { color: var(--ink-2); margin-top: 18px; max-width: 38ch; }
.text-link { font-weight: 700; color: var(--accent-ink); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.service-list li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.sn { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 6px; }
.service-list h3 { font-size: clamp(24px, 2.6vw, 32px); text-transform: uppercase; font-variation-settings: "wdth" 75; line-height: 1.05; }
.service-list p { margin: 6px 0 0; color: var(--ink-2); }

/* About */
.about-grid { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-copy .big { font-size: clamp(21px, 2.2vw, 27px); line-height: 1.3; font-weight: 600; margin-top: 22px; }
.about-copy p { color: var(--ink-2); max-width: 52ch; }
.about-copy .big { color: var(--ink); }
.sig { font-weight: 700; color: var(--ink) !important; margin-top: 8px; }

/* Estimate */
.estimate { background: var(--dark); color: var(--on-dark); padding: clamp(64px, 10vw, 128px) 0; }
.estimate-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.estimate-copy > p { color: var(--on-dark-muted); margin-top: 18px; max-width: 40ch; }
.steps { margin: 28px 0 36px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 14px 0 14px 44px; border-top: 1px solid #3a342d; color: var(--on-dark-muted); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 13px; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: #f1c9a8; font-weight: 700; font-size: 14px;
  display: grid; place-items: center;
}
.steps strong { color: var(--on-dark); font-weight: 700; }
.direct-k { color: var(--on-dark-muted); margin: 0 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.direct-phone { display: block; font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; text-decoration: none; font-variation-settings: "wdth" 75; }
.direct-mail { color: var(--on-dark-muted); font-size: 15px; word-break: break-all; }

.form {
  background: var(--paper); color: var(--ink); border-radius: 6px;
  padding: clamp(22px, 3vw, 36px);
  display: grid; gap: 18px;
}
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 700; font-size: 14px; margin-bottom: 10px; padding: 0; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--field-border); border-radius: 999px; font-weight: 600; font-size: 15px; background: #fff;
  transition: background-color .12s, border-color .12s, color .12s;
}
.chips input:hover + span { border-color: var(--ink-2); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: 500 16px/1.35 var(--font); color: var(--ink);
  background: #fff; border: 1.5px solid var(--field-border); border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 112px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(181,83,29,.25); }
.field.invalid input, .field.invalid textarea, .chips.invalid span { border-color: var(--err); border-width: 2px; }
.err-msg { color: var(--err); font-size: 14px; font-weight: 600; }
.err-msg::before { content: "! "; font-weight: 800; }
.chips .err-msg { flex-basis: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Photo upload */
.upload .label-like { font-weight: 700; font-size: 14px; }
.dropzone {
  position: relative; display: grid; gap: 2px; place-items: center; text-align: center;
  min-height: 88px; padding: 16px; cursor: pointer;
  border: 1.5px dashed var(--field-border); border-radius: var(--radius); background: #fff;
  transition: border-color .12s, background-color .12s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: #fbf6ef; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone input:focus-visible { outline: none; }
.dz-main { font-weight: 700; color: var(--accent-ink); }
.dz-sub { font-size: 13px; color: var(--muted); }
.upload.is-full .dropzone { display: none; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.thumbs:empty { display: none; }
.thumbs .size { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(20,17,14,.72); padding: 2px 5px; border-radius: 2px; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs li.is-busy::after { content: ""; position: absolute; inset: 0; background: rgba(243,239,231,.6); }
.thumbs button {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(20,17,14,.78); color: #fff; font: 700 16px/1 var(--font); cursor: pointer;
  display: grid; place-items: center;
}
.thumbs button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.thumbs button::before { content: ""; position: absolute; inset: -8px; } /* 44px tap target */
@media (max-width: 640px) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
.upload-note { font-size: 14px; color: var(--ink-2); margin: 0; }
.upload-note:empty { display: none; }
.upload-note.is-err { color: var(--err); font-weight: 600; }
.form-status { margin: 0; font-size: 15px; font-weight: 600; min-height: 1.4em; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-warn { color: var(--accent-ink); }
.form-status.is-err { color: var(--err); }
.form-status:empty { display: none; }
.req { color: var(--accent-ink); font-weight: 800; }
.req-note { margin: 0; font-size: 13px; color: var(--ink-2); }
.privacy-note { margin: 0; font-size: 13px; color: var(--ink-2); }
.privacy-note a { color: var(--accent-ink); font-weight: 600; }
.noscript { margin: 0; padding: 12px 14px; background: #fff3e6; border-radius: var(--radius); font-size: 15px; }
.turnstile-slot { min-height: 0; }
.turnstile-slot:not(:empty) { min-height: 65px; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* Thank-you panel */
.thanks {
  background: var(--paper); color: var(--ink); border-radius: 6px;
  padding: clamp(28px, 4vw, 48px); display: grid; justify-items: start; gap: 10px;
}
.thanks:focus { outline: none; }
.thanks-mark { width: 88px; height: 88px; margin-bottom: 6px; }
.thanks-mark .ring { fill: none; stroke: var(--accent); stroke-width: 6; stroke-dasharray: 327; stroke-dashoffset: 327; animation: draw .6s ease-out forwards; }
.thanks-mark .check { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .35s .45s ease-out forwards, thunk .25s .8s ease-out; transform-origin: 60px 60px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes thunk { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.thanks-title { font-size: clamp(36px, 5vw, 56px); text-transform: uppercase; font-variation-settings: "wdth" 66; line-height: .95; }
.thanks-lede { font-size: 18px; color: var(--ink-2); margin: 4px 0 0; max-width: 40ch; }
.thanks-ref { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .thanks-mark .ring, .thanks-mark .check { animation: none; stroke-dashoffset: 0; }
}

/* Footer */
.site-footer { background: #14110e; color: var(--on-dark-muted); padding: 48px 0 28px; font-size: 15px; }
.footer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-row p { margin: 0 0 6px; }
.footer-row a { color: var(--on-dark); text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }
.f-brand { color: var(--on-dark); font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 72; font-size: 20px; }
.f-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2e2924; font-size: 13px; }

/* Mobile bar */
.mobile-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .services-grid, .about-grid, .estimate-grid { grid-template-columns: 1fr; }
  .services-intro { position: static; }
  .about-photo img { aspect-ratio: 16 / 10; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .gallery { grid-auto-rows: 64px; gap: 10px; }
  .cred-k { font-size: 16px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .header-row { height: 60px; }
  .brand-name { font-size: 22px; }
  .header-actions .btn { display: none; }
  .phone-link { font-size: 15px; }
  section { scroll-margin-top: 60px; }
  .hero-content { padding-top: 96px; padding-bottom: 40px; }
  .hero { min-height: max(560px, 80svh); }
  .hero-cta .btn { flex: 1 1 100%; }
  .creds-row { grid-template-columns: 1fr; }
  .cred, .cred + .cred { padding: 16px 0; border-left: 0; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 8px; }
  .g { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 1 / 1; }
  .g-a, .g-e { grid-column: 1 / -1 !important; aspect-ratio: 3 / 2; }
  .g-d, .g-f { order: 1; }
  .g figcaption { font-size: 13px; padding: 22px 10px 8px; }
  .row2 { grid-template-columns: 1fr; }
  .service-list li { grid-template-columns: 44px 1fr; }
  .footer-row { grid-template-columns: 1fr; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 2fr; position: fixed; inset: auto 0 0 0; z-index: 60;
    background: var(--dark); border-top: 1px solid #3a342d; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    transform: translateY(110%); transition: transform .25s ease;
  }
  .mobile-bar.is-shown { transform: none; }
  .mobile-bar.is-shown.is-tucked { transform: translateY(110%); }
  @media (prefers-reduced-motion: reduce) { .mobile-bar { transition: none; } }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--radius);
    font-weight: 700; text-decoration: none;
  }
  .mb-call { color: var(--on-dark); border: 1.5px solid #5a5249; }
  .mb-est { background: var(--accent); color: #fff; }
}

/* Document pages (privacy) */
.doc-page .site-header { position: sticky; top: 0; }
.doc { max-width: 760px; padding-top: 48px; padding-bottom: 80px; }
.doc h1 { font-size: clamp(36px, 6vw, 60px); text-transform: uppercase; font-variation-settings: "wdth" 66; line-height: .95; }
.doc h2 { font-size: 22px; text-transform: none; font-variation-settings: "wdth" 90; margin: 32px 0 8px; line-height: 1.2; }
.doc p { color: var(--ink-2); }
.doc a { color: var(--accent-ink); }
.doc-date { color: var(--muted) !important; margin-top: 10px; }
.doc-back { margin-top: 40px; }

/* Tap-target sizing (WCAG 2.2 target size; 44px on touch) */
.phone-link, .nav a { display: inline-flex; align-items: center; min-height: 44px; }
.text-link { display: inline-block; padding: 10px 0 4px; }
.direct-mail { display: inline-block; padding: 10px 0; }
.footer-row a, .privacy-note a, .doc a { display: inline-block; padding: 8px 0; }
.footer-row p { margin: 0; }
