/* ==========================================================
   Pizarro Drywall — styles
   Colors are set once here. Change them in :root only.
   ========================================================== */

:root {
  --ink: #2a1d14;        /* dark leather brown: text, header, contact section */
  --paper: #f4ecdf;      /* warm parchment: page background */
  --accent: #a3451b;     /* saddle rust: call buttons only (white text 6.1:1) */
  --accent-hover: #8a3915;
  --muted: #6b5847;      /* secondary text on parchment (5.8:1) */
  --muted-dark: #cdbca5; /* secondary text on brown (8.8:1) */
  --pearl: #e8dcc6;      /* vine and text on the dark header */
  --line: rgba(42, 29, 20, 0.16);
  --line-dark: rgba(232, 220, 198, 0.2);
  --photo-bg: #e2d6c3;   /* shows while photos load */

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --max: 1120px;
  --radius: 14px;
  --header-h: 0px;      /* header only stays on screen on desktop */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }

/* Western display style: wide, all caps, spaced out */
.wordmark, .hero h1, .section h2, .facts dt {
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  text-transform: uppercase;
}
p { margin: 0; }
a { color: inherit; }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Language switching ----------
   Each piece of text exists in English (lang="en") and Spanish (lang="es").
   Only the active language is shown. Without JavaScript, English shows. */
html[data-lang="en"] body [lang="es"]:not(.lang-toggle),
html[data-lang="es"] body [lang="en"]:not(.lang-toggle) { display: none !important; }

.lang-toggle { display: none; }
.js .lang-toggle { display: inline-flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1.0625rem;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-large { min-height: 60px; padding: 16px 36px; font-size: 1.25rem; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }

/* ---------- Header (dark leather with a pearl vine) ---------- */
.site-header {
  position: relative; z-index: 50;
  background: var(--ink); color: var(--pearl);
}
.site-header :focus-visible { outline-color: var(--pearl); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  min-height: 56px; gap: 0 8px;
}

/* Page links: Our story ◆ Home ◆ Portfolio */
.site-nav { order: 3; width: 100%; border-top: 1px solid var(--line-dark); }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; align-items: center; gap: 2px;
}
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted-dark); text-decoration: none;
  text-decoration-thickness: 2px; text-underline-offset: 7px;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: var(--pearl); text-decoration-line: underline; text-decoration-color: var(--accent); }
.nav-sep { font-size: 0.5rem; color: var(--muted-dark); opacity: 0.7; }
.wordmark {
  font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.07em;
  text-decoration: none; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
/* Rameado scrollwork band: one continuous strand running edge to edge.
   It sits right under the header and scrolls away (only the top bar stays on screen on desktop). */
.vine {
  height: 58px;
  background: var(--ink) url("images/vine.svg") repeat-x center / auto 50px;
  border-top: 1px solid var(--line-dark);
}
.header-actions { display: flex; align-items: center; gap: 4px; }
.lang-toggle, .header-call {
  align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 8px;
  border-radius: 999px; font: inherit; font-size: 0.9375rem;
}
.lang-toggle {
  background: transparent; border: 0; color: var(--muted-dark); cursor: pointer;
}
.lang-toggle:hover { color: #fff; }
.header-call {
  display: inline-flex; font-weight: 700; text-decoration: none;
  background: var(--accent); color: #fff; padding: 0 14px;
}
.header-call:hover { background: var(--accent-hover); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 24px; }
.hero-text { text-align: center; }
.hero h1 {
  font-size: clamp(2.5rem, 11.5vw, 6rem);
  line-height: 0.98; letter-spacing: 0.02em;
}
.hero h1 span { display: block; }
/* Tagline: always one line, so it shrinks on small phones */
.hero-line {
  margin: 20px auto 32px;
  font-size: clamp(0.9375rem, 4.9vw, 1.625rem);
  line-height: 1.4; color: var(--muted);
  white-space: nowrap;
}
html[data-lang="es"] .hero-line { font-size: clamp(0.875rem, 4.3vw, 1.625rem); }
.hero-note { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.hero-img {
  width: 100%; margin-top: 48px;
  border-radius: var(--radius);
  aspect-ratio: 16 / 10; object-fit: cover;
  background: var(--photo-bg);
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section h2 { font-size: clamp(1.625rem, 6vw, 2.75rem); letter-spacing: 0.04em; }
.section-sub { margin-top: 12px; color: var(--muted); }

/* Services: a plain list with hairlines, no icons */
/* Inner page title (Our story, Portfolio) */
.page-hero { padding: 48px 0 32px; }
.page-hero h1 {
  font-size: clamp(2.25rem, 10vw, 4.5rem); letter-spacing: 0.03em; line-height: 1;
  text-transform: uppercase; font-stretch: 125%; font-variation-settings: "wdth" 125;
}
.section-flush { padding-top: 8px; }
.section-flush .gallery { margin-top: 8px; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; color: var(--accent);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.text-link:hover { text-decoration-thickness: 2px; }

.story-teaser .about-quote { max-width: 40ch; margin-bottom: 8px; }
.story-more { margin-top: 24px; display: grid; gap: 16px; color: var(--muted); }

/* Call band at the bottom of Our story and Portfolio */
.cta-band { background: var(--ink); color: var(--paper); }
.cta-band :focus-visible { outline-color: var(--paper); }
.cta-band h2 { max-width: 14ch; }
.cta-inner { display: grid; gap: 32px; }
.cta-actions { display: grid; gap: 12px; justify-items: start; }
.cta-phone a {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 1.25rem;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-dark);
}
.cta-band .text-link { color: var(--pearl); }

.services { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.service {
  display: grid; gap: 6px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.service h3 { font-size: 1.375rem; }
.service p { color: var(--muted); }

/* Gallery */
.gallery {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
.gallery figure { margin: 0; }
.gallery-btn {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: var(--radius); overflow: hidden;
}
.gallery-btn img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: var(--photo-bg);
  transition: transform .4s ease;
}
.gallery-btn:hover img { transform: scale(1.02); }
.gallery figcaption { margin-top: 10px; font-size: 0.9375rem; color: var(--muted); }

/* About */
.about { display: grid; gap: 40px; }
.about-quote {
  margin-top: 24px;
  font-size: clamp(1.25rem, 3vw, 1.625rem); line-height: 1.45;
}
.about-sign { margin-top: 16px; color: var(--muted); }
.facts {
  display: flex; flex-wrap: wrap; gap: 32px 48px;
  margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--line);
}
.facts dt { font-size: 2.25rem; font-weight: 700; line-height: 1; letter-spacing: 0.01em; }
.facts dd { margin: 6px 0 0; color: var(--muted); max-width: 18ch; }
.about-img {
  width: 100%; border-radius: var(--radius);
  aspect-ratio: 4 / 5; object-fit: cover; background: var(--photo-bg);
}

/* Service area */
.area-list {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.area-list li {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 1.0625rem;
}

/* Contact (dark) */
.contact { background: var(--ink); color: var(--paper); }
.contact :focus-visible { outline-color: var(--paper); }
.contact-inner { display: grid; gap: 56px; }
.contact h2 { max-width: 14ch; margin-bottom: 32px; }
.contact-details { margin: 40px 0 0; display: grid; gap: 20px; }
.contact-details dt { font-size: 0.875rem; color: var(--muted-dark); }
.contact-details dd { margin: 2px 0 0; font-size: 1.25rem; }
.contact-details a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: var(--line-dark);
  overflow-wrap: anywhere;
}
.contact-details a:hover { text-decoration-color: currentColor; }

.contact-form { display: grid; gap: 18px; align-content: start; }
.contact-form h3 { font-size: 1.375rem; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9375rem; color: var(--muted-dark); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--paper);
  background: rgba(232, 220, 198, 0.06);
  border: 1px solid var(--line-dark); border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.contact-form .btn { justify-self: start; min-width: 140px; }

/* Footer */
.site-footer {
  background: var(--ink); color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  padding: 28px 0;
  font-size: 0.9375rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; align-items: center; }
.site-footer .wordmark { color: var(--pearl); font-size: 0.875rem; min-height: 0; }

/* ---------- Mobile call bar ---------- */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(244, 236, 223, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.call-bar .btn { width: 100%; min-height: 54px; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 56px var(--gutter) 24px;
  border: 0; background: rgba(24, 16, 11, 0.95); color: var(--paper);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(24, 16, 11, 0.95); }
.lightbox figure { margin: 0; max-width: 1200px; width: 100%; }
.lightbox img {
  width: 100%; height: auto; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px);
  object-fit: contain; border-radius: 8px;
}
.lightbox figcaption { margin-top: 12px; text-align: center; color: var(--muted-dark); }
.lightbox-close {
  position: absolute; top: 8px; right: 8px;
  width: 48px; height: 48px; border: 0; border-radius: 999px;
  background: rgba(245, 243, 239, 0.12); color: var(--paper);
  font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(245, 243, 239, 0.22); }
.lightbox :focus-visible { outline-color: var(--paper); }
html:has(.lightbox[open]) { overflow: hidden; }

/* ---------- Gentle fade-in on scroll (only with JS + motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity .7s ease, transform .7s ease;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Tablet: 768px and up ---------- */
@media (min-width: 768px) {
  :root { --gutter: 40px; }
  .header-inner { min-height: 64px; }
  .wordmark { font-size: 1rem; letter-spacing: 0.16em; }
  .vine { height: 74px; background-size: auto 64px; }
  .page-hero { padding: 80px 0 48px; }
  .lang-toggle { padding: 0 12px; }
  .header-call { padding: 0 18px; }
  .hero { padding: 88px 0 40px; }
  .hero-img { margin-top: 64px; }
  .section { padding: 120px 0; }
  .section-tight { padding: 96px 0; }

  .service { grid-template-columns: 1fr 1.4fr; gap: 32px; padding: 28px 0; align-items: baseline; }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }

  .contact-details { grid-template-columns: repeat(2, auto); justify-content: start; gap: 24px 56px; }

  /* Call bar not needed on larger screens: the header has a Call button */
  .call-bar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Desktop: 1024px and up ---------- */
@media (min-width: 1024px) {
  /* Desktop: page links sit in the middle of the top bar, and the header stays on screen */
  :root { --header-h: 64px; }
  .site-header { position: sticky; top: 0; }
  .header-inner > * { flex: 1; }
  .site-nav { flex: 0 0 auto; }
  .header-actions { justify-content: flex-end; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav { order: 0; width: auto; border-top: 0; }
  .site-nav a { font-size: 0.8125rem; padding: 0 14px; letter-spacing: 0.1em; font-stretch: 125%; font-variation-settings: "wdth" 125; }
  .cta-inner { grid-template-columns: 1fr auto; align-items: center; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .about { grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: center; }
  .contact-inner { grid-template-columns: 1.1fr 1fr; gap: 96px; align-items: start; }
  .contact-details { grid-template-columns: 1fr; }
}

/* ---------- Very small phones (under 360px) ---------- */
@media (max-width: 359px) {
  .site-nav a { padding: 0 5px; letter-spacing: 0.04em; font-size: 0.6875rem; }
}
