/* ============================================
   Enfermería en Casa — Landing Page Styles
   Palette: navy (brand logo) + warm coral accent
   ============================================ */

:root {
  --color-primary: #1b2a6b;
  --color-primary-dark: #14204f;
  --color-primary-soft: #eef2fb;
  --color-accent: #e8734a;
  --color-accent-dark: #d55f36;
  --color-mp: #009ee3;
  --color-mp-dark: #0084bd;
  --color-ink: #131c3f;
  --color-body: #3c4664;
  --color-muted: #6b7490;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f8fe;
  --color-border: #dde4f3;
  --color-success: #1e8e5a;

  --font-heading: "Figtree", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, sans-serif;

  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(19, 28, 63, 0.06);
  --shadow-md: 0 10px 30px rgba(19, 28, 63, 0.1);
  --shadow-lg: 0 24px 60px rgba(19, 28, 63, 0.16);

  --container: 1120px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-body);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-narrow { max-width: 800px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(232, 115, 74, 0.35);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 115, 74, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.btn-mp {
  background: var(--color-mp);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 158, 227, 0.35);
}
.btn-mp:hover {
  background: var(--color-mp-dark);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 20px; font-size: 0.92rem; min-height: 44px; }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.brand-name span { color: var(--color-primary); }

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-body);
  text-decoration: none;
  padding: 8px 2px;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--color-primary); }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(27, 42, 107, 0.08), transparent),
    linear-gradient(180deg, var(--color-surface-alt) 0%, #fff 100%);
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid rgba(27, 42, 107, 0.15);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.badge svg { width: 16px; height: 16px; }

.hero h1 em {
  font-style: normal;
  color: var(--color-primary);
  position: relative;
}

.hero-sub {
  font-size: 1.12rem;
  margin: 22px 0 32px;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--color-muted);
  font-weight: 500;
}
.hero-trust svg { width: 17px; height: 17px; color: var(--color-success); }

.hero-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  max-width: 380px;
  justify-self: center;
  width: 100%;
}

.hero-logo {
  width: 100%;
  aspect-ratio: 1.6;
  object-fit: contain;
  background: #fbfcff;
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.hero-photo {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border);
}

.hero-card-body { padding: 26px; }

.hero-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-ink);
  margin-bottom: 14px;
}

.hero-card-list {
  list-style: none;
  margin-bottom: 22px;
}

.hero-card-list li {
  padding: 7px 0 7px 28px;
  position: relative;
  font-size: 0.95rem;
}

.hero-card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  border: 2px solid var(--color-primary);
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--color-surface-alt); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* ===== Cards grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.95rem; }

/* ===== Split sections ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split-copy .eyebrow { margin-bottom: 10px; }
.split-copy h2 { margin-bottom: 18px; }
.split-copy p { margin-bottom: 14px; }

.check-list {
  list-style: none;
  margin-top: 10px;
}

.check-list li {
  padding: 9px 0 9px 34px;
  position: relative;
  font-weight: 500;
  color: var(--color-ink);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-success);
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 14px no-repeat, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 14px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
}

.split-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 28px;
}

.stat { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* ===== Accordion ===== */
.accordion {
  display: grid;
  gap: 12px;
  max-width: 800px;
  margin-inline: auto;
}

.accordion-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.accordion-item[open] { box-shadow: var(--shadow-sm); }

.accordion-item summary {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-ink);
  padding: 18px 52px 18px 22px;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
  transition: color 0.2s ease;
}

.accordion-item summary::-webkit-details-marker { display: none; }

.accordion-item summary:hover { color: var(--color-primary); }

.accordion-item summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--color-primary);
  border-bottom: 2.5px solid var(--color-primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

.accordion-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.accordion-item p {
  padding: 0 22px 20px;
  font-size: 0.96rem;
}

/* ===== Instructor ===== */
.instructor-panel {
  text-align: center;
  gap: 10px;
  justify-items: center;
  padding: 56px 40px;
}

.instructor-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
  margin-bottom: 8px;
}

.instructor-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-ink);
}

.instructor-role { color: var(--color-muted); }

.note {
  background: #fff7ed;
  border: 1px dashed #f0b285;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #9a5b2e;
}

/* ===== Peek inside (PDF previews) ===== */
.peek-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 980px;
  margin-inline: auto;
}

.peek-card { margin: 0; }

.peek-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.peek-card img:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.peek-card figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 12px;
  padding-inline: 8px;
}

/* ===== Pricing ===== */
.pricing {
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(27, 42, 107, 0.07), transparent),
    var(--color-surface-alt);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  max-width: 920px;
  margin-inline: auto;
  align-items: start;
}

.pricing-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: 40px 34px;
}

.pricing-featured {
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-lg);
  position: relative;
  padding: 44px 40px;
}

.pricing-flag {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-badge-neutral {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.pricing-top { text-align: center; margin-bottom: 28px; }

.pricing-badge {
  display: inline-block;
  background: rgba(30, 142, 90, 0.1);
  color: var(--color-success);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.pricing-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-ink);
  margin-bottom: 14px;
}

.pricing-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.4rem;
  color: var(--color-primary);
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.pricing-price .currency { font-size: 1.8rem; }
.pricing-price .currency-code {
  font-size: 1rem;
  color: var(--color-muted);
  font-weight: 600;
  align-self: center;
  margin-left: 4px;
}

.pricing-note {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.pricing-features {
  list-style: none;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
  margin-bottom: 28px;
  display: grid;
  gap: 10px;
}

.pricing-features li {
  padding-left: 30px;
  position: relative;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--color-ink);
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-success);
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 12px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.pricing-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--color-muted);
}
.pricing-secure svg { width: 16px; height: 16px; }

/* ===== Final CTA ===== */
.final-cta {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 88px 0;
  text-align: center;
}

.final-cta h2 { color: #fff; margin-bottom: 14px; }

.final-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 auto 32px;
}

/* ===== Footer ===== */
.footer {
  background: #0e1638;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .brand-name { color: #fff; }
.footer .brand-name span { color: #8fa3e8; }

.footer .brand-logo { background: #fff; padding: 4px; }

.footer-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 60ch;
}

/* ===== Buyer email modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14, 22, 56, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* display:flex above would override the hidden attribute */
.modal-backdrop[hidden] { display: none; }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px 28px;
  max-width: 440px;
  width: 100%;
  position: relative;
}

.modal h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
  padding-right: 30px;
}

.modal-sub {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 22px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--color-primary-soft); color: var(--color-primary); }
.modal-close svg { width: 20px; height: 20px; }

.modal label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink);
  margin-bottom: 6px;
}

.modal label .optional {
  font-weight: 400;
  color: var(--color-muted);
}

.modal input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.modal input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.field-error {
  color: #c0392b;
  font-size: 0.88rem;
  margin: -10px 0 14px;
}

.modal-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 14px;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .card { transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid,
  .split { grid-template-columns: 1fr; gap: 40px; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  .split-panel { padding: 32px 24px; }
  .peek-grid { grid-template-columns: 1fr; max-width: 420px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 520px; }
  .pricing-featured { order: -1; }
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .pricing-card { padding: 32px 22px; }
  .pricing-price { font-size: 2.7rem; }
  .navbar-inner { height: 68px; }
  .brand-name { font-size: 0.98rem; }
  .navbar .btn { white-space: nowrap; }
}

@media (max-width: 430px) {
  .navbar .brand-name { display: none; }
}
