/* Shared layout for all three style options. Each option's style.css sets the tokens below. */
:root {
  --bg: #fff;
  --surface: #f6f6f6;
  --surface-2: #ececec;
  --text: #1b1b1b;
  --muted: #555;
  --primary: #1f3a5f;
  --primary-ink: #fff;
  --accent: #c8a165;
  --border: #ddd;
  --hero-bg: var(--bg);
  --hero-text: var(--text);
  --hero-muted: var(--muted);
  --radius: 10px;
  --radius-btn: 10px;
  --radius-img: var(--radius);
  --font-head: Georgia, serif;
  --font-body: system-ui, sans-serif;
  --head-weight: 700;
  --head-transform: none;
  --head-spacing: normal;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  --topbar-bg: #111;
  --topbar-text: #eee;
  --footer-bg: #1b1b1b;
  --footer-text: #e8e8e8;
  /* Logo colors */
  --logo-main: var(--primary);
  --logo-ink: var(--primary-ink);
  --logo-text: var(--text);
  --logo-sub: var(--muted);
  --logo-accent: var(--accent);
}

*, *::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(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--primary); }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  line-height: 1.15;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: var(--primary-ink); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Placeholders the owner still needs to fill in */
.placeholder { background: #fff3a8 !important; color: #5a4a00 !important; padding: 0 5px; border-radius: 3px; font-weight: 700; }
.ph-text { font-style: italic; opacity: .8; }

/* Logo (inline SVG, colored by tokens) */
.logo { height: 52px; width: auto; }
.logo .lg-main { fill: var(--logo-main); }
.logo .lg-ink { fill: var(--logo-ink); }
.logo .lg-ink-stroke { stroke: var(--logo-ink); }
.logo .lg-text { fill: var(--logo-text); }
.logo .lg-sub { fill: var(--logo-sub); }
.logo .lg-accent { stroke: var(--logo-accent); }
.logo .lg-accent-fill { fill: var(--logo-accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 14px 26px;
  border-radius: var(--radius-btn); border: 2px solid transparent;
  font: 700 1.05rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn-secondary { background: transparent; color: var(--hero-text); border-color: currentColor; }
.btn-sm { min-height: 46px; padding: 8px 18px; font-size: .98rem; }
.btn-block { width: 100%; }

/* Top bar */
.topbar { background: var(--topbar-bg); color: var(--topbar-text); font-size: .92rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 42px; }
.topbar p { margin: 0; }
.topbar-phone { color: inherit; text-decoration: none; white-space: nowrap; }
.topbar-phone strong { font-size: 1.05rem; }
.topbar-phone:hover strong { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; margin-right: auto; text-decoration: none; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  min-height: 46px; padding: 8px 14px; border-radius: var(--radius-btn);
  border: 2px solid var(--border); background: transparent; color: var(--text);
  font: 700 .95rem var(--font-body); cursor: pointer;
}
.lang-toggle:hover { border-color: var(--primary); }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-text); position: relative; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.eyebrow { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; color: var(--accent); margin-bottom: 14px; }
.lede { font-size: 1.2rem; color: var(--hero-muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin: 18px 0 0; font-weight: 600; }
.hero-note a { color: var(--hero-text); text-underline-offset: 4px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; border-radius: var(--radius-img); }
.since-badge {
  position: absolute; left: -24px; bottom: -24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  width: 118px; height: 118px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); line-height: 1; box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.since-badge small { display: block; font: 700 .8rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; }
.since-badge b { font: var(--head-weight) 2rem var(--font-head); }

/* Stats */
.stats { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 30px; padding-bottom: 30px; }
.stat { display: flex; flex-direction: column; text-align: center; }
.stat strong { font: var(--head-weight) 1.9rem/1.15 var(--font-head); color: var(--primary); text-transform: var(--head-transform); }
.stat span { color: var(--muted); font-size: .98rem; }

/* Sections */
.section { padding: 92px 0; }
.section-head { margin-bottom: 40px; max-width: 760px; }
.kicker { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; color: var(--accent); margin-bottom: 8px; }
.section-lede { font-size: 1.15rem; color: var(--muted); margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; }
.card-body { padding: 24px 26px 28px; }
.card-body p { color: var(--muted); margin: 0; }

.why { background: var(--surface); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.why-icon { width: 52px; height: 52px; padding: 12px; margin-bottom: 18px; border-radius: var(--radius-btn); background: var(--primary); fill: none; stroke: var(--primary-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.why-item p { color: var(--muted); margin: 0; }

.projects-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.proj { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius-img); }
.proj img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.proj-lg { grid-row: span 2; }
.proj-lg img { aspect-ratio: auto; }
.proj figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 18px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; display: flex; flex-direction: column; line-height: 1.3;
}
.proj figcaption strong { font: var(--head-weight) 1.15rem var(--font-head); text-transform: var(--head-transform); }
.proj figcaption span { font-size: .92rem; opacity: .9; }

.ba { margin-top: 56px; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; align-items: center; }
.ba-head p { color: var(--muted); margin: 0; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba-pair figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-img); }
.ba-pair figcaption {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: var(--radius-btn);
  background: rgba(0,0,0,.7); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
}
.ba-pair figure + figure figcaption { background: var(--primary); color: var(--primary-ink); }

.process { background: var(--surface); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  border-radius: 50%; background: var(--primary); color: var(--primary-ink);
  font: 800 1.3rem var(--font-head);
}
.step p { color: var(--muted); margin: 0; }

.about-inner { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.about-photo img { width: 100%; border-radius: var(--radius-img); }
.owner-quote { margin: 28px 0 0; padding: 26px 28px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.owner-quote p { font-size: 1.15rem; margin: 0 0 16px; }
.owner-quote footer { display: flex; flex-direction: column; color: var(--muted); font-size: .95rem; }
.signature { font: italic 700 1.5rem var(--font-head); color: var(--text); text-transform: none; }

.reviews { background: var(--surface); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review { margin: 0; padding: 30px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.review blockquote { margin: 0; font-size: 1.08rem; position: relative; padding-top: 34px; }
.review blockquote::before { content: "\201C"; position: absolute; top: -14px; left: -2px; font: 700 4rem/1 Georgia, serif; color: var(--accent); font-style: normal; }
.review figcaption { display: flex; flex-direction: column; font-size: .95rem; }
.review figcaption span { color: var(--muted); }

.areas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.area-col { background: var(--surface); border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); }
.city-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 20px; }
.city-list li { padding: 4px 0; break-inside: avoid; }
.areas-note { margin-top: 24px; color: var(--muted); }

.faq { background: var(--surface); }
.faq-wrap { max-width: 880px; }
.faq details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 700; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--primary); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

.estimate-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-list { margin-top: 28px; display: grid; gap: 12px; }
.contact-line { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--bg); }
.contact-label { color: var(--muted); font-weight: 600; }
.contact-value { font-weight: 700; }
a.contact-line:hover { border-color: var(--primary); }
.estimate-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.field { display: flex; flex-direction: column; margin-bottom: 18px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-weight: 700; margin-bottom: 6px; font-size: 1rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 1.05rem var(--font-body);
  color: var(--text); background: var(--bg); border: 2px solid var(--border); border-radius: calc(var(--radius) * .6);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; }
.field .invalid { border-color: #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.6em; }
.form-status.ok { color: #1e7a46; }
.form-status.err { color: #b3261e; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 64px 0 24px; --logo-text: #fff; --logo-sub: rgba(255,255,255,.7); }
.site-footer a { color: inherit; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-logo { margin-bottom: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col p { margin: 0; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-h { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; opacity: .7; margin-bottom: 4px !important; }
.footer-phone { font-size: 1.4rem; font-weight: 800; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 18px; font-size: .9rem; opacity: .75; }
.footer-bottom p { margin: 0; }

.mobile-bar { display: none; }

/* Preview switcher (temporary, while choosing a style) */
.switcher {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 4px;
  background: #111; color: #fff; padding: 6px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  font: 600 14px/1 system-ui, sans-serif;
}
.switcher span { padding: 0 8px 0 10px; opacity: .7; }
.switcher a { color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
.switcher a[aria-current="page"] { background: #fff; color: #111; }

@media (max-width: 1060px) {
  .nav { display: none; }
}
@media (max-width: 980px) {
  .hero-inner, .about-inner, .estimate-inner, .ba { grid-template-columns: 1fr; gap: 40px; }
  .card-grid, .reviews-grid { grid-template-columns: 1fr 1fr; }
  .why-grid, .steps { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .proj-lg { grid-column: span 2; grid-row: auto; }
  .proj-lg img { aspect-ratio: 4 / 3; }
  .about-photo { max-width: 420px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: span 2; }
}
@media (max-width: 640px) {
  body { padding-bottom: 72px; }
  .wrap { padding: 0 16px; }
  .topbar-es, .topbar-trust { display: none; }
  .topbar-inner { justify-content: center; }
  .header-inner { min-height: 72px; gap: 12px; }
  .logo { height: 40px; }
  .header-cta { display: none; }
  .hero-inner { padding-top: 36px; padding-bottom: 56px; }
  .cta-row .btn { width: 100%; }
  .since-badge { width: 92px; height: 92px; left: auto; right: 12px; bottom: -20px; }
  .since-badge b { font-size: 1.55rem; }
  .since-badge small { font-size: .68rem; }
  .section { padding: 64px 0; }
  .card-grid, .reviews-grid, .why-grid, .steps, .areas-grid, .field-row { grid-template-columns: 1fr; }
  .projects-grid { gap: 10px; }
  .proj figcaption { padding: 28px 12px 10px; }
  .proj figcaption strong { font-size: 1rem; }
  .proj figcaption span { font-size: .8rem; }
  .estimate-form { padding: 22px 18px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr 1.4fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: var(--bg); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px;
  }
  .mobile-bar a {
    display: grid; place-items: center; min-height: 52px; border-radius: var(--radius-btn);
    font-weight: 800; text-decoration: none; border: 2px solid var(--primary); color: var(--primary);
  }
  .mobile-bar .mb-est { background: var(--primary); color: var(--primary-ink); }
  .switcher { bottom: 84px; right: 50%; transform: translateX(50%); }
  .switcher span { display: none; }
}

/* "Sample photo" tag on stock images. Remove the "samples" class from <body> once real photos are in. */
.samples :is(.card, .about-photo) { position: relative; }
.samples :is(.card, .proj, .ba-pair figure, .hero-media, .about-photo)::before {
  content: "Sample photo"; position: absolute; top: 10px; right: 10px; z-index: 3;
  padding: 3px 9px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff;
  font: 700 11px/1.4 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; pointer-events: none;
}
.samples:lang(es) :is(.card, .proj, .ba-pair figure, .hero-media, .about-photo)::before { content: "Foto de muestra"; }

/* Optional pieces each theme can turn on */
.marquee, .why-badge, .scroll-cue { display: none; }
.why-grid { position: relative; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: marquee 40s linear infinite; }
.marquee-track span { padding-right: .3em; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
.scroll-cue svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linejoin: miter; }
