/* =====================================================================
   Renalia Tecomán — sistema de diseño derivado de la fachada real:
   piedra carbón, blanco, cromo y persianas verticales (motivo firma).
   Display: Sora (eco de las letras cromadas) · Cuerpo: Instrument Sans
   ===================================================================== */
:root {
  --bg: #f6f8fb; --card: #ffffff; --ink: #1a2230; --muted: #5b6b7e;
  --primary: #1e4e9c; --accent: #3aa0e0;
  --stone: #2b2f36; --stone-deep: #1c2027; --chrome: #c3ccd6;
  --line: #e2e8f0; --wa: #22c15e; --wa-ink: #ffffff;
  --shadow: 0 20px 50px -18px rgba(28, 32, 39, .28);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b; --card: #1a212b; --ink: #eaeff5; --muted: #93a3b6;
    --primary: #6ea8ec; --accent: #58aee6;
    --stone: #232830; --stone-deep: #14181f; --chrome: #7f8ea0;
    --line: #2a3340; --wa: #25d366; --wa-ink: #06280f;
    --shadow: 0 20px 50px -18px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --card: #1a212b; --ink: #eaeff5; --muted: #93a3b6;
  --primary: #6ea8ec; --accent: #58aee6;
  --stone: #232830; --stone-deep: #14181f; --chrome: #7f8ea0;
  --line: #2a3340; --wa: #25d366; --wa-ink: #06280f;
  --shadow: 0 20px 50px -18px rgba(0, 0, 0, .55);
}
:root[data-theme="light"] {
  --bg: #f6f8fb; --card: #ffffff; --ink: #1a2230; --muted: #5b6b7e;
  --primary: #1e4e9c; --accent: #3aa0e0;
  --stone: #2b2f36; --stone-deep: #1c2027; --chrome: #c3ccd6;
  --line: #e2e8f0; --wa: #22c15e; --wa-ink: #ffffff;
  --shadow: 0 20px 50px -18px rgba(28, 32, 39, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Instrument Sans", -apple-system, system-ui, sans-serif;
  line-height: 1.65; font-size: 1.02rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: "Sora", -apple-system, sans-serif; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; margin: 0 0 10px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.section-sub { color: var(--muted); margin: 0 0 32px; }

/* ===== Motivo firma: persianas verticales (de la fachada) ===== */
.lv { display: inline-flex; gap: 4px; margin-right: 10px; vertical-align: -2px; }
.lv i { width: 3px; height: 14px; background: var(--accent); border-radius: 2px; display: block; }
.lv i:nth-child(2) { height: 10px; align-self: flex-end; opacity: .7; }
.lv i:nth-child(3) { height: 6px; align-self: flex-end; opacity: .45; }
.eyebrow {
  font-family: "Sora", sans-serif; font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px; display: flex; align-items: center;
}

/* ===== Revelados ===== */
.reveal, .reveal-load { opacity: 0; transform: translateY(22px); }
.reveal { transition: opacity .7s ease var(--d, 0s), transform .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-load { animation: rise .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-load { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Botones ===== */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-family: "Sora", sans-serif; font-weight: 600; font-size: .98rem;
  text-decoration: none; text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 10px 24px -8px rgba(34, 193, 94, .55); }
.btn-wa:hover { box-shadow: 0 14px 30px -8px rgba(34, 193, 94, .65); }
.btn-outline { border: 2px solid currentColor; color: var(--primary); background: transparent; }
.btn-grande { font-size: 1.12rem; padding: 18px 34px; }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-chip {
  width: 42px; height: 42px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; overflow: hidden; flex: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.brand-chip img { width: 86%; height: 86%; object-fit: contain; }
.brand-name {
  font-family: "Sora", sans-serif; font-weight: 800; letter-spacing: .18em;
  font-size: 1.02rem; color: #fff; display: flex; flex-direction: column; line-height: 1.2; gap: 1px;
}
.brand-name small { font-size: .58rem; font-weight: 600; letter-spacing: .16em; color: var(--chrome); text-transform: uppercase; }
.site-header.scrolled .brand-name { color: var(--ink); }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a {
  font-family: "Sora", sans-serif; text-decoration: none; font-size: .88rem; font-weight: 600;
  color: rgba(255, 255, 255, .92);
}
.site-header.scrolled .site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--accent); }
.btn-header { padding: 10px 20px; font-size: .85rem; }

/* ===== Hero: la fachada ===== */
.hero {
  position: relative; min-height: min(94vh, 960px);
  display: flex; align-items: center; overflow: hidden;
  padding: 140px 0 120px; color: #fff;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 38%;
  transform: scale(1.08); will-change: transform;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(78deg, rgba(18, 22, 29, .93) 0%, rgba(18, 22, 29, .72) 38%, rgba(18, 22, 29, .18) 72%, rgba(18, 22, 29, .05) 100%),
    linear-gradient(to top, rgba(18, 22, 29, .55) 0%, transparent 28%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; margin-left: 0; }
.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.2rem); font-weight: 800; margin: 18px 0 16px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: 1.15rem; line-height: 1.6; color: rgba(255, 255, 255, .88); margin: 0 0 30px; max-width: 34em; }
.hero-sub strong { color: #fff; }
.badge {
  display: inline-block; margin: 0;
  font-family: "Sora", sans-serif; font-size: .74rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: #eaf6ff; background: rgba(58, 160, 224, .28);
  border: 1px solid rgba(139, 200, 240, .55);
  padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(4px);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-ctas .btn-outline { color: #fff; }
.hero-tel { margin: 26px 0 0; font-size: .95rem; color: var(--chrome); }
.hero-tel a { color: #fff; font-weight: 700; text-decoration: none; }
.hero-louvers {
  position: absolute; right: 44px; bottom: 0; top: 0; z-index: 1;
  display: flex; gap: 12px; align-items: stretch; pointer-events: none;
}
.hero-louvers i {
  width: 3px; background: linear-gradient(to bottom, transparent, rgba(195, 204, 214, .35) 30%, rgba(195, 204, 214, .35) 70%, transparent);
  transform-origin: top; animation: louver 1.1s cubic-bezier(.2,.7,.2,1) both;
}
.hero-louvers i:nth-child(2) { animation-delay: .08s; }
.hero-louvers i:nth-child(3) { animation-delay: .16s; }
.hero-louvers i:nth-child(4) { animation-delay: .24s; }
.hero-louvers i:nth-child(5) { animation-delay: .32s; }
.hero-louvers i:nth-child(6) { animation-delay: .4s; }
.hero-louvers i:nth-child(7) { animation-delay: .48s; }
@keyframes louver { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hero-louvers i { animation: none; } }

/* ===== Barra de confianza flotante ===== */
.trust { padding: 0; position: relative; z-index: 3; }
.trust-card {
  list-style: none; margin: -64px 0 0; padding: 28px 34px;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.trust-card li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 3px solid var(--accent); }
.trust-card strong { font-family: "Sora", sans-serif; font-size: .95rem; font-weight: 700; }
.trust-card span { font-size: .86rem; color: var(--muted); }

/* ===== Tarjetas de situaciones ===== */
.situaciones { padding-top: 96px; }
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card h3 { margin: 0 0 12px; font-size: 1.18rem; font-weight: 700; color: var(--primary); }
.card p { margin: 0 0 18px; color: var(--muted); }
.card-cta {
  font-family: "Sora", sans-serif; font-weight: 600; font-size: .94rem;
  text-decoration: none; margin-top: auto; position: relative; width: fit-content;
}
.card-cta::after { content: "→"; display: inline-block; margin-left: 7px; transition: transform .2s ease; }
.card-cta:hover::after { transform: translateX(5px); }

/* ===== Servicios: franja piedra ===== */
.servicios { background: var(--stone); color: #eef2f6; }
.servicios .eyebrow { color: var(--chrome); }
.servicios h2 { color: #fff; }
.serv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 34px; border-radius: 18px; overflow: hidden; }
.serv {
  background: color-mix(in srgb, var(--stone-deep) 78%, transparent);
  padding: 28px 24px; transition: background .25s ease;
}
.serv:hover { background: var(--stone-deep); }
.serv h3 { margin: 0 0 10px; font-size: 1.05rem; color: #fff; }
.serv h3::before {
  content: ""; display: block; width: 26px; height: 3px; border-radius: 2px;
  background: var(--accent); margin-bottom: 14px;
}
.serv p { margin: 0; font-size: .93rem; color: #b9c4d0; line-height: 1.6; }

/* ===== Unidad ===== */
.unidad-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.unidad-photo { margin: 0; position: relative; }
.unidad-photo img { border-radius: 20px; box-shadow: var(--shadow); }
.unidad-photo::before {
  content: ""; position: absolute; left: -16px; top: 24px; bottom: 24px; width: 4px;
  border-radius: 2px; background: linear-gradient(to bottom, var(--accent), transparent);
}
.unidad-copy p { color: var(--muted); }
.unidad-copy strong { color: var(--ink); }
.unidad-copy .btn { margin-top: 8px; }

/* ===== Equipo ===== */
.equipo { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.equipo-grid { display: grid; grid-template-columns: 1fr minmax(220px, 320px); gap: 48px; align-items: center; }
.equipo-photo { margin: 0; }
.equipo-photo img { border-radius: 20px; box-shadow: var(--shadow); object-fit: cover; }
.cargo { font-family: "Sora", sans-serif; color: var(--accent); font-weight: 600; font-size: .95rem; margin: 0 0 16px; }
.equipo-copy p { color: var(--muted); }
.equipo-copy strong { color: var(--ink); }
.equipo-extra { border-top: 1px solid var(--line); padding-top: 16px; }

/* ===== Ubicación ===== */
.ubicacion-grid { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 36px; margin-top: 28px; }
.dato { margin: 0 0 18px; color: var(--muted); }
.dato strong { display: block; font-family: "Sora", sans-serif; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: 3px; }
.ubicacion-datos .btn { margin-top: 6px; }
.mapa iframe { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: 20px; box-shadow: var(--shadow); }

/* ===== CTA final: piedra profunda con persianas ===== */
.cta-final { background: var(--stone-deep); text-align: center; position: relative; overflow: hidden; padding: 96px 0; }
.cta-louvers { position: absolute; inset: 0; display: flex; gap: clamp(60px, 10vw, 140px); justify-content: center; pointer-events: none; }
.cta-louvers i { width: 2px; background: linear-gradient(to bottom, transparent, rgba(195, 204, 214, .14) 35%, rgba(195, 204, 214, .14) 65%, transparent); }
.cta-final h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 30px; position: relative; }
.cta-final .btn { position: relative; }
.cta-nota { color: #8896a7; font-size: .92rem; margin-top: 18px; position: relative; }

/* ===== Footer ===== */
.site-footer { padding: 48px 0 100px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.footer-id { display: flex; align-items: center; gap: 18px; }
.footer-logo { width: 92px; height: 92px; flex: none; border-radius: 16px; background: #fff; padding: 6px; box-sizing: border-box; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.footer-brand { font-family: "Sora", sans-serif; font-weight: 800; letter-spacing: .14em; color: var(--primary); margin: 0 0 2px; }
.footer-slogan { font-family: "Sora", sans-serif; font-size: .74rem !important; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent) !important; }
.site-footer p { margin: 0 0 8px; color: var(--muted); font-size: .95rem; }
.footer-legal { margin-top: 28px; }
.footer-legal p { font-size: .8rem; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 10px 26px -6px rgba(34, 193, 94, .6);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: var(--wa-ink); }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .unidad-grid, .equipo-grid, .ubicacion-grid { grid-template-columns: 1fr; gap: 32px; }
  .equipo-photo { max-width: 320px; }
  .serv-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-card { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .hero-louvers { display: none; }
}
@media (max-width: 560px) {
  section { padding: 52px 0; }
  .hero { padding: 120px 0 96px; min-height: 88vh; }
  .hero-media img { object-position: 58% 34%; }
  .cards-grid, .serv-grid, .trust-card { grid-template-columns: 1fr; }
  .trust-card { margin-top: -48px; padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-header { width: auto; }
  .hero-ctas { flex-direction: column; }
}
