:root {
  --ink: #0b1f3a;
  --ink-2: #33475f;
  --muted: #5d6f84;
  --bg: #fbfaf7;
  --bg-alt: #f1f4f5;
  --card: #ffffff;
  --line: #e2e7ea;
  --teal: #13a89a;
  --teal-strong: #0d8a7e;
  --teal-soft: #e3f5f2;
  --red: #ff3b40;
  --red-soft: #ffe9ea;
  --amber: #b76e00;
  --amber-soft: #fff3dc;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .05), 0 12px 32px -12px rgba(11, 31, 58, .14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, .85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; color: var(--ink); }
.logo-mark { width: 28px; height: 28px; }
.logo-mark rect { fill: var(--ink); }
.logo-mark path { fill: none; stroke: #2ec4b6; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.main-nav a { text-decoration: none; color: var(--ink-2); }
.main-nav a:hover { color: var(--ink); }
.main-nav .nav-cta { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff; }
.main-nav .nav-cta:hover { color: #fff; background: #16325a; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-store { gap: 8px; }
.btn-store svg { width: 18px; height: 18px; fill: currentColor; margin-top: -2px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #16325a; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-latiro { background: var(--red); color: #fff; }
.btn-latiro:hover { background: #e82f34; }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Hero */
.hero { padding: 88px 0 96px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(19, 168, 154, .14), transparent);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--teal-strong);
  background: var(--teal-soft); padding: 6px 14px; border-radius: 999px; margin: 0 0 24px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(19, 168, 154, .5); } 50% { box-shadow: 0 0 0 6px rgba(19, 168, 154, 0); } }
h1 { font-size: clamp(38px, 5.4vw, 62px); }
h1 em { font-style: italic; color: var(--teal-strong); }
.lead { font-size: 19px; margin: 24px 0 32px; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  background: var(--ink); color: #c9d6e3; border-radius: 24px; padding: 28px;
  box-shadow: 0 30px 60px -30px rgba(11, 31, 58, .6);
}
.profile { display: flex; align-items: center; gap: 16px; }
.avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #2ec4b6; }
.profile p { margin: 0; }
.profile-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: #fff; }
.profile-role { font-size: 14px; color: #7fa0bd; }
.ecg { width: 100%; height: 90px; display: block; margin: 12px 0 20px; }
.ecg-line {
  fill: none; stroke: #2ec4b6; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: trace 2.4s ease-out .3s forwards;
}
.ecg-code { font-family: var(--mono); font-size: 34px; fill: #fff; opacity: 0; animation: fade .6s ease 2.3s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.facts dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #7fa0bd; padding-top: 3px; }
.facts dd { margin: 0; color: #fff; font-size: 15px; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.kicker { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-strong); margin: 0 0 12px; }
.kicker-light { color: #2ec4b6; }
h2 { font-size: clamp(30px, 3.6vw, 42px); max-width: 20em; }
.section-lead { font-size: 18px; max-width: 38em; margin: 16px 0 0; }

/* Timeline */
.timeline { list-style: none; margin: 48px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 130px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--line), var(--line) 50%, var(--teal)); }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 36px; padding: 14px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 125px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid #b8c4cf; }
.timeline li.t-clinic::before { border-color: var(--red); background: var(--red-soft); }
.timeline li.t-tech::before { border-color: var(--teal); background: var(--teal); }
.t-when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.timeline h3 { font-size: 18px; }
.timeline p { margin: 4px 0 0; font-size: 16px; max-width: 40em; }

/* Products */
.product {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: 48px; margin-top: 48px; box-shadow: var(--shadow);
}
.product-reverse .product-visual { order: -1; }
.product-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.product-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.product-head h3 { font-size: 26px; font-family: var(--serif); }
.product-url { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.badge { margin-left: auto; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.badge-live { background: var(--teal-soft); color: var(--teal-strong); }
.badge-live::before { content: "● "; }
.badge-review { background: var(--amber-soft); color: var(--amber); }
.product-pitch { font-size: 18px; color: var(--ink); margin: 22px 0 18px; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: 15.5px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230d8a7e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.product-reverse .checks li::before { background-color: var(--red-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23e82f34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.checks strong { color: var(--ink); }
.stack { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Historia Fácil mock */
.hf-visual { background: linear-gradient(145deg, #0b2a5a, #0b1f3a); border-radius: 22px; padding: 36px 28px; }
.mock-window { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .5); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #eef1f4; }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: #cbd3db; }
.mock-bar em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 10px; }
.mock-content { padding: 18px 20px 22px; }
.mock-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.mock-chips b { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #eef1f4; color: var(--ink-2); }
.mock-chips b.on { background: #1eaeb1; color: #fff; }
.mock-label { font-size: 11px; font-weight: 600; color: var(--ink); margin: 12px 0 6px; }
.mock-line { height: 8px; border-radius: 4px; background: #e6ebef; margin-bottom: 6px; }
.w95 { width: 95%; } .w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; }
.mock-copy { margin-top: 18px; display: inline-block; font-size: 12px; font-weight: 600; background: #0b2a5a; color: #fff; padding: 7px 14px; border-radius: 8px; }

/* Latiro phones */
.phones { position: relative; display: flex; justify-content: center; padding: 20px 0; min-height: 460px; }
.phones::before { content: ""; position: absolute; inset: 10% 5%; background: radial-gradient(closest-side, rgba(255, 59, 64, .18), transparent); }
.phone {
  margin: 0; width: 200px; border-radius: 34px; overflow: hidden; position: relative;
  border: 7px solid #111; background: #111; box-shadow: 0 30px 50px -24px rgba(11, 31, 58, .5);
}
.phone img { width: 100%; height: auto; }
.phone-back { transform: translate(40px, 30px) rotate(6deg); }
.phone-front { transform: translate(-40px, 0) rotate(-4deg); }
.latiro-icon { display: grid; place-items: center; background: linear-gradient(180deg, #ff6166, #ff3b40); }
.latiro-icon svg { width: 30px; height: 30px; fill: #fff; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.principle { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.p-num { font-family: var(--mono); font-size: 13px; color: var(--teal-strong); }
.principle h3 { font-size: 18px; margin: 12px 0 8px; }
.principle p { margin: 0; font-size: 15px; }
.skills { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.skills h3 { font-size: 14px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 14px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }

/* Contact */
.contact { background: var(--ink); color: #c9d6e3; padding: 88px 0; }
.contact h2 { color: #fff; }
.contact p { font-size: 18px; max-width: 32em; }
.contact-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.contact-links { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.site-footer { background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .08); color: #7fa0bd; font-size: 14px; }
.site-footer p { margin: 0; padding: 24px 0; }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner, .product, .contact-inner, .skills { grid-template-columns: 1fr; }
  .product-reverse .product-visual { order: 0; }
  .principles { grid-template-columns: 1fr 1fr; }
  .product { padding: 32px; gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .main-nav a:not(.nav-cta) { display: none; }
  .logo span { font-size: 15px; }
  .hero { padding: 48px 0 64px; }
  .section { padding: 64px 0; }
  .principles { grid-template-columns: 1fr; }
  .product { padding: 22px; border-radius: 22px; }
  .badge { margin-left: 0; }
  .timeline::before { left: 5px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 30px; }
  .timeline li::before { left: 0; top: 18px; }
  .phones { min-height: 380px; }
  .phone { width: 160px; border-radius: 28px; }
  .phone-back { transform: translate(30px, 24px) rotate(6deg); }
  .phone-front { transform: translate(-30px, 0) rotate(-4deg); }
  .hf-visual { padding: 22px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ecg-line { stroke-dashoffset: 0; }
  .ecg-code { opacity: 1; }
}

/* Guardia Planner (tarjeta en Productos) */
.gp-visual { display: grid; place-items: center; padding: 48px 24px; border-radius: 22px; background: radial-gradient(circle at 70% 20%, #e3f5f2, var(--bg-alt) 70%); }
.gp-visual img { width: min(220px, 60%); height: auto; border-radius: 22.5%; box-shadow: 0 30px 50px -24px rgba(11, 31, 58, .5); }
.phones-teal::before { background: radial-gradient(closest-side, rgba(19, 168, 154, .2), transparent); }
.product-gp.product-reverse .checks li::before { background-color: var(--teal-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230d8a7e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
