/* Terra Projects Ltda — estilos (sin fuentes ni recursos externos) */
:root {
    --ink: #1f2a2c;
    --muted: #55656a;
    --bg: #f5f7f6;
    --card: #ffffff;
    --line: #d9e0de;
    --teal: #12727f;
    --teal-dark: #0d5560;
    --green: #5a8f1f;
    --footer: #1b2527;
    --radius: 10px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

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

a { color: var(--teal-dark); }

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

.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 2000;
    background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 6px;
}
.skip-link:focus { top: 8px; }

.section { padding: 64px 20px; max-width: 1200px; margin: 0 auto; }

.section-title {
    font-size: clamp(26px, 4vw, 34px);
    text-align: center;
    margin: 0 0 12px;
}
.section-sub {
    text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 36px;
}

/* ===== NAVBAR ===== */
#navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 24px; background: #fff; position: sticky; top: 0; z-index: 999;
    border-bottom: 1px solid var(--line);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-img { width: 46px; height: 46px; object-fit: contain; }
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: .02em; }

.nav-links { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; align-items: center; }
.nav-links a {
    text-decoration: none; color: var(--ink); font-weight: 600;
    padding: 10px 12px; border-radius: 6px; display: block;
}
.nav-links a:hover { background: var(--bg); }
.nav-links .nav-cta { background: var(--teal); color: #fff; }
.nav-links .nav-cta:hover { background: var(--teal-dark); }

.menu-btn {
    display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
    width: 44px; height: 44px; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block; padding: 12px 22px; border-radius: 6px; border: 0;
    background: var(--teal); color: #fff; font: inherit; font-weight: 700;
    text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--teal-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-light { background: #fff; color: var(--teal-dark); }
.btn-light:hover { background: var(--bg); }
.btn-outline { background: transparent; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }

/* ===== HERO ===== */
#hero { position: relative; min-height: 460px; height: 70vh; max-height: 720px; overflow: hidden; background: #16393f; }
#hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-mask { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.65), rgba(0,0,0,.25)); }
.hero-content {
    position: absolute; left: 0; right: 0; bottom: 14%;
    padding: 0 max(20px, 8%); color: #fff; max-width: 900px;
}
.hero-content h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.15; margin: 0; }
.hero-content p { font-size: clamp(16px, 2.2vw, 20px); margin: 14px 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== SERVICIOS ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.service-card {
    display: block; background: var(--card); border-radius: var(--radius); overflow: hidden;
    text-decoration: none; color: inherit; box-shadow: 0 2px 8px rgba(0,0,0,.10);
    transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.slider { position: relative; aspect-ratio: 4 / 3; background: #e4eae8; }
.slider img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity .6s;
}
.slider img.active { opacity: 1; }
.service-card h3 { margin: 16px 16px 4px; font-size: 20px; }
.service-card p { margin: 0 16px 18px; color: var(--muted); }

/* ===== NOSOTROS ===== */
.nosotros-container { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.nosotros-text { flex: 1 1 320px; font-size: 18px; }
.nosotros-image { flex: 1 1 280px; text-align: center; }
.collage-img { width: 100%; max-width: 320px; border-radius: var(--radius); }

/* ===== COTIZACIÓN ===== */
.cotizacion-box {
    background: var(--card); border-radius: var(--radius); padding: clamp(18px, 4vw, 36px);
    box-shadow: 0 2px 8px rgba(0,0,0,.10); max-width: 820px; margin: 0 auto;
}
.field { margin-bottom: 16px; }
.field label, .field-legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="search"], .field select, .field textarea {
    width: 100%; padding: 12px; font: inherit; color: var(--ink);
    border: 1px solid #aebbb8; border-radius: 6px; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input[type="file"] { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-row .btn { white-space: nowrap; }

#map-cotizacion {
    width: 100%; height: 380px; border: 1px solid #aebbb8; border-radius: 6px; margin: 8px 0;
    z-index: 0;
}
.area-info { font-weight: 600; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }

/* campo trampa anti-spam: fuera de pantalla, no display:none */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 16px; padding: 14px; border-radius: 6px; display: none; font-weight: 600; }
.form-status.ok { display: block; background: #e3f3e2; color: #1d5a22; border: 1px solid #9fd09a; }
.form-status.err { display: block; background: #fbe6e4; color: #8a1d14; border: 1px solid #e3a49e; }

/* ===== FOOTER ===== */
#footer { background: var(--footer); color: #e8eeed; padding: 40px 20px 24px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px 60px; max-width: 1200px; margin: 0 auto; }
#footer h2 { font-size: 17px; margin: 0 0 10px; }
#footer a { color: #c9dcd9; display: block; padding: 3px 0; }
#footer p { margin: 0 0 6px; }
.footer-copy { text-align: center; margin-top: 28px; font-size: 14px; color: #a9b8b5; }

/* ===== SUBPÁGINAS ===== */
.subpage-container { max-width: 960px; margin: 0 auto; padding: 40px 20px 60px; }
.subpage-container h1 { font-size: clamp(28px, 5vw, 38px); margin-top: 0; }
.subpage-container p { font-size: 18px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 32px 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: #e4eae8; }
.subpage-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.legal h2 { margin-top: 32px; font-size: 22px; }
.legal p, .legal li { font-size: 17px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
    #navbar { padding: 10px 16px; flex-wrap: wrap; }
    .menu-btn { display: block; }
    .nav-links {
        display: none; flex-direction: column; align-items: stretch; gap: 0;
        width: 100%; padding-top: 8px;
    }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 14px 8px; border-top: 1px solid var(--line); border-radius: 0; }
    .nav-links .nav-cta { text-align: center; margin-top: 8px; border-radius: 6px; border-top: 0; }
    .section { padding: 44px 16px; }
    .field-row { grid-template-columns: 1fr; }
    #map-cotizacion { height: 320px; }
    .search-row { flex-direction: column; }
    #hero { min-height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .service-card, .slider img { transition: none; }
}

.btn-ghost { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.video-toggle {
    position: absolute; right: 16px; bottom: 16px; z-index: 2;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7);
    background: rgba(0,0,0,.45); color: #fff; font-size: 14px; cursor: pointer;
}
.video-toggle:hover { background: rgba(0,0,0,.7); }

/* Si el navegador bloquea el autoplay, el botón de reproducir llama la atención */
.video-toggle.bloqueado { background: var(--teal); border-color: #fff; animation: latido 1.4s ease-in-out infinite; }
@keyframes latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .video-toggle.bloqueado { animation: none; } }
