/* ==========================================================
   TopoMoquegua — estilos
   Azul oscuro (#0B2545) para estructura, naranja (#F28C28)
   solo para botones y acentos. Diseño mobile-first.
   ========================================================== */

:root {
  --navy: #0b2545;
  --navy-soft: #1a3d6e;
  --navy-fg: #f7f9fc;
  --navy-muted: #b4c3d6;
  --cta: #f28c28;
  --cta-hover: #e0761a;
  --cta-fg: #0b2545;
  --surface: #f3f5f9;
  --bg: #fcfdfe;
  --fg: #0b2545;
  --card: #ffffff;
  --muted: #56627a;
  --border: #e1e5ec;
  --input: #cfd5df;
  --accent: #fdeedd;
  --whatsapp: #2fbf68;
  --whatsapp-fg: #08291a;
  --error: #c53030;

  --radius: 0.75rem;
  --shadow-card: 0 1px 2px rgba(11, 37, 69, 0.06), 0 8px 24px -12px rgba(11, 37, 69, 0.18);
  --shadow-cta: 0 10px 24px -10px rgba(242, 140, 40, 0.7);
  --shadow-float: 0 12px 28px -8px rgba(8, 41, 26, 0.45);

  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo", "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 48rem; }

/* Iconos SVG */
.ico { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: currentColor; }
.ico-lg { width: 1.75rem; height: 1.75rem; }
.ico-xl { width: 2.25rem; height: 2.25rem; }
.text-cta { color: var(--cta); }
.text-cta-dark { color: var(--cta-hover); }
.text-whatsapp { color: var(--whatsapp); }

.skip-link {
  position: absolute; left: -9999px; top: 1rem; z-index: 100;
  background: var(--cta); color: var(--cta-fg); padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 0; border-radius: 0.6rem; cursor: pointer; white-space: nowrap;
  font-weight: 700; transition: background-color .15s, transform .15s;
}
.btn-cta { background: var(--cta); color: var(--cta-fg); box-shadow: var(--shadow-cta); }
.btn-cta:hover { background: var(--cta-hover); }
.btn-cta:active { transform: translateY(1px); }
.btn-sm { height: 2.5rem; padding: 0 0.75rem; font-size: 0.875rem; }
.btn-lg { height: 2.75rem; padding: 0 1.5rem; font-size: 0.95rem; }
.btn-xl { height: 3.5rem; padding: 0 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-xl .ico-fill { width: 1.5rem; height: 1.5rem; }

.show-mobile { display: inline; }
.hide-mobile { display: none; }

/* ---------- Fondos ---------- */
.bg-navy { background-color: var(--navy); color: var(--navy-fg); }
.bg-surface { background: var(--surface); }
.survey-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.blueprint {
  background-color: var(--surface);
  background-image:
    linear-gradient(rgba(11,37,69,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,37,69,.07) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--navy-fg); }
.brand-mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; background: var(--cta); color: var(--cta-fg); }
.brand-name { font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-top: 4rem; }
.contours {
  position: absolute; z-index: -1; pointer-events: none;
  width: 560px; height: 560px; right: -10rem; top: -6rem; color: rgba(255,255,255,.1);
}
.contour-anim { stroke-dasharray: 6 10; animation: contour-drift 40s linear infinite; }
@keyframes contour-drift { to { stroke-dashoffset: -400; } }

.hero-grid { display: grid; gap: 3rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.coords { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.18em; color: var(--navy-muted); }
.hero h1 { margin-top: 1rem; font-size: 2.25rem; font-weight: 900; line-height: 1.05; }
.hero-sub { margin-top: 1.25rem; max-width: 36rem; font-size: 1.125rem; color: var(--navy-muted); }
.hero-actions { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.hero-actions .btn { width: 100%; }
.link-light { text-align: center; font-size: 0.875rem; font-weight: 600; text-underline-offset: 4px; }
.link-light:hover { text-decoration: underline; }
.hero-badges { margin-top: 2.5rem; display: grid; gap: 0.75rem; font-size: 0.875rem; color: var(--navy-muted); }
.hero-badges li { display: flex; align-items: center; gap: 0.5rem; }

.plan-preview {
  display: none; width: 100%; max-width: 28rem; margin: 0 auto; padding: 1.25rem;
  border: 1px solid rgba(255,255,255,.15); border-radius: 1rem;
  background: rgba(26, 61, 110, .4); box-shadow: 0 25px 50px -12px rgba(0,0,0,.4);
}
.plan-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--navy-muted); }
.plan-preview > svg { width: 100%; margin-top: 0.75rem; }
.plan-grid { stroke: rgba(247,249,252,.15); }
.plan-lot { fill: rgba(242,140,40,.15); stroke: var(--cta); }
.plan-vertex circle { fill: var(--navy); stroke: var(--cta); }
.plan-vertex text { fill: var(--navy-fg); font-family: var(--font-mono); font-size: 11px; }
.plan-area { fill: var(--navy-fg); font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.plan-perim { fill: var(--navy-muted); font-family: var(--font-mono); font-size: 9px; }
.plan-preview figcaption { margin-top: 0.75rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--navy-muted); }

/* ---------- Secciones ---------- */
.section { padding: 4rem 0; }
.heading { max-width: 42rem; }
.heading.center { margin: 0 auto; text-align: center; }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cta-hover); }
.bg-navy .eyebrow { color: var(--cta); }
.heading h2, .h2-light { margin-top: 0.75rem; font-size: 1.875rem; font-weight: 800; line-height: 1.15; }
.lead { margin-top: 0.75rem; color: var(--muted); font-size: 1rem; }

.grid { margin-top: 2.5rem; display: grid; gap: 1rem; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--shadow-card); }
.card h3 { margin-top: 1rem; font-size: 1.05rem; font-weight: 700; }
.card p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.card-lift { transition: transform .2s; }
.card-lift:hover { transform: translateY(-2px); }
.card-lift h3 { margin-top: 1.25rem; font-size: 1.125rem; }
.icon-box { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 0.75rem; background: var(--navy); color: var(--cta); }
.icon-box .ico { width: 1.5rem; height: 1.5rem; }

/* Paquetes */
.grid-packages { gap: 1.25rem; }
.package {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--shadow-card);
}
.package h3 { font-size: 1.25rem; font-weight: 800; }
.package-detail { font-size: 0.875rem; color: var(--muted); }
.price { margin-top: 1.25rem; display: flex; align-items: baseline; gap: 0.5rem; }
.price span { font-size: 0.875rem; color: var(--muted); }
.price strong { font-family: var(--font-display); font-size: 2.25rem; font-weight: 900; }
.features { margin-top: 1.25rem; flex: 1; display: grid; gap: 0.625rem; align-content: start; font-size: 0.875rem; }
.features li { display: flex; gap: 0.5rem; }
.features .ico { width: 1rem; height: 1rem; margin-top: 0.15rem; }
.package .btn { margin-top: 1.5rem; }
.package-featured { background: var(--navy); color: var(--navy-fg); border: 2px solid var(--cta); }
.package-featured .package-detail, .package-featured .price span { color: var(--navy-muted); }
.badge {
  position: absolute; top: -0.75rem; left: 1.5rem;
  background: var(--cta); color: var(--cta-fg); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700;
}
.note-center { margin-top: 1.5rem; text-align: center; font-size: 0.875rem; color: var(--muted); }
.note-left { margin-top: 2rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted); }
.note-left .ico { width: 1rem; height: 1rem; }

/* Proceso */
.step { border: 1px solid rgba(247,249,252,.15); border-radius: 1rem; padding: 1.5rem; background: rgba(26,61,110,.4); }
.step-top { display: flex; align-items: center; justify-content: space-between; color: var(--navy-muted); }
.step-top .ico { width: 1.5rem; height: 1.5rem; }
.step-num { font-family: var(--font-mono); font-size: 1.875rem; font-weight: 700; color: var(--cta); }
.step h3 { margin-top: 1rem; font-size: 1.125rem; font-weight: 700; }
.step p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--navy-muted); }

/* Entrega */
.two-col { display: grid; gap: 2.5rem; }
.deliverables { display: grid; gap: 0.75rem; }
.card.row { display: flex; gap: 1rem; padding: 1.25rem; }
.card.row h3 { margin-top: 0; font-size: 1rem; }
.card.row p { margin-top: 0.25rem; }
.check-circle { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: 999px; background: var(--accent); color: var(--cta-hover); }

/* Galería */
.gallery-item { overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow-card); }
.gallery-item img, .placeholder { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--muted); }
.placeholder span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.gallery-item figcaption { padding: 0.75rem 1rem; font-size: 0.875rem; font-weight: 600; }

/* Formulario */
.info-box { display: none; margin-top: 2rem; align-items: center; gap: 1rem; padding: 1.25rem; border-radius: 1rem; background: var(--navy); }
.info-box p { font-size: 0.875rem; color: var(--navy-muted); }
.form { display: grid; gap: 1rem; padding: 1.5rem; }
.field label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 600; }
.field input, .field select {
  width: 100%; height: 3rem; padding: 0 0.75rem; border: 1px solid var(--input); border-radius: 0.5rem;
  background: var(--card); font-size: 1rem; color: var(--fg);
}
.field input::placeholder { color: var(--muted); }
.field input:focus, .field select:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px rgba(242,140,40,.35); }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.form-error { font-size: 0.875rem; font-weight: 600; color: var(--error); }
.form-note { display: flex; align-items: center; justify-content: center; gap: 0.375rem; font-size: 0.75rem; color: var(--muted); }
.form-note .ico { width: 0.875rem; height: 0.875rem; }

/* Preguntas frecuentes */
.faq { margin-top: 2.5rem; padding: 0 1.25rem; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .chevron { width: 1rem; height: 1rem; color: var(--muted); transition: transform .2s; }
.faq details[open] .chevron { transform: rotate(180deg); }
.faq details p { padding-bottom: 1.25rem; margin-top: 0; font-size: 1rem; line-height: 1.65; color: var(--muted); }

/* Pie de página */
.site-footer { padding: 3.5rem 0 7rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.footer-brand .ico { width: 1.5rem; height: 1.5rem; }
.muted-light { margin-top: 0.5rem; font-size: 0.875rem; color: var(--navy-muted); }
.footer-list { display: grid; gap: 0.75rem; font-size: 0.875rem; align-content: start; }
.footer-list li { display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-list .ico { width: 1rem; height: 1rem; margin-top: 0.15rem; }
.footer-list a:hover { text-decoration: underline; }
.footer-list li > a { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-wa { font-weight: 600; }
.footer-wa .ico-fill { width: 1rem; height: 1rem; }
.copyright { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(247,249,252,.1); font-size: 0.75rem; color: var(--navy-muted); }

/* Botón flotante */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
  display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 999px;
  background: var(--whatsapp); color: var(--whatsapp-fg); box-shadow: var(--shadow-float);
  transition: transform .2s; isolation: isolate;
}
.wa-float:hover { transform: scale(1.05); }
.wa-float .ico-fill { width: 2rem; height: 2rem; }
.wa-ping { position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: var(--whatsapp); animation: ping-soft 2.4s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping-soft { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Tablet (640px+) ---------- */
@media (min-width: 640px) {
  .show-mobile { display: none; }
  .hide-mobile { display: inline; }
  .btn-sm { padding: 0 1rem; }
  .section { padding: 6rem 0; }
  .contours { right: -5rem; }
  .hero-grid { padding-top: 5rem; padding-bottom: 5rem; }
  .hero h1 { font-size: 3rem; }
  .hero-sub { font-size: 1.25rem; }
  .hero-actions { flex-direction: row; align-items: center; }
  .hero-actions .btn { width: auto; }
  .link-light { margin-left: 0.5rem; }
  .hero-badges { grid-template-columns: repeat(3, 1fr); }
  .plan-preview { display: block; }
  .heading h2, .h2-light { font-size: 2.25rem; }
  .lead { font-size: 1.125rem; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form { padding: 2rem; }
  .faq { padding: 0 1.5rem; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .grid-3.gallery, section[aria-labelledby="trabajos"] .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Escritorio (768px+ / 1024px+) ---------- */
@media (min-width: 768px) {
  .grid-packages { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .contours { right: 0; top: 0; width: 680px; height: 680px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; padding-top: 6rem; padding-bottom: 6rem; }
  .hero h1 { font-size: 3.75rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; align-items: center; }
  .two-col-top { align-items: start; }
  .info-box { display: flex; }
}

/* Menos movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .contour-anim, .wa-ping { animation: none; }
  .card-lift:hover, .wa-float:hover { transform: none; }
}
