:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #eef6f8;
  --text: #10202b;
  --muted: #60717d;
  --primary: #0d7f8c;
  --primary-dark: #075e68;
  --accent: #ffb545;
  --border: #dce8ec;
  --shadow: 0 24px 70px rgba(16, 32, 43, .12);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(247,250,252,.82); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(220,232,236,.75); }
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand-logo { display: block; width: 96px; height: 72px; object-fit: cover; object-position: 60% center; border-radius: 8px; background: #fff; }
.nav-links { display: flex; align-items: center; gap: 22px; font-weight: 600; color: var(--muted); }
.nav-links a:hover { color: var(--primary-dark); }
.menu-toggle { display: none; border: 0; background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 1.2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 14px 22px; background: var(--primary); color: #fff; font-weight: 800; box-shadow: 0 18px 40px rgba(13,127,140,.22); cursor: pointer; transition: transform .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); background: var(--primary-dark); }
.btn-small { padding: 10px 16px; font-size: .92rem; }
.btn-ghost { background: #fff; color: var(--primary-dark); box-shadow: none; border: 1px solid var(--border); }
.hero { padding: 86px 0 64px; overflow: hidden; background: radial-gradient(circle at 80% 10%, rgba(13,127,140,.18), transparent 36%), linear-gradient(180deg, #fff, var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 52px; }
.eyebrow { margin: 0 0 10px; color: var(--primary-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .13em; font-size: .78rem; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.7rem, 7vw, 5.9rem); letter-spacing: -.07em; max-width: 850px; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.04em; }
h3 { font-size: 1.18rem; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 720px; margin: 24px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-strip span { background: rgba(255,255,255,.74); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; color: var(--muted); }
.trust-strip strong { color: var(--primary-dark); font-size: 1.15rem; }
.hero-card { min-height: 510px; position: relative; border-radius: 42px; background: linear-gradient(145deg, #dff4f7, #ffffff); box-shadow: var(--shadow); border: 1px solid #fff; overflow: hidden; }
.hero-card:before { content: ""; position: absolute; inset: 40px; border-radius: 34px; background: repeating-linear-gradient(135deg, rgba(13,127,140,.08), rgba(13,127,140,.08) 10px, transparent 10px, transparent 22px); }
.product-stack { position: absolute; border-radius: 28px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 22px 45px rgba(16,32,43,.12); }
.stack-1 { width: 260px; height: 300px; left: 70px; top: 80px; transform: rotate(-8deg); }
.stack-2 { width: 220px; height: 260px; right: 54px; top: 132px; background: rgba(13,127,140,.18); transform: rotate(10deg); }
.stack-3 { width: 300px; height: 150px; left: 95px; bottom: 58px; background: rgba(255,181,69,.35); transform: rotate(2deg); }
.hero-badge { position: absolute; right: 28px; bottom: 28px; background: var(--text); color: #fff; border-radius: 999px; padding: 12px 18px; font-weight: 800; }
.section { padding: 88px 0; }
.two-col { display: grid; grid-template-columns: .75fr 1.25fr; gap: 54px; }
.content-card, .material-card, .product-card, .contact-form, .cta-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(16,32,43,.07); }
.content-card { padding: 34px; color: var(--muted); font-size: 1.05rem; }
.section-muted { background: var(--surface-soft); }
.section-heading { text-align: center; max-width: 760px; margin: 0 auto 42px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.section-heading.left { text-align: left; margin-left: 0; }
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { padding: 24px; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-card span { display: inline-flex; margin-bottom: 38px; color: var(--primary); font-weight: 800; }
.product-card p, .material-card p { color: var(--muted); margin-bottom: 0; }
.materials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.material-card { padding: 30px; }
.cta-section { padding: 40px 0; }
.cta-card { padding: 36px; display: flex; align-items: center; justify-content: space-between; gap: 26px; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.cta-card .eyebrow, .cta-card p { color: rgba(255,255,255,.82); }
.cta-card .btn { background: #fff; color: var(--primary-dark); box-shadow: none; white-space: nowrap; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; }
.contact-line { color: var(--muted); }
.contact-line a { color: var(--primary-dark); font-weight: 700; }
.contact-form { padding: 28px; display: grid; gap: 16px; }
label { color: var(--muted); font-weight: 700; font-size: .92rem; }
input, textarea { width: 100%; margin-top: 7px; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; font: inherit; color: var(--text); background: #fbfdfe; outline: none; }
input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,127,140,.12); }
.footer { padding: 28px 0; background: var(--text); color: rgba(255,255,255,.78); }
.footer-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
@media (max-width: 920px) {
  .hero-grid, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 360px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .menu-toggle { display: inline-flex; }
  .nav-links { position: absolute; left: 16px; right: 16px; top: 82px; display: none; flex-direction: column; align-items: stretch; background: #fff; padding: 18px; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .cards-grid, .materials-grid { grid-template-columns: 1fr; }
  .cta-card { flex-direction: column; align-items: flex-start; }
  .section { padding: 64px 0; }
}

/* Galería y mapa agregados en la versión v2 */
.hero-photo-card { padding: 14px; background: #fff; }
.hero-photo-card:before { display: none; }
.hero-photo-card img { width: 100%; height: 100%; min-height: 480px; object-fit: cover; border-radius: 30px; display: block; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 16px; }
.gallery-item { display: block; overflow: hidden; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: 0 14px 35px rgba(16,32,43,.08); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gallery-item:hover img { transform: scale(1.045); }
.gallery-large { grid-column: span 2; grid-row: span 2; }
.map-card { margin-top: 26px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(16,32,43,.07); }
.map-card iframe { width: 100%; min-height: 330px; border: 0; border-radius: 18px; display: block; }
.map-link { display: inline-flex; margin-top: 12px; color: var(--primary-dark); font-weight: 800; }
@media (max-width: 920px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
  .hero-photo-card img { min-height: 340px; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery-large { grid-column: auto; grid-row: auto; }
}

/* Ajustes de publicación que conservan la composición de la versión 2. */
section[id], main[id] { scroll-margin-top: 100px; }
.nav-links .btn:hover, .nav-links .btn:focus-visible { color: #fff; }
button, input, textarea { font-family: inherit; font-size: 1rem; }
textarea { resize: vertical; }
:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 5px; }
.skip-link { position: fixed; top: 10px; left: 16px; z-index: 30; transform: translateY(-180%); background: white; color: var(--primary-dark); padding: 12px 18px; border-radius: 12px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.eyebrow { font-size: .875rem; }
.hero-grid > *, .contact-grid > *, .two-col > * { min-width: 0; }
.form-help { margin: 0; font-size: .875rem; color: var(--muted); }
.form-help a { color: var(--primary-dark); text-decoration: underline; overflow-wrap: anywhere; }
#contact-status:empty { display: none; }
.contact-line { overflow-wrap: anywhere; }
.hero-photo-card img { aspect-ratio: auto; }
@media (max-width: 700px) {
  .hero { padding-top: 52px; }
  .brand-logo { width: 88px; height: 66px; }
  .nav-links { max-height: calc(100dvh - 110px); overflow-y: auto; }
  .nav-links a { padding: 8px 10px; }
  .menu-toggle { cursor: pointer; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }
  .cta-card .btn { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.form-honeypot { display: none; }
.contact-form .btn:disabled { opacity: .7; cursor: wait; transform: none; }
#contact-status[data-state="error"] { color: #9c2534; }
#contact-status[data-state="success"] { color: var(--primary-dark); font-weight: 700; }
.gallery-open { overflow: hidden; }
.gallery-dialog { width: min(1080px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid #38505e; border-radius: 24px; background: #10202b; color: #fff; box-shadow: 0 24px 80px #0008; }
.gallery-dialog::backdrop { background: rgba(5, 16, 24, .88); backdrop-filter: blur(5px); }
.gallery-toolbar, .gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-toolbar { margin-bottom: 16px; }
.gallery-toolbar h2 { font-size: 1.125rem; letter-spacing: 0; line-height: 1.4; }
.viewer-button { min-height: 44px; border: 1px solid #6b818d; border-radius: 999px; background: #203944; color: #fff; padding: 8px 18px; cursor: pointer; font-weight: 700; }
.viewer-button:hover { background: #0d7f8c; }
.gallery-dialog :focus-visible { outline-color: #ffb545; }
.gallery-stage { display: grid; place-items: center; background: #08131c; border-radius: 14px; overflow: hidden; }
.gallery-stage img { display: block; width: 100%; height: min(56dvh, 590px); object-fit: contain; touch-action: pan-y pinch-zoom; user-select: none; }
#gallery-caption { margin: 14px 0; font-size: 1rem; line-height: 1.5; }
#gallery-position { white-space: nowrap; font-size: .875rem; }
.gallery-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 8px 3px 3px; margin-top: 12px; scrollbar-width: thin; scrollbar-color: #6b818d #203944; }
.gallery-thumbnail { flex: 0 0 auto; padding: 3px; border: 2px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; }
.gallery-thumbnail img { display: block; width: 64px; height: 44px; object-fit: cover; border-radius: 5px; }
.gallery-thumbnail[aria-current="true"] { border-color: #ffb545; }
@media (max-width: 560px) {
  .gallery-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 14px; border-radius: 18px; }
  .gallery-toolbar { gap: 10px; }
  .gallery-toolbar h2 { max-width: 180px; }
  .gallery-stage img { height: 42dvh; }
  .viewer-button { padding: 8px 14px; }
}
