/* ==========================================================
   CASERVINT, S.C. — estilos del sitio
   Colores y tipografía tomados del diseño original (Claude Design).
   ========================================================== */

:root {
  /* Marca */
  --green-900: oklch(0.52 0.10 136); /* matiz de la V del logo (#426C30), aclarado */
  --green-700: oklch(0.55 0.10 136);
  --green-600: oklch(0.49 0.10 136); /* la V del logo tal cual: texto y bordes sobre blanco */
  --green-500: oklch(0.57 0.10 136);
  --navy: oklch(0.31 0.078 252);
  --navy-dark: oklch(0.23 0.07 252);
  --navy-label: oklch(0.38 0.09 252);
  --gold: oklch(0.82 0.12 76);
  --on-green: oklch(1 0 0); /* texto sobre verde: en estos verdes claros solo el blanco pasa AA; --gold queda para líneas y dibujos */

  /* Neutros */
  --ink: oklch(0.22 0.025 250);
  --ink-2: oklch(0.37 0.02 250);
  --muted: oklch(0.44 0.018 250);
  --muted-2: oklch(0.52 0.014 250);
  --bg: oklch(0.982 0.004 150);
  --surface: oklch(0.995 0.002 150);
  --surface-2: oklch(0.972 0.006 150);
  --hover: oklch(0.965 0.008 150);
  --line: oklch(0.9 0.008 150);

  /* Tipografía */
  --font-body: Manrope, Helvetica, Arial, sans-serif;
  --font-head: Archivo, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 71px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--navy-dark); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
::selection { background: oklch(0.84 0.11 76); }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px;
}
.skip-link:focus { top: 8px; color: #fff; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-label);
  margin: 0 0 14px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  background: var(--navy);
  color: oklch(0.98 0.006 250);
  padding: 15px 28px;
  border: 0;
  border-radius: 2px;
  font: 600 15px/1.2 var(--font-body);
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn-sm { padding: 11px 20px; font-size: 14.5px; }
.btn-outline { background: none; border: 1px solid oklch(0.85 0.01 150); color: oklch(0.42 0.07 132); }
.btn-outline:hover { background: none; border-color: var(--green-600); color: oklch(0.42 0.07 132); }
.link-arrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Encabezado y navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.995 0.002 150 / 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 40px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-family: var(--font-head); font-size: 24px; letter-spacing: 0.02em; }
.brand small { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted-2); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 30px; font-size: 14.5px; font-weight: 500; }
.nav > a:not(.btn), .dropdown summary { color: var(--ink-2); }
.nav > a:not(.btn):hover, .dropdown summary:hover, .nav [aria-current="page"] { color: var(--green-600); }

.dropdown { position: relative; }
.dropdown summary { cursor: pointer; list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary::after { content: " ▾"; }
.dropdown[open] summary::after { content: " ▴"; }
.menu {
  position: absolute; top: calc(100% + 18px); left: -18px; z-index: 60;
  width: 300px;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid oklch(0.88 0.01 150);
  box-shadow: 0 18px 40px oklch(0.42 0.07 132 / 0.18);
}
.menu-wide { width: 380px; }
.menu a { padding: 12px 20px; color: var(--ink); font-family: var(--font-head); font-weight: 600; }
.menu a:hover { background: var(--hover); color: oklch(0.42 0.07 132); }
.menu a span { display: block; font: 400 12.5px/1.45 var(--font-body); color: var(--muted); margin-top: 2px; }
.menu-label {
  margin: 0; padding: 14px 20px 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy-label); background: var(--surface-2);
  border-block: 1px solid oklch(0.93 0.007 150);
}

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  padding: 8px 14px; font: 600 14px var(--font-body); color: var(--ink); cursor: pointer;
}

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-block; }
  .nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; padding-bottom: 8px; }
  .js .nav:not(.is-open) { display: none; }
  .nav > a:not(.btn), .dropdown summary { display: block; padding: 12px 0; border-top: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; text-align: center; }
  .menu, .menu-wide { position: static; width: auto; box-shadow: none; margin-bottom: 8px; }
}

/* ---------- Encabezado de página (interiores) ---------- */
.page-hero { background: var(--green-700); color: oklch(0.97 0.008 250); }
.page-hero .wrap { padding-block: clamp(44px, 7vw, 64px) clamp(40px, 6vw, 60px); }
.page-hero .eyebrow { color: var(--on-green); }
.page-hero h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -0.02em; margin-bottom: 18px; max-width: 820px; }
.page-hero p:not(.eyebrow) { font-size: 17.5px; line-height: 1.65; color: var(--on-green); max-width: 680px; }

/* ---------- Carrusel de inicio ---------- */
.hero { --hero-img-h: clamp(300px, calc(100vh - var(--header-h) - 186px), 774px); position: relative; display: grid; background: var(--green-500); }
.slide {
  grid-area: 1 / 1; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: var(--hero-img-h); object-fit: cover; }
.slide-caption { flex: 1; background: var(--green-900); padding-block: 36px; }
.slide-caption .eyebrow { color: var(--on-green); }
.slide-title { font-family: var(--font-head); font-weight: 600; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -0.018em; color: oklch(0.98 0.006 250); max-width: 820px; margin-bottom: 10px; }
.slide-text { font-size: 16px; line-height: 1.5; color: var(--on-green); max-width: 620px; }
.hero-dots { position: absolute; left: 0; right: 0; top: calc(var(--hero-img-h) - 24px); display: flex; justify-content: center; gap: 10px; z-index: 2; }
.hero-dots button { width: 34px; height: 4px; padding: 0; border: 0; cursor: pointer; background: oklch(0.98 0.006 250 / 0.5); }
.hero-dots button[aria-current="true"] { background: var(--gold); }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(56px, 8vw, 80px); }
.section-tight { padding-block: 0 clamp(48px, 7vw, 96px); }

.intro { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: start; }
.intro h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 24px; }
.intro .lead { font-size: 18px; line-height: 1.65; color: var(--ink-2); margin-bottom: 18px; }
.intro .lead + p { font-size: 17px; line-height: 1.7; color: oklch(0.41 0.018 250); margin-bottom: 30px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Rejilla con líneas de 1px entre celdas */
.grid-lines { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-lines > * { background: var(--surface); padding: 26px 24px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat strong { display: block; font-family: var(--font-head); font-size: 30px; font-weight: 600; color: var(--green-600); line-height: 1.2; }
.stat span { font-size: 13.5px; color: var(--muted); }

.card-link { display: block; color: var(--ink); transition: background .15s; }
.grid-lines > .card-link { padding: 32px 30px 34px; }
.card-link:hover { background: var(--hover); color: var(--ink); }
.card-link h2, .card-link h3 { font-size: 22px; margin-bottom: 10px; }
.card-link p { font-size: 15px; line-height: 1.65; color: var(--muted); margin-bottom: 18px; }
.card-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--navy-label); margin-bottom: 16px; }

.card h2, .card h3 { font-size: 16px; margin-bottom: 10px; }
.card p { font-size: 14px; line-height: 1.65; color: var(--muted); }

.accent-list { display: grid; gap: 20px; }
.accent-list > * { border-left: 2px solid var(--navy-label); padding: 4px 0 4px 20px; }
.accent-list h2, .accent-list h3 { font-size: 17px; margin-bottom: 6px; }
.accent-list p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Filas de servicios (alternadas) ---------- */
.rows { padding-bottom: 40px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding-block: 56px; border-top: 1px solid var(--line);
}
.rows > .row:first-child { border-top: 0; }
.row:nth-child(even) .media { order: 2; }
.media { height: 360px; min-width: 0; background: var(--green-500); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media > img { outline: 1px solid var(--line); outline-offset: -1px; } /* que los blancos de la foto no se pierdan en el fondo */
.row h2 { font-size: 28px; line-height: 1.18; margin-bottom: 16px; max-width: 540px; }
.row-body > p:not(.eyebrow) { font-size: 16.5px; line-height: 1.7; color: oklch(0.39 0.02 250); margin-bottom: 24px; max-width: 540px; }
.row h3 { font-size: 18px; margin-bottom: 10px; }
.row ul { margin: 0 0 28px; padding-left: 20px; font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 560px; }
.row li + li { margin-top: 6px; }

/* Portada decorativa cuando el servicio no tiene foto */
.cover {
  position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between;
  padding: 34px 36px; color: var(--gold);
  background: repeating-linear-gradient(135deg, var(--green-700) 0 22px, oklch(0.61 0.10 136) 22px 23px);
}
.row:nth-child(even) .cover { background: repeating-linear-gradient(135deg, var(--navy) 0 22px, oklch(0.35 0.08 252) 22px 23px); }
.logo-badge { width: 58px; height: 58px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.logo-badge img { width: 44px; height: 44px; object-fit: contain; }
.cover small { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-green); }
/* Ilustración de línea, una por servicio */
.cover-art {
  position: absolute; right: 7%; top: 50%; translate: 0 -50%; width: auto; height: 68%;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
/* Foto angosta: entera, junto a un panel de marca */
.media-vertical { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr) auto; }
.media-vertical > img { width: auto; height: 100%; aspect-ratio: 184 / 406; }

/* ---------- Banda de llamada a la acción ---------- */
.cta-band { border-top: 1px solid var(--line); background: var(--surface-2); }
.cta-band .wrap { padding-block: 56px 64px; display: flex; align-items: center; justify-content: space-between; gap: 32px 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: 26px; margin-bottom: 8px; }
.cta-band p { font-size: 16px; color: oklch(0.41 0.018 250); max-width: 560px; }
.note { font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--muted-2); margin-top: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips a { display: block; padding: 10px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14.5px var(--font-head); }
.chips a:hover { border-color: var(--green-600); background: var(--hover); color: var(--ink); }

/* ---------- Quiénes somos ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.prose p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin-bottom: 20px; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.values > div { border-top: 2px solid var(--navy-label); padding-top: 14px; }
.values h2 { font-size: 17px; margin-bottom: 6px; }
.values p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 34px; }
.panel h2 { font-size: 26px; margin-bottom: 6px; }
.panel blockquote { margin: 22px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.65; color: oklch(0.41 0.018 250); }

/* ---------- Contacto ---------- */
.brand-hero .wrap { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.brand-hero .logo-badge { width: 120px; height: 120px; }
.brand-hero .logo-badge img { width: 92px; height: 92px; }
.brand-hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: 0.01em; margin-bottom: 12px; }
address { font-style: normal; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.map { width: 100%; height: 440px; border: 1px solid var(--line); display: block; }

/* ---------- Fotos de la oficina ---------- */
.titulo-seccion { font-size: 30px; margin-bottom: 24px; }
.foto { margin: 0; }
.foto img { width: 100%; object-fit: cover; }
.foto figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.galeria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.galeria img { height: 520px; }
.ubicacion { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ubicacion .foto img { height: 440px; object-position: center 40%; }

/* ---------- Formulario ---------- */
.form { background: var(--surface); border: 1px solid var(--line); padding: clamp(22px, 4vw, 34px); display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: oklch(0.35 0.022 250); }
.field input, .field select, .field textarea {
  font: 400 15px var(--font-body); color: var(--ink);
  padding: 13px 14px; border: 1px solid oklch(0.85 0.008 150); border-radius: 2px; background: oklch(0.99 0.003 150);
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px oklch(0.49 0.10 136 / 0.2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 4px; accent-color: var(--navy); }
.form .note { margin: 0; font-size: 11px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--green-900); color: var(--on-green); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-block: 56px 28px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .logo-badge { width: 38px; height: 38px; }
.footer-brand .logo-badge img { width: 30px; height: 30px; }
.footer-brand strong { font-family: var(--font-head); font-size: 18px; letter-spacing: 0.02em; color: oklch(0.97 0.007 250); }
.site-footer p { font-size: 14.5px; line-height: 1.65; max-width: 360px; color: var(--on-green); }
.footer-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-green); margin: 0 0 14px; }
.footer-links { display: grid; gap: 9px; font-size: 14.5px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--on-green); }
.site-footer a:hover { color: var(--on-green); text-decoration: underline; }
.footer-bottom { border-top: 1px solid oklch(0.62 0.10 136); padding-block: 18px 40px; display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; color: var(--on-green); }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .intro, .split, .row { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .row { padding-block: 40px; }
  .row:nth-child(even) .media { order: 0; }
  .media { height: 260px; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .ubicacion { grid-template-columns: minmax(0, 1fr); }
  .galeria img { height: 380px; }
}
@media (max-width: 600px) {
  .cols-2, .cols-3, .cols-4, .values, .form-row, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .row h2 { font-size: 24px; }
  .cover { padding: 24px; }
  .map { height: 320px; }
  .galeria { grid-template-columns: minmax(0, 1fr); }
  .ubicacion .foto img { height: 380px; }
}

@media print {
  .site-header, .site-footer, .hero-dots, .cta-band { display: none; }
  .slide:not(:first-child) { display: none; }
}

/* ---------- Utilidades ---------- */
dl.grid-lines { margin: 0; }
.stat dd { margin: 0; }
.mt-40 { margin-top: 40px; }
.footer-contact { margin-top: 18px; font-size: 14.5px; }
.prose h2 { font-size: 22px; margin: 32px 0 12px; }
