/* ============================================================
   Grupo CRUGAL — estilos del sitio
   Mobile-first. Tema claro: fondo blanco, grafito y amarillo vibrante.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --surface: #ffffff;
  --line: #e3e6eb;
  --text: #14181d;
  --text-2: #4a5361;
  --text-3: #7a8391;
  --gold: #ffb400;            /* amarillo vibrante: botones, acentos */
  --gold-2: #ffc21a;          /* hover */
  --gold-text: #9c6a00;       /* amarillo oscuro legible sobre blanco */
  --gold-dim: rgba(255, 180, 0, 0.12);
  --dark: #14181d;            /* hero y bloques oscuros */
  --wa: #25d366;
  --wa-dark: #1ebe5b;
  --danger: #d93025;
  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1180px;
  --gutter: 16px;
  --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 10px 30px rgba(20, 24, 29, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  padding-bottom: 72px; /* espacio para la barra móvil */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); line-height: 1.05; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.max-w { max-width: 62ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Tipografía ---------- */
.kicker {
  color: var(--gold-text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.h-xl { font-size: clamp(2rem, 6.5vw, 3.25rem); font-weight: 800; margin-bottom: 14px; }
.body-lg { font-size: 1.08rem; color: var(--text-2); }
.note { font-size: 0.9rem; color: var(--text-3); border-left: 3px solid var(--gold); padding-left: 12px; margin-top: 20px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em;
  text-transform: uppercase; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; border-color: rgba(20,24,29,.3); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-text); }
.hero .btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.hero .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-wa { background: var(--wa); color: #06220f; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-sm { padding: 9px 14px; font-size: 0.95rem; }
.btn-lg { padding: 16px 26px; font-size: 1.15rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.cta-row.center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-iso { width: 72px; height: auto; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; letter-spacing: 0.08em; color: var(--text); }
.brand-text small { font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); margin-top: 3px; }
.nav { display: none; gap: 22px; font-weight: 500; color: var(--text-2); }
.nav a:hover { color: var(--gold-text); }
.site-header .btn-wa { display: none; }

/* ---------- Hero (se mantiene oscuro sobre la foto) ---------- */
.hero { position: relative; min-height: 86svh; display: flex; align-items: flex-end; isolation: isolate; color: #fff; background: var(--dark); }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,24,29,.2) 0%, rgba(20,24,29,.7) 40%, rgba(20,24,29,.97) 100%);
}
.hero .kicker { color: var(--gold); }
.hero-content { padding-top: 120px; padding-bottom: 36px; }
.hero h1 { font-size: clamp(2.5rem, 9vw, 4.6rem); font-weight: 800; text-transform: uppercase; line-height: 0.95; max-width: 14ch; }
.hero .lead { margin-top: 16px; font-size: 1.1rem; color: rgba(255,255,255,.82); max-width: 56ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-tags li {
  font-size: 0.82rem; letter-spacing: 0.04em; color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px; background: rgba(0,0,0,.35);
}

/* ---------- Pilares ---------- */
.pillars { background: var(--bg); border-bottom: 1px solid var(--line); }
.pillars-grid { display: grid; grid-template-columns: 1fr; }
.pillar { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; }
.pillar:last-child { border-bottom: 0; }
.pillar-num { grid-row: span 2; font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--gold); line-height: 1; }
.pillar h2 { font-size: 1.35rem; text-transform: uppercase; }
.pillar p { margin: 4px 0 0; color: var(--text-2); font-size: 0.95rem; }
.pillar:hover h2 { color: var(--gold-text); }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--bg); }
.two-col { display: grid; grid-template-columns: 1fr; gap: 32px; }
.media-col { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.media-col img { width: 100%; height: 100%; object-fit: cover; }

.feature-list { display: grid; gap: 18px; }
.feature-list li { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(20,24,29,.04); }
.feature-list h3 { font-size: 1.25rem; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.feature-list h3::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--gold); margin-right: 8px; transform: translateY(-1px); }
.feature-list p { margin: 0; color: var(--text-2); font-size: 0.97rem; }
.feature-list.compact li { padding: 14px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.feature-list.compact { gap: 0; margin-top: 10px; }

.value { margin: 26px 0 0; padding: 18px 20px; background: var(--gold-dim); border: 1px solid rgba(255,180,0,.45); border-radius: var(--radius); color: var(--text); }
.value strong { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-text); font-size: 0.9rem; margin-bottom: 6px; }

.cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
.card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; box-shadow: 0 2px 10px rgba(20,24,29,.04); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
.card h3 { font-size: 1.3rem; text-transform: uppercase; margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-2); }

.photo-strip { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 26px; }
.photo-strip figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-2); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }

.inline-cta { margin-top: 30px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); display: grid; gap: 14px; }
.inline-cta p { margin: 0; color: var(--text-2); }

/* ---------- Cotizador ---------- */
.quote { background: radial-gradient(1200px 600px at 80% -10%, rgba(255,180,0,.16), transparent 60%), var(--bg); scroll-margin-top: 64px; }
.quote-form { margin-top: 30px; display: grid; gap: 18px; }
.quote-form fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 10px; background: var(--surface); margin: 0; min-width: 0; box-shadow: var(--shadow); }
.quote-form legend { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-text); padding: 0 8px; font-size: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.quote-form label { display: block; font-size: 0.92rem; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }
.req { color: var(--gold-text); }
.quote-form input, .quote-form select, .quote-form textarea {
  width: 100%; margin-top: 6px; background: var(--bg); border: 1px solid #cfd4db; border-radius: var(--radius);
  padding: 13px 14px; color: var(--text); font-size: 16px; /* 16px evita el zoom en iOS */
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.quote-form textarea { resize: vertical; min-height: 84px; }
.quote-form input::placeholder, .quote-form textarea::placeholder { color: #9aa3ae; }
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.quote-form input[aria-invalid="true"] { border-color: var(--danger); }
.quote-form select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.quote-form input[type="date"] { min-height: 50px; }

.choices { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 8px; }
.choice { position: relative; display: block; cursor: pointer; margin: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid #cfd4db; border-radius: var(--radius); background: var(--bg); transition: border-color .15s ease, background .15s ease; }
.choice strong { font-family: var(--font-head); font-size: 1.15rem; text-transform: uppercase; color: var(--text); }
.choice small { color: var(--text-3); font-size: 0.85rem; }
.choice input:checked + span { border-color: var(--gold); background: var(--gold-dim); box-shadow: inset 0 0 0 1px var(--gold); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--gold); }
.consent input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 3px; }
.consent a { color: var(--gold-text); text-decoration: underline; }
.form-error { color: var(--danger); font-weight: 500; margin: 0; }
.form-actions { display: grid; gap: 10px; justify-items: start; }
.form-actions .btn { width: 100%; }
.form-help { font-size: 0.88rem; color: var(--text-3); margin: 0; }
.quote-done { margin-top: 30px; padding: 24px 20px; background: var(--surface); border: 2px solid var(--gold); border-radius: var(--radius-lg); box-shadow: var(--shadow); scroll-margin-top: 80px; }
.quote-done-head h3 { font-size: 2rem; text-transform: uppercase; margin-bottom: 8px; }
.quote-done-head p { color: var(--text-2); }
.done-link { margin: 0 0 6px; font-size: 0.95rem; word-break: break-all; }
.done-link a { color: var(--gold-text); text-decoration: underline; }
.done-steps { display: grid; gap: 16px; margin-top: 10px; }
.done-steps li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px; background: var(--bg-2); border-radius: var(--radius); }
.done-steps li > span { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--dark); font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; }
.done-steps strong { display: block; font-family: var(--font-head); font-size: 1.25rem; text-transform: uppercase; margin-bottom: 10px; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.done-actions .btn { flex: 1 1 200px; }
.done-steps .form-help { margin-top: 10px; }
.link-btn { margin-top: 18px; background: none; border: 0; padding: 0; color: var(--text-3); text-decoration: underline; cursor: pointer; font-size: 0.92rem; }
.link-btn:hover { color: var(--gold-text); }
.btn[disabled] { opacity: .6; cursor: wait; }

.quote-details { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; background: var(--bg-2); }
.quote-details summary { padding: 14px 0; cursor: pointer; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-text); }
.quote-details p { color: var(--text-2); padding-bottom: 14px; margin: 0; }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 30px; }
.steps li { position: relative; padding: 22px 20px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 10px rgba(20,24,29,.04); }
.steps span { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.steps h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 16px; box-shadow: 0 2px 10px rgba(20,24,29,.04); }
.faq summary { padding: 16px 0; cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-text); line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--text-2); margin: 0; padding-bottom: 16px; }

/* ---------- CTA final / footer ---------- */
.final-cta { text-align: center; background: var(--bg-2); border-top: 1px solid var(--line); }
.final-logo { width: min(420px, 85%); margin: 0 auto 28px; }
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 40px 0 24px; color: var(--text-2); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer-grid strong { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 8px; }
.footer-grid p { margin: 0; line-height: 1.8; }
.footer-grid a:hover { color: var(--gold-text); }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--text-3); }
.legal p { margin: 0 0 6px; }

/* ---------- Páginas legales ---------- */
.page-legal { padding-bottom: 0; }
.legal-page { padding: 48px 0 72px; }
.legal-page .wrap { max-width: 800px; }
.legal-page h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 800; margin-bottom: 8px; }
.legal-meta { color: var(--text-3); font-size: 0.92rem; margin-bottom: 32px; }
.legal-page section { margin-bottom: 28px; }
.legal-page h2 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: 10px; padding-top: 8px; }
.legal-page p, .legal-page li { color: var(--text-2); font-size: 1.02rem; }
.legal-page ul, .legal-page ol { padding-left: 22px; margin-bottom: 1em; display: grid; gap: 8px; }
.legal-page ul { list-style: disc; }
.legal-page ol { list-style: decimal; }
.legal-page a { color: var(--gold-text); text-decoration: underline; }
.legal-page strong { color: var(--text); }
.pending-data { background: var(--gold-dim); border: 1px dashed var(--gold); padding: 1px 6px; border-radius: 4px; color: var(--text); }
.legal-back { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.site-footer .legal a { text-decoration: underline; }

/* ---------- Barra fija móvil ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(20,24,29,.08);
}

/* ============================================================
   Tablet y escritorio
   ============================================================ */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .choices { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .form-actions .btn { width: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .inline-cta { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .nav { display: flex; }
  .site-header .btn-wa { display: inline-flex; }
  .header-inner { height: 72px; }
  .brand-iso { width: 84px; }
  .hero { min-height: 92svh; align-items: center; }
  .hero-content { padding-top: 90px; padding-bottom: 90px; }
  .hero::after { background: linear-gradient(90deg, rgba(20,24,29,.92) 0%, rgba(20,24,29,.72) 45%, rgba(20,24,29,.2) 100%); }
  .section { padding: 96px 0; }
  .two-col { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
  .two-col-media { align-items: stretch; }
  .two-col-media.reverse { grid-template-columns: 1fr 1.1fr; }
  .feature-list { grid-template-columns: 1fr 1fr; }
  .feature-list.compact { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
  .pillar { padding: 28px 24px; border-bottom: 0; border-right: 1px solid var(--line); }
  .pillar:first-child { padding-left: 0; }
  .pillar:last-child { border-right: 0; }
  .quote-form { grid-template-columns: 1fr; max-width: 980px; }
  .faq-wrap { max-width: 860px; }
}
