/* =============================================================
   FG Aire Acondicionado — Hoja de estilos de la landing
   Rol MVC: presentación (todos los estilos viven aquí, sin CSS inline).

   Sistema de diseño inspirado en semaloop.com (base clara minimalista,
   secciones numeradas con etiquetas en mono, bloques "showcase" oscuros,
   contenedor estrecho, esquinas suaves) adaptado a la PALETA AZUL del logo FG.
   ============================================================= */

/* ----- Tipografía autoalojada (Inter, libre · SIL OFL) ----- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/InterVariable.woff2') format('woff2');
}

/* ----- Tokens de diseño ----- */
:root {
    --bg:       #f1f5fa;   /* fondo base "hielo" (equivalente al crema) */
    --ink:      #0e2c47;   /* texto principal y botones (navy corporativo) */
    --accent:   #1d6fb8;   /* azul de acento (links, números, detalles) */
    --accent-2: #2e86d3;   /* azul más claro para hover/realces */
    --deep:     #0f3357;   /* bloques showcase oscuros */
    --deep-2:   #0a2740;   /* navy más profundo (degradados) */
    --sage:     #aecbe6;   /* azul claro suave */
    --surface:  #e5edf5;   /* superficie secundaria / chips */
    --white:    #ffffff;

    --muted:    rgba(14, 44, 71, .62);
    --muted-2:  rgba(14, 44, 71, .42);
    --border:   rgba(14, 44, 71, .10);
    --border-2: rgba(14, 44, 71, .16);

    --radius:    .75rem;   /* rounded-lg global (12px) */
    --radius-lg: 1.25rem;
    --radius-pill: 999px;
    --maxw: 1240px;

    --mono: ui-monospace, "SF Mono", "Geist Mono", Menlo, Monaco, "Cascadia Mono", monospace;

    --shadow-sm: 0 1px 2px rgba(14, 44, 71, .06);
    --shadow:    0 18px 50px rgba(14, 44, 71, .12);

    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ----- Reset ligero ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; }

/* ----- Layout ----- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(60px, 9vw, 110px); }

/* Etiqueta de sección en mono (00 · LABEL) */
.label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted-2);
}
.label__num { color: var(--accent); font-weight: 600; }
.label__line { flex: 1; height: 1px; background: var(--border); max-width: 64px; }

.section__head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 48px); }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-top: 18px; }
.section__lead { color: var(--muted); font-size: 1.06rem; margin: 16px 0 0; max-width: 46em; }

/* ----- Botones ----- */
.btn {
    --pad: 13px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--pad);
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
    white-space: nowrap;
}
.btn--lg { --pad: 16px 30px; font-size: 1rem; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--deep); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); background: rgba(14, 44, 71, .04); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }

.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); }
.arrow-link:hover { color: var(--accent); }
.arrow-link span { transition: transform .2s var(--ease); }
.arrow-link:hover span { transform: translateX(3px); }

/* =============================================================
   Cabecera / navegación
   ============================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(241, 245, 250, .8);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-color: var(--border); }
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 112px;
    gap: 16px;
}
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 96px; width: auto; }

.nav__menu { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.nav__link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: .92rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.nav__link:hover { color: var(--ink); background: rgba(14, 44, 71, .05); }
.nav__link--pill { border-color: var(--border-2); }
.nav__link--pill:hover { border-color: var(--ink); background: transparent; }
.nav__cta { background: var(--ink); color: #fff; }
.nav__cta:hover { background: var(--deep); color: #fff; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px; height: 42px;
    padding: 0;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
}
.nav-toggle__bar { display: block; width: 18px; height: 2px; margin-inline: auto; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================================
   Hero — imagen de fondo con los textos encima (panel redondeado)
   ============================================================= */
.hero { padding-top: clamp(18px, 3vw, 30px); padding-bottom: clamp(20px, 3vw, 32px); }

.hero__panel {
    position: relative;
    isolation: isolate;            /* contiene los z-index negativos del fondo */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(460px, 64vh, 660px);
    padding: clamp(32px, 6vw, 76px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: #fff;
}
.hero__bg-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Velo oscuro para legibilidad (más denso a la izquierda, donde va el texto) */
.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(8, 26, 44, .9) 0%, rgba(8, 26, 44, .66) 50%, rgba(8, 26, 44, .4) 100%);
}

.hero__content { max-width: 40rem; }
.hero__title {
    color: #fff;
    font-size: clamp(2.3rem, 5.6vw, 3.9rem);
    line-height: 1.05;
    letter-spacing: -.03em;
    max-width: 16ch;
}
.hero__title span { display: block; }
.hero__title .is-accent { color: var(--sage); }
.hero__sub { color: rgba(255, 255, 255, .86); font-size: 1.16rem; max-width: 34em; margin: 22px 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.hero__actions .arrow-link { color: #fff; }
.hero__actions .arrow-link:hover { color: var(--sage); }

.hero__badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 32px 0 0;
    padding: 0;
}
.hero__badges li {
    font-family: var(--mono);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-pill);
    padding: 7px 14px;
}

/* =============================================================
   00 · El reto  (frase grande sobre fondo claro)
   ============================================================= */
.statement__text {
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    line-height: 1.32;
    letter-spacing: -.02em;
    font-weight: 600;
    max-width: 20ch;
    margin: 22px 0 0;
    color: var(--ink);
}
.statement__text--full { max-width: 24ch; }

/* =============================================================
   01 · Solución (heading grande)
   ============================================================= */
.solution__heading {
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    line-height: 1.1;
    max-width: 18ch;
    margin-top: 20px;
}

/* =============================================================
   Bloques "showcase" (01a, 01b) — navy con imagen + texto
   ============================================================= */
.showcase { padding-block: clamp(10px, 2vw, 18px); }
.showcase__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.showcase__card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(150deg, var(--deep), var(--deep-2));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(20px, 3vw, 34px);
}
.showcase__media { margin-bottom: clamp(18px, 2.5vw, 26px); }
.showcase__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.showcase__num { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .45); }
.showcase__title { color: #fff; font-size: clamp(1.3rem, 2.3vw, 1.7rem); margin: 12px 0 0; }
.showcase__body { color: rgba(255, 255, 255, .66); margin: 12px 0 0; font-size: 1.02rem; }

/* =============================================================
   02 · Servicios
   ============================================================= */
.grid-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.service {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.service:hover { border-color: var(--sage); transform: translateY(-3px); }
.service__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 11px;
    background: var(--surface);
    color: var(--accent);
    margin-bottom: 16px;
}
.service__icon svg { width: 23px; height: 23px; }
.service__title { font-size: 1.04rem; line-height: 1.25; margin-bottom: 8px; }
.service__text { color: var(--muted); font-size: .92rem; margin: 0; }

/* =============================================================
   03 · Lo que hacemos (chips)
   ============================================================= */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
    font-family: var(--mono);
    font-size: .76rem;
    letter-spacing: .02em;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 9px 16px;
}
.chip::before { content: "—"; color: var(--accent); margin-right: 8px; }

/* =============================================================
   04 · Nosotros / principios
   ============================================================= */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about__text { color: var(--muted); font-size: 1.06rem; margin: 16px 0 0; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.principle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}
.principle:last-child { border-bottom: 1px solid var(--border); }
.principle__num { font-family: var(--mono); font-size: .78rem; color: var(--accent); padding-top: 3px; }
.principle__title { font-size: 1.02rem; margin: 0 0 3px; }
.principle__text { color: var(--muted); font-size: .92rem; margin: 0; }

/* =============================================================
   05 · Galería de trabajos
   ============================================================= */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery__item {
    padding: 0; border: 0; margin: 0; cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    aspect-ratio: 4 / 3;
    position: relative;
}
.gallery__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery__item:hover .gallery__img { transform: scale(1.05); }
.gallery__item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 transparent; transition: box-shadow .2s var(--ease); }
.gallery__item:hover::after { box-shadow: inset 0 0 0 3px var(--accent); }

/* =============================================================
   06 · Contacto (bloque CTA navy)
   ============================================================= */
.contact__card {
    background: linear-gradient(150deg, var(--deep), var(--deep-2));
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 60px);
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}
.contact__card .label { color: rgba(255, 255, 255, .5); }
.contact__card .label__num { color: var(--sage); }
.contact__card .label__line { background: rgba(255, 255, 255, .2); }
.contact__title { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-top: 18px; }
.contact__lead { color: rgba(255, 255, 255, .7); margin: 16px 0 0; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact__item { display: flex; gap: 14px; align-items: flex-start; }
.contact__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 11px; background: rgba(255, 255, 255, .12); color: #fff; }
.contact__icon svg { width: 20px; height: 20px; }
.contact__klabel { display: block; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--sage); margin-bottom: 3px; }
.contact__value { margin: 0; font-size: 1.06rem; font-weight: 500; }
.contact__value a { color: #fff; }
.contact__value a:hover { color: #fff; text-decoration: underline; }
.pendiente { font-weight: 400; font-style: italic; opacity: .8; }

/* =============================================================
   Visor de galería (lightbox)
   ============================================================= */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 28px; background: rgba(10, 28, 46, .92); opacity: 0; transition: opacity .25s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(1000px, 92vw); max-height: 86vh; width: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.lightbox__close, .lightbox__nav { position: absolute; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); border-radius: 50%; transition: background-color .15s var(--ease); }
.lightbox__close { top: 20px; right: 22px; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.3rem; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .25); }

/* =============================================================
   Pie de página
   ============================================================= */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .66); padding-top: clamp(44px, 6vw, 68px); margin-top: clamp(40px, 6vw, 72px); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-bottom: 36px; }
.site-footer__logo { height: 46px; width: auto; background: #fff; padding: 9px 13px; border-radius: var(--radius); }
.site-footer__tagline { margin: 16px 0 0; max-width: 32em; color: rgba(255, 255, 255, .5); font-size: .95rem; }
.site-footer__title { color: #fff; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; }
.site-footer__nav ul, .site-footer__contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer__nav a { color: rgba(255, 255, 255, .66); font-size: .95rem; }
.site-footer__nav a:hover { color: #fff; }
.site-footer__contact li { display: grid; gap: 2px; font-size: .95rem; }
.site-footer__klabel { font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .4); }
.site-footer__contact a { color: rgba(255, 255, 255, .82); }
.site-footer__contact a:hover { color: #fff; }
.site-footer .pendiente { color: rgba(255, 255, 255, .5); }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 22px; font-size: .85rem; color: rgba(255, 255, 255, .45); }
.site-footer__bottom p { margin: 0; }

/* =============================================================
   Animación de entrada (scroll reveal)
   El estado oculto SOLO se aplica si hay JS (clase .js en <html>); así, si el
   JavaScript falla o está desactivado, el contenido se muestra igualmente.
   ============================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 940px) {
    .grid-services { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .about { grid-template-columns: 1fr; }
    .contact__card { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .nav-toggle { display: flex; }
    .nav__menu {
        position: absolute; top: calc(100% + 1px); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 4px;
        padding: 14px 24px 20px;
        background: rgba(241, 245, 250, .98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        transform: translateY(-12px); opacity: 0; visibility: hidden;
        transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
    }
    .nav__menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav__link { padding: 12px 14px; border: 0; }
    .showcase__grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 460px) {
    .grid-services { grid-template-columns: 1fr; }
    .hero__actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .reveal, .js .reveal { opacity: 1 !important; transform: none !important; }
}
