/* Guía Sísmica EnPíxeles — sistema de diseño premium (vanilla, offline-first).
   Espectacular pero ligero: gradientes, profundidad por capas, glow de color,
   micro-interacciones. Sin frameworks. Modo claro y oscuro. */

:root {
  --bg: #eef0f4;
  --bg-2: #f7f8fa;
  --card: #ffffff;
  --text: #0b0b0f;
  --text-2: #5b5e66;
  --text-3: #9a9da6;
  --line: rgba(0,0,0,0.07);
  --line-2: rgba(0,0,0,0.05);

  --red-1: #ff453a; --red-2: #ff2d55;
  --orange-1: #ff9f0a; --orange-2: #ff6a00;
  --blue-1: #0a84ff; --blue-2: #0a40dd;
  --green-1: #30d158; --green-2: #1ea64a;
  --teal-1: #40c8e0; --teal-2: #279fc4;
  --purple-1: #bf5af2; --purple-2: #7b1fa2;

  --grad-red: linear-gradient(135deg, var(--red-1), var(--red-2));
  --grad-orange: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  --grad-blue: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  --grad-green: linear-gradient(135deg, var(--green-1), var(--green-2));
  --grad-teal: linear-gradient(135deg, var(--teal-1), var(--teal-2));
  --grad-purple: linear-gradient(135deg, var(--purple-1), var(--purple-2));

  --radius: 20px;
  --radius-sm: 14px;
  --max: 600px;
  --sh-1: 0 1px 2px rgba(16,18,28,0.06), 0 6px 16px rgba(16,18,28,0.06);
  --sh-2: 0 2px 6px rgba(16,18,28,0.08), 0 16px 40px rgba(16,18,28,0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08080b;
    --bg-2: #111114;
    --card: #16161b;
    --text: #f6f7f9;
    --text-2: #a7abb4;
    --text-3: #74777f;
    --line: rgba(255,255,255,0.09);
    --line-2: rgba(255,255,255,0.06);
    --sh-1: 0 1px 2px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
    --sh-2: 0 2px 8px rgba(0,0,0,0.55), 0 20px 50px rgba(0,0,0,0.55);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.47;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(255,69,58,0.10), transparent 60%),
    radial-gradient(900px 480px at 100% 4%, rgba(10,132,255,0.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 18px 60px; }
a { color: var(--blue-1); text-decoration: none; }
svg.ic { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---- Top bar (vidrio) ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 0.5px solid var(--line);
}
.topbar .inner { max-width: var(--max); margin: 0 auto; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; }
.topbar .brand { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.topbar .loc { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- Hero ---- */
.hero { padding: 40px 0 22px; position: relative; }
.hero h1 {
  font-size: 37px; line-height: 1.05; font-weight: 760; letter-spacing: -0.03em; margin: 0 0 12px;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 62%, var(--text-2)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--text-2); margin: 0; font-weight: 450; }

/* ---- Botón 911 ---- */
.call911 {
  position: relative; display: flex; align-items: center; gap: 15px;
  background: var(--grad-red); color: #fff;
  border-radius: var(--radius); padding: 18px 20px; margin: 10px 0 28px;
  box-shadow: 0 10px 28px rgba(255,45,85,0.38), inset 0 1px 0 rgba(255,255,255,0.25);
  overflow: hidden; transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.call911:active { transform: scale(0.982); box-shadow: 0 6px 18px rgba(255,45,85,0.34); }
.call911 .ring {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.call911 .ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55); animation: pulso 2s ease-out infinite;
}
@keyframes pulso { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.7); opacity: 0; } }
.call911 .ring svg.ic { width: 25px; height: 25px; stroke-width: 2.1; }
.call911 .t { flex: 1; }
.call911 .t b { display: block; font-size: 19px; font-weight: 680; letter-spacing: -0.01em; }
.call911 .t span { font-size: 13px; opacity: 0.95; }
.call911 .chev { opacity: 0.85; }

/* ---- Grid de acciones ---- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 30px; }
.tile {
  position: relative; background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--sh-1); border: 0.5px solid var(--line);
  display: flex; flex-direction: column; gap: 13px; min-height: 122px; color: var(--text);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.tile:active { transform: scale(0.97); box-shadow: var(--sh-2); }
.tile .badge {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.tile .badge svg.ic { width: 24px; height: 24px; stroke-width: 2; }
.tile b { font-size: 16px; font-weight: 640; letter-spacing: -0.01em; line-height: 1.22; }

.bg-red { background: var(--grad-red); }
.bg-orange { background: var(--grad-orange); }
.bg-blue { background: var(--grad-blue); }
.bg-green { background: var(--grad-green); }
.bg-teal { background: var(--grad-teal); }
.bg-purple { background: var(--grad-purple); }

/* ---- Secciones ---- */
.section { margin: 36px 0; scroll-margin-top: 74px; }
.section > h2 {
  font-size: 23px; font-weight: 760; letter-spacing: -0.022em; line-height: 1.15;
  color: var(--text); margin: 0 0 16px; padding-left: 15px; position: relative;
}
.section > h2::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px;
  border-radius: 4px; background: var(--grad-red);
}

/* ---- Lista (iOS settings) ---- */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--sh-1); border: 0.5px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-bottom: 0.5px solid var(--line-2); color: var(--text); transition: background 0.12s ease; }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--line-2); }
.row .sq { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.16); }
.row .sq svg.ic { width: 20px; height: 20px; stroke-width: 2; }
.row .m { flex: 1; min-width: 0; }
.row .m b { display: block; font-size: 16px; font-weight: 560; letter-spacing: -0.01em; }
.row .m span { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.row .chev { color: var(--text-3); flex: 0 0 auto; }
.row .chev svg.ic { width: 18px; height: 18px; stroke-width: 2.4; }

/* ---- Pasos ---- */
.steps { background: var(--card); border-radius: var(--radius); box-shadow: var(--sh-1); border: 0.5px solid var(--line); overflow: hidden; }
.step { display: flex; gap: 14px; padding: 16px; border-bottom: 0.5px solid var(--line-2); }
.step:last-child { border-bottom: 0; }
.step .n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--bg-2); color: var(--text); font-weight: 680; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.step.warn .n { background: var(--grad-red); color: #fff; box-shadow: 0 4px 12px rgba(255,45,85,0.4); }
.step .c b { display: block; font-size: 16px; font-weight: 640; letter-spacing: -0.01em; margin-bottom: 2px; }
.step .c span { font-size: 15px; color: var(--text-2); }

/* ---- Card ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--sh-1); border: 0.5px solid var(--line); padding: 18px; }
.card .lead { color: var(--text-2); font-size: 15px; margin: 0 0 14px; }

/* ---- Botones ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; border-radius: 15px; border: none;
  font-size: 17px; font-weight: 640; font-family: inherit; cursor: pointer;
  background: var(--grad-blue); color: #fff;
  box-shadow: 0 8px 22px rgba(10,64,221,0.30), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}
.btn:active { transform: scale(0.985); opacity: 0.94; }
.btn.green { background: var(--grad-green); box-shadow: 0 8px 22px rgba(30,166,74,0.30), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn.gray {
  background: var(--bg-2); color: var(--text); border: 0.5px solid var(--line);
  box-shadow: var(--sh-1); font-weight: 600;
}

/* ---- Nota ---- */
.note {
  display: flex; gap: 11px; align-items: flex-start;
  background: color-mix(in srgb, var(--orange-1) 13%, var(--card));
  border: 0.5px solid color-mix(in srgb, var(--orange-1) 28%, transparent);
  border-radius: var(--radius-sm); padding: 13px 15px; margin: 18px 0;
  font-size: 13.5px; color: var(--text-2); line-height: 1.45;
}
.note svg.ic { width: 19px; height: 19px; color: var(--orange-1); flex: 0 0 auto; margin-top: 1px; }
.note b { color: var(--text); font-weight: 640; }

/* ---- Footer ---- */
footer { margin-top: 38px; text-align: center; color: var(--text-3); font-size: 12px; line-height: 1.55; }

/* ---- Formularios ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 640; margin: 0 0 7px; padding: 0 2px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--card); border: 0.5px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 14px; font-size: 16px; font-family: inherit; min-height: 50px; box-shadow: var(--sh-1);
}
.field textarea { min-height: 96px; resize: vertical; }
.checkrow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 0.5px solid var(--line-2); }
.checkrow:last-child { border-bottom: 0; }
.checkrow input { width: 24px; height: 24px; min-height: 24px; flex: 0 0 auto; accent-color: var(--blue-1); }
.checkrow label { font-size: 16px; font-weight: 400; margin: 0; }
.backlink { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; color: var(--blue-1); margin: 18px 0; font-weight: 560; }
.backlink svg.ic { width: 20px; height: 20px; }

/* ---- Compartir en redes ---- */
svg.brand { fill: currentColor; stroke: none; width: 20px; height: 20px; display: block; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sharebtn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; border-radius: 15px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 620; font-family: inherit; color: #fff;
  text-decoration: none; box-shadow: var(--sh-1);
  transition: transform 0.14s ease, opacity 0.14s ease;
}
.sharebtn:active { transform: scale(0.97); opacity: 0.92; }
.sharebtn.wa { background: #25d366; }
.sharebtn.fb { background: #1877f2; }
.sharebtn.tg { background: #229ed9; }
.sharebtn.x  { background: #16181c; }
.sharebtn.link { background: var(--bg-2); color: var(--text); border: 0.5px solid var(--line); box-shadow: var(--sh-1); }
