/* ==========================================================================
   Art Gallegos Construction — Design System
   Architecture adapted from a monochrome + single-accent editorial system:
   bold tight-tracking display type, full-pill buttons, hairline dividers,
   zero shadows, alternating light/dark section bands.
   ========================================================================== */

:root {
  /* Colors */
  --ink:        #000d10;   /* primary text, filled buttons, footer, icon strokes */
  --white:      #ffffff;   /* canvas, card surfaces, button text on dark */
  --ash:        #6b6f72;   /* secondary body text, muted labels (darkened from #8e8e95 for AA contrast on white) */
  --ash-on-dark:#a7abae;   /* secondary text on dark bands */
  --pebble:     #d5d3d4;   /* hairline borders, dividers */
  --midnight:   #0f0f1c;   /* dark section backgrounds */
  --charcoal:   #151623;   /* elevated dark panels */
  --clay:       #b5623f;   /* single warm accent — darkened from #bc7155 for AA text contrast */
  --clay-tint:  #bc7155;   /* clay for large surfaces / non-text use */

  /* Type */
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --max: 1200px;
  --section-gap: clamp(3.5rem, 7vw, 5rem);
  --card-pad: 22px;
  --gap: 16px;

  /* Radius */
  --r-pill: 1000px;
  --r-decorative: 45px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 18px;
  line-height: 1.61;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2rem); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .75rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Typography scale ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.9rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--clay); margin: 0 0 1rem;
}
.section--dark .eyebrow { color: var(--clay-tint); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-gap); }
.section--alt { background: #f7f6f5; }
.section--dark { background: var(--midnight); color: var(--white); }
.section--dark .ash, .section--dark p:not(.eyebrow) { color: var(--ash-on-dark); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ash); }
.section--dark .section-head p { color: var(--ash-on-dark); }

/* ---------- Buttons: full pill, no shadow ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px 16px; border-radius: var(--r-pill);
  font-size: .95rem; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer; transition: opacity .15s ease;
}
.btn:hover { opacity: .82; }
.btn--primary { background: var(--ink); color: var(--white); }
.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { border-color: var(--white); opacity: 1; background: rgba(255,255,255,.08); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--pebble); }
.btn--ghost:hover { border-color: var(--ink); opacity: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.btn-row.center { justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pebble); }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 100%; background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.9rem; margin: 0; padding: 0; }
.nav-links a:not(.btn) { font-size: 1rem; color: var(--ink); padding-block: .25rem; border-bottom: 2px solid transparent; }
.nav-links a.active:not(.btn), .nav-links a:not(.btn):hover { border-color: var(--clay); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 100%; background: var(--ink); border: none; cursor: pointer; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ''; display: block; width: 18px; height: 2px; background: var(--white); margin: 4px auto; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 1rem clamp(1.25rem,4vw,2rem) 1.5rem;
    border-bottom: 1px solid var(--pebble); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding-block: .6rem; border-bottom: 1px solid var(--pebble); }
  .nav-links li:last-child { border-bottom: none; padding-top: 1rem; }
  .nav-cta { width: 100%; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(4rem, 10vw, 7rem); color: var(--white); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(.42) saturate(1.05);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,13,16,.55) 0%, rgba(0,13,16,.75) 100%);
}
.hero .container { position: relative; z-index: 1; max-width: 780px; }
.hero .eyebrow { color: var(--clay-tint); }
.hero h1 { color: var(--white); }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; }
.hero--sub { padding-block: clamp(3rem, 7vw, 4.5rem); }
.hero--sub .container { max-width: 680px; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-num { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; color: var(--clay); }
.stat-label { font-size: .85rem; color: var(--ash); margin-top: .25rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; } }

/* ---------- Grids & cards (flat, hairline, no shadow) ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--pebble); border-radius: 0; overflow: hidden; }
.card img { aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: var(--card-pad); border-top: 1px solid var(--pebble); }
.card-body h3 { margin-bottom: .5rem; }
.card-body p { color: var(--ash); font-size: .98rem; }
.card-link { display: inline-block; margin-top: .5rem; font-weight: 700; font-size: .92rem; border-bottom: 2px solid var(--clay); }

/* ---------- Featured clay card — reserved for ONE offering per page ---------- */
.featured-card {
  background: var(--clay-tint); color: var(--white); border-radius: 0; padding: 53px 40px;
}
.featured-card h3 { font-size: 1.9rem; }
.featured-card p { color: rgba(255,255,255,.92); }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-media img { border-radius: var(--r-decorative); aspect-ratio: 4/3; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Feature list (hairline divided) ---------- */
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 0; }
.ticks li { padding-block: 1rem; border-top: 1px solid var(--pebble); }
.ticks li:last-child { border-bottom: 1px solid var(--pebble); }
.ticks strong { display: block; font-size: 1.02rem; margin-bottom: .2rem; }

/* ---------- Gallery tiles ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tile { margin: 0; position: relative; overflow: hidden; }
.tile img { aspect-ratio: 1/1; object-fit: cover; transition: transform .35s ease; }
.tile:hover img { transform: scale(1.045); }
.tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem;
  background: linear-gradient(0deg, rgba(0,13,16,.82), transparent);
  color: var(--white); display: flex; flex-direction: column;
}
.tile figcaption span { font-size: .78rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Quotes / testimonials ---------- */
.quote { border-top: 1px solid var(--pebble); padding-top: 1.5rem; margin: 0; }
.quote-stars { color: var(--clay); letter-spacing: .15em; margin-bottom: .75rem; }
.quote blockquote { margin: 0 0 1rem; font-size: 1.02rem; }
.quote figcaption { color: var(--ash); font-size: .9rem; }
.quote figcaption strong { display: block; color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); max-width: 720px; margin-inline: auto; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 560px; margin-inline: auto; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.form input, .form select, .form textarea {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--pebble); border-radius: 14px;
  font: inherit; background: var(--white); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--clay); outline-offset: 1px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }

/* ---------- FAQ accordion ---------- */
.faq-item { border-top: 1px solid var(--pebble); }
.faq-item:last-child { border-bottom: 1px solid var(--pebble); }
.faq-item summary { cursor: pointer; padding: 1.3rem 0; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-weight: 400; color: var(--clay); flex-shrink: 0; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding-bottom: 1.3rem; color: var(--ash); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.85); padding-block: 4rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.site-footer .brand-sub, .site-footer .brand-name { color: var(--white); }
.site-footer h4 { color: var(--white); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; color: rgba(255,255,255,.6); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Sub-page hero (smaller, with breadcrumb) ---------- */
.hero--page { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.hero--page .container { max-width: 720px; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.65); margin-top: 1rem; }
.breadcrumb a { border-bottom: 1px solid rgba(255,255,255,.4); }
.breadcrumb a:hover { border-color: var(--white); }

/* ---------- Split reverse (media on right) ---------- */
.split--reverse .split-media { order: 2; }
@media (max-width: 860px) { .split--reverse .split-media { order: 0; } }

/* ---------- 4-col grid (About "don't compromise" blocks) ---------- */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-4 > div { border-top: 1px solid var(--pebble); padding-top: 1.25rem; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Process steps (Services page) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); counter-reset: step; }
.step { border-top: 1px solid var(--pebble); padding-top: 1.25rem; position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: .85rem; font-weight: 700; color: var(--clay); margin-bottom: .5rem;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Portfolio filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter {
  padding: 10px 20px; border-radius: var(--r-pill); border: 1px solid var(--pebble);
  background: var(--white); font-size: .9rem; font-weight: 700; cursor: pointer; color: var(--ink);
}
.filter.is-active, .filter:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.tile[hidden] { display: none; }

/* ---------- FAQ (native details/summary, matches markup) ---------- */
.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--pebble); }
.faq details:last-child { border-bottom: 1px solid var(--pebble); }
.faq summary { cursor: pointer; padding: 1.3rem 0; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; color: var(--clay); flex-shrink: 0; }
.faq details[open] summary::after { content: '\2212'; }
.faq .faq-body p { padding-bottom: 1.3rem; color: var(--ash); margin: 0; }

/* ---------- Legal / prose pages ---------- */
.prose { max-width: 760px; padding-block: 1rem; }
.prose h1 { margin-bottom: .25rem; }
.prose .lead { color: var(--ash); margin-bottom: 2.5rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--pebble); }
.prose ul { color: var(--ash); padding-left: 1.2rem; }
.prose a { border-bottom: 1px solid var(--clay); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }

/* ---------- Contact page ---------- */
.form-grid { display: grid; gap: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--pebble); border-radius: 14px;
  font: inherit; background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--clay); outline-offset: 1px; }
.field textarea { min-height: 140px; resize: vertical; }
.field-hint { font-size: .85rem; color: var(--ash); margin-top: .4rem; }
.hp { position: absolute; left: -9999px; }
.contact-panel { background: var(--midnight); color: var(--white); padding: var(--card-pad) 28px; }
.contact-panel h3 { color: var(--white); }
.contact-list { margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list > div { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; }
.contact-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ash-on-dark); margin-bottom: .25rem; }
.contact-list dd { margin: 0; }
.contact-list a { border-bottom: 1px solid rgba(255,255,255,.4); }
.contact-list a:hover { border-color: var(--white); }
