/* ===========================================================
   freshpool chile - design tokens
   Paleta de marca: celeste/azul degradado tipo agua (sin cambios respecto al prototipo).
   Radios: sistema "soft" (16px tarjetas, pill en botones/chips).
=========================================================== */
:root {
  --brand-deep: #0b5aa6;
  --brand-deep-dark: #08447e;
  --brand-mid: #2aa9d6;
  --brand-light: #eaf6fb;
  --brand-lighter: #f6fbfd;
  --ink: #0f2439;
  --ink-soft: #4a6478;
  --white: #ffffff;
  --border-soft: #d9ecf4;
  --whatsapp: #25d366;

  --radius-card: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 24px 55px -24px rgba(11, 90, 166, 0.28);
  --shadow-tight: 0 8px 20px -12px rgba(11, 90, 166, 0.35);

  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

section { padding: 120px 0; scroll-margin-top: 96px; }
@media (max-width: 900px) {
  section { padding: 80px 0; }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
}

/* Foco visible para navegación por teclado (accesibilidad) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--brand-mid);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===========================================================
   Botones
=========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 16px 30px;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.25s ease;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 12px 22px; font-size: 0.88rem; }
.btn-lg { padding: 19px 32px; font-size: 1rem; width: 100%; }

.btn-primary {
  background: var(--brand-deep);
  color: var(--white);
  box-shadow: var(--shadow-tight);
}
.btn-primary:hover { background: var(--brand-deep-dark); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(11,90,166,0.45); }

.btn-ghost {
  background: transparent;
  color: var(--brand-deep);
  border-color: var(--border-soft);
}
.btn-ghost:hover { border-color: var(--brand-deep); background: var(--brand-light); }

/* ===========================================================
   Placeholders de imagen (a la espera de fotografías reales)
=========================================================== */
.media-frame {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  background: linear-gradient(150deg, var(--brand-light) 0%, #ffffff 100%);
  border: 1.5px dashed #b9dcec;
}
.img-placeholder i {
  font-size: 2.4rem;
  color: var(--brand-mid);
  opacity: 0.85;
}
.img-placeholder span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 220px;
  line-height: 1.45;
}
.img-placeholder--sm { min-height: 0; padding: 12px; gap: 6px; }
.img-placeholder--sm i { font-size: 1.8rem; }

/* ===========================================================
   Header
=========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 8px 24px -18px rgba(11, 90, 166, 0.5);
}
#scrollSentinel { position: absolute; top: 0; height: 1px; width: 1px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand-mark {
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--ink);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--brand-deep); }
.main-nav a.is-active { color: var(--brand-deep); position: relative; }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--brand-mid);
}
@media (max-width: 960px) {
  .main-nav a.is-active::after { display: none; }
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--brand-deep);
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 960px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--brand-light); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-sm { display: none; }
}

/* ===========================================================
   Hero - split asimétrico
=========================================================== */
.hero {
  background: linear-gradient(180deg, var(--brand-lighter) 0%, var(--white) 100%);
  padding-top: 64px;
  padding-bottom: 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 64px;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  line-height: 1.14;
  color: var(--ink);
  margin-bottom: 22px;
}

.hero-copy p {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-media { position: relative; }

.hero-frame {
  aspect-ratio: 4 / 4.6;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 900px) {
  .hero-frame { aspect-ratio: 4 / 3.4; }
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 16px 22px;
  box-shadow: 0 18px 40px -16px rgba(11, 90, 166, 0.4);
}
.stat-badge--floating {
  position: absolute;
  left: -18px;
  bottom: -22px;
  z-index: 2;
}
.stat-number {
  font-family: 'Fraunces', 'Plus Jakarta Sans', serif;
  font-weight: 500;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--brand-deep);
}
.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { order: -1; margin-bottom: 8px; }
  .hero-copy p { max-width: none; }
  .stat-badge--floating { left: 16px; bottom: -20px; padding: 12px 16px; }
  .stat-number { font-size: 1.9rem; }
}

/* ===========================================================
   Quiénes somos
=========================================================== */
.nosotros { background: var(--white); }
.nosotros-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.nosotros h2 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); margin-bottom: 32px; }

.nosotros-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 44px;
}
.mini-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--brand-light);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.9rem;
}
.mini-stat i { font-size: 1.15rem; }

.nosotros-copy { text-align: left; }
.nosotros-copy p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 22px;
}
.nosotros-copy p:last-child { margin-bottom: 0; }

/* ===========================================================
   Servicios - asimétrico (Diamond Brite grande, Servicio Técnico chico)
=========================================================== */
.servicios h2 { text-align: center; font-size: clamp(1.8rem, 2.6vw, 2.3rem); margin-bottom: 52px; }

.servicios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.service-card--primary {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.service-card-media { min-height: 380px; }

.service-card-body { padding: 48px; display: flex; flex-direction: column; gap: 16px; align-self: center; }

.service-tag {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.service-card-body h3 { font-size: 1.55rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.service-card-body h3 i { color: var(--brand-deep); }

.service-bullets { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.service-bullets li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 0.96rem; }
.service-bullets i { color: var(--brand-mid); font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.service-bullets--compact { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }
.service-bullets--compact li { font-size: 0.92rem; }

.servicios-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.service-card--secondary {
  background: var(--brand-light);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  height: 100%;
}
.service-card--secondary .service-card-body { padding: 0; max-width: 680px; }
.service-card--secondary h3 { font-size: 1.2rem; }
.service-card--secondary p { font-size: 0.94rem; }

.service-card--with-thumb {
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  padding: 20px 20px 32px;
}
.service-card-thumb { aspect-ratio: 16 / 8; flex-shrink: 0; }
.service-card--with-thumb .service-card-body { padding: 0 16px; max-width: none; }

@media (max-width: 860px) {
  .service-card--primary { grid-template-columns: 1fr; }
  .service-card-media { min-height: 240px; }
  .service-card-body { padding: 30px; }
  .servicios-secondary-row { grid-template-columns: 1fr; }
  .service-card--secondary { padding: 30px; }
}

/* ===========================================================
   Marcas
=========================================================== */
.marcas { background: var(--brand-lighter); padding: 64px 0; }
.marcas-label {
  text-align: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 30px;
}
.marcas-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 52px;
}
.marcas-row span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.marcas-row span:hover { color: var(--brand-deep); opacity: 1; }

/* ===========================================================
   Proyectos
=========================================================== */
.proyectos h2 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); text-align: center; }
.section-lead { text-align: center; max-width: 52ch; margin: 12px auto 52px; }

.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 60px;
}
.before-after-item { margin: 0; position: relative; aspect-ratio: 3 / 2; }
.before-after-item figcaption {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: rgba(15, 36, 57, 0.72);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.before-after-arrow {
  color: var(--brand-deep);
  font-size: 1.6rem;
}

@media (max-width: 700px) {
  .before-after { grid-template-columns: 1fr; }
  .before-after-arrow { transform: rotate(90deg); justify-self: center; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: block;
}
.gallery-item .img-placeholder { border-radius: 12px; }

.gallery-item--cta {
  background: var(--brand-deep);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
}
.gallery-item--cta i { font-size: 1.8rem; }

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================
   Cobertura
=========================================================== */
.cobertura { background: var(--brand-lighter); }
.cobertura-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.cobertura h2 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); margin-bottom: 16px; }
.cobertura-copy p { margin-bottom: 28px; max-width: 48ch; }

.comuna-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.comuna-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--border-soft);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.comuna-chip i { color: var(--brand-mid); }
.comuna-chip--featured {
  background: var(--brand-deep);
  color: var(--white);
  border-color: var(--brand-deep);
}
.comuna-chip--featured i { color: var(--white); }

.cobertura-nacional {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  max-width: fit-content;
}
.cobertura-nacional i { font-size: 1.2rem; flex-shrink: 0; }

.cobertura-media { aspect-ratio: 4 / 3; box-shadow: var(--shadow-soft); }

@media (max-width: 860px) {
  .cobertura-inner { grid-template-columns: 1fr; }
  .cobertura-media { order: -1; }
}

/* ===========================================================
   Cotización
=========================================================== */
.cotizacion-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: flex-start;
}
.cotizacion-intro h2 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); margin-bottom: 16px; }
.cotizacion-intro p { max-width: 42ch; }

.quote-form {
  background: var(--brand-lighter);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field--full { grid-column: 1 / -1; }

.form-field label { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.label-optional { font-weight: 500; color: var(--ink-soft); }

.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 0.96rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #93a9b8; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgba(11, 90, 166, 0.15);
}

.field-error {
  display: none;
  color: #c0392b;
  font-size: 0.82rem;
  font-weight: 600;
}
.form-field.has-error input,
.form-field.has-error select { border-color: #c0392b; }
.form-field.has-error .field-error { display: block; }

@media (max-width: 860px) {
  .cotizacion-inner { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; padding: 24px; }
}

/* ===========================================================
   Footer
=========================================================== */
.site-footer { background: var(--ink); color: #cddce6; }
.footer-inner {
  padding: 68px 0 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-tagline { margin-top: 16px; font-size: 0.9rem; color: #9db3c2; line-height: 1.6; }

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col a, .footer-col p {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9db3c2;
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.footer-col a:hover { color: var(--white); }

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0;
}
.social-links a:hover { background: var(--brand-mid); color: var(--white); }
.social-links .placeholder-link { opacity: 0.5; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
}
.footer-bottom p { font-size: 0.82rem; color: #7d93a3; margin: 0; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===========================================================
   Boton flotante de WhatsApp
=========================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 12px 28px -8px rgba(0,0,0,0.35);
  z-index: 50;
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }

/* ===========================================================
   Scroll reveal (respeta prefers-reduced-motion)
=========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
