/* ===== TIMP Tecnologías — estilos ===== */
:root {
  /* Colores de marca */
  --navy: #123152;
  --blue: #2E61C0;
  --blue-light: #9DB8EC;
  --soft-blue: #E8EEFA;
  --white: #FFFFFF;

  /* Tokens de tema (claro) */
  --bg: #FFFFFF;
  --bg-soft: #F3F5F8;
  --surface: #FFFFFF;
  --text: #123152;
  --muted: #5B6170;
  --line: #E3E8EF;
  --accent: #2E61C0;
  --accent-hover: #123152;
  --chip: #E8EEFA;
  --ghost-border: #C9D3E1;
  --header-bg: rgba(255, 255, 255, 0.92);
  --band: #123152;
  --band-text: #D5DEEC;
  --btn-hover: #123152;
  --shadow: 0 18px 40px rgba(18, 49, 82, 0.16);

  --radius: 20px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

/* Tokens de tema (oscuro): azul marino profundo de la marca */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1626;
    --bg-soft: #0E1E33;
    --surface: #12263F;
    --text: #E6ECF5;
    --muted: #A9B6C9;
    --line: #213856;
    --accent: #6E9BF0;
    --accent-hover: #9DB8EC;
    --chip: #1A3456;
    --ghost-border: #2D4A70;
    --header-bg: rgba(10, 22, 38, 0.88);
    --band: #123152;
    --band-text: #C9D5E8;
    --btn-hover: #3B72D9;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1626;
  --bg-soft: #0E1E33;
  --surface: #12263F;
  --text: #E6ECF5;
  --muted: #A9B6C9;
  --line: #213856;
  --accent: #6E9BF0;
  --accent-hover: #9DB8EC;
  --chip: #1A3456;
  --ghost-border: #2D4A70;
  --header-bg: rgba(10, 22, 38, 0.88);
  --band: #123152;
  --band-text: #C9D5E8;
  --btn-hover: #3B72D9;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 860px; }

.accent { color: var(--accent); }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow--light { color: var(--blue-light); }

.lead { font-size: 1.1rem; line-height: 1.6; color: var(--muted); max-width: 600px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 28px; border-radius: 12px;
  font-family: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--btn-hover); color: var(--white); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--ghost-border); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--soft-blue); color: var(--navy); }
.btn--small { min-height: 44px; padding: 10px 20px; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.nav__logo { margin-right: auto; }
.nav__logo img { height: 44px; width: auto; }
.nav__links { order: 1; }
.theme-toggle { order: 2; }
.nav__toggle { order: 3; }
.nav__links { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; font-weight: 600; font-size: 0.95rem; }
.nav__links a:not(.btn) { color: var(--text); text-decoration: none; }
.nav__links a:not(.btn):hover { color: var(--accent); }

/* Botón de tema claro/oscuro */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--text); border: 1.5px solid var(--ghost-border);
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-sun { display: none; }

/* Logos según el tema */
.logo-dark { display: none; }

.nav__toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 10px;
}
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Secciones ===== */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--band); color: var(--white); }
.section--dark .lead { color: var(--band-text); }
.note-light { margin-top: 4px; font-size: 0.9rem; line-height: 1.6; color: #D5DEEC; }
.note-light a { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 12px 0; }
.note-light a:hover { color: var(--blue-light); }
.section__head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin-bottom: 48px; }

.hero { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%); padding: 80px 0 96px; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split__text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split__media { flex: 1 1 400px; min-width: 0; position: relative; }
.split--reverse { flex-direction: row-reverse; }

.photo { width: 100%; height: 520px; object-fit: cover; border-radius: 24px; }

/* Pilares */
.pillars { display: flex; flex-wrap: wrap; gap: 24px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.9rem; font-weight: 600; }
.pillars li { display: inline-flex; align-items: center; gap: 8px; }
.pillars svg { color: var(--accent); }

/* Tarjeta flotante del hero */
.float-card {
  position: absolute; left: -20px; bottom: 32px; max-width: 300px;
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow);
}
.float-card__icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--chip); color: var(--accent);
}
.float-card strong { display: block; font-size: 0.95rem; }
.float-card small { display: block; font-size: 0.82rem; color: var(--muted); }

/* Problemas */
.pains { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 0; padding: 0; list-style: none; }
.pains li { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-soft); border-radius: 16px; padding: 20px; }
.pains__num { flex-shrink: 0; width: 28px; font-weight: 800; color: var(--accent); }
.pains h3 { font-size: 1.05rem; }
.pains p { margin-top: 6px; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }

/* Grillas y tarjetas */
.grid { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--text);
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.card p { font-size: 0.95rem; line-height: 1.6; color: var(--muted); }

/* Asistente de cobros */
.checks { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 1rem; }
.checks li {
  position: relative; padding-left: 34px;
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px;
  background: no-repeat center / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239DB8EC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

.notification {
  position: absolute; left: 50%; top: 32%; transform: translateX(-50%);
  width: min(78%, 300px);
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); color: var(--text); border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.25);
  animation: notify 4s ease-in-out infinite;
}
.notification__icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--white);
}
.notification small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.notification strong { display: block; font-size: 0.95rem; }
.notification span span, .notification > span:last-child > span { display: block; font-size: 0.88rem; }

/* En escritorio ancho, el aviso va dentro de la pantalla del celular de la foto */
@media (min-width: 1200px) {
  .notification {
    left: 51%; top: 30%;
    width: 23%; min-width: 116px;
    flex-direction: column; gap: 6px;
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 9px 11px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }
  .notification__icon { width: 24px; height: 24px; border-radius: 7px; }
  .notification__icon svg { width: 14px; height: 14px; }
  .notification small { font-size: 0.62rem; line-height: 1.3; }
  .notification strong { font-size: 0.74rem; line-height: 1.25; margin-top: 2px; }
  .notification span span, .notification > span:last-child > span { font-size: 0.66rem; line-height: 1.3; margin-top: 2px; white-space: nowrap; }
}

@keyframes notify {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

/* Pasos */
.step { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step__num {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--white); font-weight: 800; font-size: 1.05rem;
}
.step p { font-size: 0.95rem; line-height: 1.6; color: var(--muted); }

/* Preguntas */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 24px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 32px 22px 0; position: relative;
  font-size: 1.05rem; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 500; color: var(--accent); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding-bottom: 22px; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }

/* Contacto */
.contact {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px;
  background: var(--band); color: var(--white); border: 1px solid var(--line); border-radius: 28px; padding: 64px 48px;
}
.contact__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact__text .lead { color: var(--band-text); }
.contact__links { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact__link {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 16px 20px;
  border-radius: 14px; text-decoration: none; font-weight: 600; font-size: 1rem;
  color: var(--white); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25);
  overflow-wrap: anywhere; transition: background-color .15s ease;
}
.contact__link:hover { background: rgba(255, 255, 255, 0.16); color: var(--white); }
.contact__link--main { background: var(--white); color: var(--navy); font-weight: 700; border-color: var(--white); }
.contact__link--main svg { color: var(--blue); }
.contact__link--main:hover { background: var(--soft-blue); color: var(--navy); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 32px; padding-bottom: 32px; font-size: 0.9rem; color: var(--muted);
}
.site-footer img { height: 34px; width: auto; }

/* ===== Cambios visuales del modo oscuro ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ===== Celular y tablet ===== */
@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(18, 49, 82, 0.08);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__links li:last-child { margin-top: 16px; }
  .nav__links .btn { width: 100%; }
  .nav { position: relative; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .split { gap: 40px; }
  .photo { height: 380px; }
  .float-card { left: 12px; right: 12px; bottom: 16px; max-width: none; }
  .contact { padding: 40px 20px; border-radius: 20px; }
  .contact__link { font-size: 0.9rem; padding: 14px 16px; gap: 10px; overflow-wrap: normal; }
  .actions .btn { flex: 1 1 100%; }
}

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