/* ==========================================================================
   Reformas Atmos360 — hoja de estilos única
   Sin frameworks ni dependencias: carga en un solo archivo y se cachea.
   ========================================================================== */

:root {
  --ink:        #14181f;
  --ink-soft:   #4a5361;
  --ink-faint:  #8b95a3;
  --line:       #e2e5ea;
  --bg:         #ffffff;
  --bg-alt:     #f6f7f9;
  --brand:      #1b3a5c;
  --brand-dark: #0e2136;
  --accent:     #f2a03d;
  --accent-ink: #1a1206;
  --accent-dark:#d4842a;
  --ok:         #1f7a4d;
  --err:        #c0392b;
  --radius:     14px;
  --shadow:     0 1px 2px rgba(20,24,31,.06), 0 8px 24px rgba(20,24,31,.06);
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--brand); color: #fff; padding: 12px 20px; z-index: 999;
  border-radius: 0 0 8px 0; text-decoration: none; font-weight: 600;
}
.skip:focus { left: 0; top: 0; }

.wrap   { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; }
section { padding: 80px 0; }
.alt    { background: var(--bg-alt); }
@media (max-width: 640px) { section { padding: 56px 0; } }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 700; color: var(--accent-dark);
  margin-bottom: 12px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-note {
  max-width: 680px; margin: 32px auto 0; text-align: center;
  font-size: .97rem; color: var(--ink-soft);
}

/* --------------------------------------------------- Botones ------------ */
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; padding: 15px 30px; border-radius: 999px;
  text-decoration: none; border: 0; font-size: 1rem; font-family: inherit;
  cursor: pointer; text-align: center; line-height: 1.3;
  box-shadow: 0 6px 18px rgba(242,160,61,.35);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(242,160,61,.45); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-lg     { padding: 17px 34px; font-size: 1.06rem; }
.btn-sm     { padding: 11px 22px; font-size: .95rem; box-shadow: none; }
.btn-block  { display: block; width: 100%; }
.btn-ghost  {
  background: transparent; border: 2px solid rgba(255,255,255,.5);
  color: #fff; box-shadow: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.12); box-shadow: none; }

/* --------------------------------------------------- Cabecera ----------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px; max-width: 1120px; margin: 0 auto;
}
.logo {
  font-weight: 500; font-size: 1.15rem; letter-spacing: -.02em;
  color: var(--brand); text-decoration: none;
}
.logo strong { font-weight: 800; }
.nav-cta { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.tel { font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--ink); }
@media (max-width: 620px) { .tel { display: none; } }

/* --------------------------------------------------- Héroe -------------- */
.hero {
  background: linear-gradient(160deg, #122b45 0%, var(--brand) 55%, #25506f 100%);
  color: #fff; padding: 76px 0 90px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 78% 22%, rgba(242,160,61,.22), transparent 46%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px;
  align-items: center; position: relative; z-index: 1;
}
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.85); font-size: 1.2rem; max-width: 34ch; }
.hero .eyebrow { color: var(--accent); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 26px; }

.hero-card {
  background: #fff; color: var(--ink); border-radius: 18px; padding: 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.hero-card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.hero-card .small { font-size: .9rem; color: var(--ink-soft); margin-bottom: 18px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero .lead { max-width: none; }
}

/* Listas con marca de verificación */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; font-size: .98rem; }
.ticks li { position: relative; padding-left: 30px; color: rgba(255,255,255,.9); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 16px; height: 9px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks-dark li { color: var(--ink); }
.ticks-dark li::before { border-color: var(--ok); }
.ticks-dark { gap: 15px; }

/* --------------------------------------------------- Confianza ---------- */
.trust { background: var(--brand-dark); color: rgba(255,255,255,.72); padding: 24px 0; }
.trust-in {
  display: flex; justify-content: center; gap: 44px;
  flex-wrap: wrap; text-align: center;
}
.trust b {
  color: #fff; display: block; font-size: 1.45rem;
  font-weight: 800; letter-spacing: -.02em;
}
.trust span { font-size: .88rem; }

/* --------------------------------------------------- Rejillas ----------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px; }
.align-center { align-items: center; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 24px; }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card p { color: var(--ink-soft); margin: 0; }
.card ul { margin: .7em 0 0; padding-left: 1.15em; color: var(--ink-soft); font-size: .95rem; }
.card li { margin-bottom: .3em; }

/* --------------------------------------------------- Pasos -------------- */
.steps {
  list-style: none; counter-reset: s; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.steps li { position: relative; padding-top: 56px; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; top: 0; left: 0;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 1.1rem;
  display: grid; place-items: center;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: .97rem; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 22px; } }

/* --------------------------------------------------- Marcadores de foto - */
/* Provisional: se borra cuando lleguen las fotos reales.                   */
.ph {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #e8ebef 0 12px, #dfe3e9 12px 24px);
  border: 1px solid var(--line);
  display: grid; place-items: center; text-align: center;
  color: #7a838f; font-size: .85rem; font-weight: 700; padding: 16px;
}
.ph span { display: block; font-weight: 400; font-size: .78rem; margin-top: 6px; opacity: .85; }
.ph-hero { aspect-ratio: 16 / 11; margin-bottom: 20px; }
.ph-tall { aspect-ratio: 3 / 4; }

.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .gal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gal { grid-template-columns: 1fr; } }

/* --------------------------------------------------- Testimonios -------- */
.quote {
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 12px;
  padding: 26px; margin: 0;
}
.quote p { font-size: 1.02rem; margin-bottom: 14px; }
.quote footer { font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.stars { color: var(--accent-dark); letter-spacing: 2px; margin-bottom: 10px; }

/* --------------------------------------------------- Formulario --------- */
.form-section { background: linear-gradient(180deg, var(--bg-alt) 0%, #eceff3 100%); }
.form-box {
  background: #fff; border-radius: 20px; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(20,24,31,.1);
  padding: clamp(24px, 4vw, 48px);
  max-width: 820px; margin: 0 auto;
}

.gotcha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

fieldset { border: 0; padding: 0; margin: 0 0 30px; }
legend {
  font-weight: 800; font-size: 1.05rem; padding: 0; margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
legend i {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
  background: var(--brand); color: #fff;
  font-style: normal; font-size: .82rem; font-weight: 800;
  display: grid; place-items: center;
}
.fhelp { font-size: .9rem; color: var(--ink-soft); margin: 0 0 16px 36px; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .fgrid { grid-template-columns: 1fr; } }

.field { margin: 0; }
.field label, label.lbl {
  display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px;
}
.req { color: var(--err); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27,58,92,.12);
}
textarea { resize: vertical; min-height: 100px; }

/* Solo marcamos errores después del primer intento de envío, no mientras escribe. */
.validado :invalid { border-color: var(--err); }
.validado :invalid:focus { box-shadow: 0 0 0 3px rgba(192,57,43,.15); }

/* Opciones tipo botón, más cómodas en móvil que las casillas nativas */
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .opts { grid-template-columns: 1fr 1fr; } }

.opt { position: relative; display: block; }
.opt input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.opt span {
  display: block; padding: 13px 12px; text-align: center;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: .94rem; font-weight: 600; cursor: pointer;
  background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
}
.opt span:hover { border-color: #c3cad4; }
.opt input:checked + span {
  border-color: var(--brand); background: rgba(27,58,92,.06);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .88rem; color: var(--ink-soft);
  background: var(--bg-alt); padding: 16px; border-radius: 10px;
  border: 1px solid var(--line);
}
.consent input { margin: 3px 0 0; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--brand); }
.consent label { font-weight: 400; margin: 0; }

.cf-turnstile { margin: 18px 0 0; }

.submit-row { margin-top: 26px; text-align: center; }
.submit-row .btn { max-width: 420px; margin: 0 auto; }
.assure { font-size: .85rem; color: var(--ink-soft); margin: 14px 0 0; }

.form-msg { margin: 12px 0 0; font-size: .95rem; font-weight: 600; min-height: 1.4em; }
.form-msg.err { color: var(--err); }
.form-msg.ok  { color: var(--ok); }

/* --------------------------------------------------- FAQ ---------------- */
details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 12px;
}
details[open] { border-color: #c3cad4; }
summary { font-weight: 700; cursor: pointer; font-size: 1.02rem; }
summary::marker { color: var(--accent-dark); }
details p { margin: 12px 0 0; color: var(--ink-soft); }

/* --------------------------------------------------- Cierre y pie ------- */
.final { background: var(--brand); color: #fff; text-align: center; }
.final h2 { color: #fff; }
.final p { color: rgba(255,255,255,.85); font-size: 1.1rem; }
.final-tel { font-size: .95rem; }
.final-tel a { color: #fff; }

footer {
  background: var(--brand-dark); color: rgba(255,255,255,.6);
  font-size: .9rem; padding: 40px 0;
}
.foot-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer strong { color: #fff; }
footer a { color: rgba(255,255,255,.8); }
footer nav { text-align: right; }
@media (max-width: 640px) { footer nav { text-align: left; } }

/* --------------------------------------------------- Páginas legales ---- */
.legal { max-width: 800px; margin: 0 auto; padding: 56px 24px 80px; }
.legal .volver { display: inline-block; margin-bottom: 28px; font-size: .95rem; text-decoration: none; }
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 8px; }
.legal .actualizado { color: var(--ink-faint); font-size: .9rem; margin-bottom: 40px; }
.legal h2 {
  font-size: 1.25rem; margin: 40px 0 12px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1.02rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); font-size: .98rem; line-height: 1.7; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: .45em; }
.legal a { text-decoration: underline; }

/* Ficha de identificación del responsable: tamaño de texto legal normal. */
.legal .ficha {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px 24px; margin: 0 0 1.4em;
}
.legal .ficha dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.legal .ficha dt { font-weight: 700; color: var(--ink); font-size: .93rem; }
.legal .ficha dd { margin: 0; color: var(--ink-soft); font-size: .93rem; }
@media (max-width: 520px) {
  .legal .ficha dl { grid-template-columns: 1fr; gap: 2px; }
  .legal .ficha dd { margin-bottom: 10px; }
}

.legal .tabla { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .92rem; }
.legal .tabla th, .legal .tabla td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal .tabla th { font-weight: 700; color: var(--ink); background: var(--bg-alt); }
.legal .tabla td { color: var(--ink-soft); }

/* --------------------------------------------------- WhatsApp ----------- */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .15s;
}
.wa:hover { transform: scale(1.06); }
.wa[hidden] { display: none; }
