/* =========================================================
   kan agency · estilos
   - color principal: azul marino profundo (#0B1F4F), con
     suficiente saturación para leerse azul y no negro.
   - todos los bordes redondeados, textos en minúsculas.
   ========================================================= */

/* ---------- variables ---------- */
:root {
  --blue-900: #0B1F4F;   /* color principal */
  --blue-800: #12296A;   /* variaciones para profundidad */
  --blue-700: #1B3787;
  --blue-300: #8FB4FF;   /* acento claro sobre fondo oscuro */
  --blue-100: #E8EFFD;   /* fondos suaves */
  --blue-50:  #F4F7FE;

  --ink: #0B1F4F;        /* texto sobre claro: el mismo azul */
  --ink-soft: #4A5A80;
  --white: #FFFFFF;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow: 0 10px 30px -12px rgba(11, 31, 79, .25);
  --shadow-lg: 0 30px 60px -20px rgba(4, 12, 36, .55);

  --container: 1160px;
  --gutter: 20px;
  --header-h: 72px;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  text-transform: lowercase;          /* aire minimalista */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
svg { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- etiquetas pequeñas sobre títulos ---------- */
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--blue-300);
  background: rgba(143, 180, 255, .12);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.eyebrow--dark {
  color: var(--blue-700);
  background: var(--blue-100);
}

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

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

/* destacado: blanco sobre el azul, máximo contraste */
.btn--primary {
  background: var(--white);
  color: var(--blue-900);
  box-shadow: 0 10px 30px -10px rgba(143, 180, 255, .6);
}
.btn--primary:hover { background: var(--blue-100); }

/* secundario: contorno */
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .35);
}
.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, .06);
}

.btn--lg { padding: 18px 28px; font-size: 17px; }
.btn--sm { padding: 10px 18px; font-size: 15px; box-shadow: none; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.actions--center { justify-content: center; }

/* ---------- cabecera ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: var(--white);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.header.is-scrolled {
  background: rgba(11, 31, 79, .92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .6);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.01em;
}
/* la "k" del logo, recortada en un cuadrado redondeado */
.logo__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(143, 180, 255, .25), 0 6px 18px -6px rgba(0, 0, 0, .5);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 600;
  font-size: 15px;
}
.nav a:not(.btn) {
  opacity: .82;
  transition: opacity .2s ease;
}
.nav a:not(.btn):hover { opacity: 1; }

/* botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform .25s ease, top .25s ease;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child  { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { top: 21px; transform: rotate(-45deg); }

/* ---------- 1. portada ---------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(59, 108, 230, .45), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(27, 55, 135, .7), transparent 60%),
    var(--blue-900);
  padding: calc(var(--header-h) + 72px) 0 110px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 56px;
}
.hero__title {
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.035em;
  margin-bottom: 26px;
}
.hero__subtitle {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  max-width: 560px;
  margin-bottom: 38px;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}
.channels li {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .7);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .16);
}

/* tarjeta de conversación decorativa */
.hero__visual { display: flex; justify-content: center; }
.chat {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(1.5deg);
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--blue-100);
}
.chat__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 800;
  font-size: 14px;
}
.chat__name { font-weight: 700; font-size: 15px; }
.chat__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
}
.chat__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--blue-50);
}
.msg {
  max-width: 85%;
  font-size: 14.5px;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 16px;
  opacity: 0;
  transform: translateY(8px);
  animation: msg-in .5s ease forwards;
}
.msg--in {
  align-self: flex-start;
  background: var(--white);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 6px rgba(11, 31, 79, .06);
}
.msg--out {
  align-self: flex-end;
  background: var(--blue-900);
  color: var(--white);
  border-bottom-right-radius: 6px;
}
/* aparición escalonada de los mensajes */
.msg:nth-child(1) { animation-delay: .3s; }
.msg:nth-child(2) { animation-delay: 1.1s; }
.msg:nth-child(3) { animation-delay: 1.9s; }
.msg:nth-child(4) { animation-delay: 2.7s; }

@keyframes msg-in {
  to { opacity: 1; transform: none; }
}

.chat__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 13px;
}
.tag {
  font-weight: 700;
  color: #15803D;
  background: #DCFCE7;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.time { color: var(--ink-soft); }

/* ---------- secciones genéricas ---------- */
.section { padding: 110px 0; }
.section__head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section__title {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.section__lead {
  font-size: 18px;
  color: var(--ink-soft);
}

/* ---------- 2. servicios ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--white);
  box-shadow: var(--shadow);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: var(--blue-900);
  color: var(--white);
  margin-bottom: 26px;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}
.card__text {
  font-size: 15.5px;
  color: var(--ink-soft);
}

/* canales de entrega */
.delivery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  background: var(--blue-900);
  color: var(--white);
}
.delivery__label {
  font-weight: 700;
  color: var(--blue-300);
}
.delivery__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.delivery__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
}
.delivery__list svg { width: 18px; height: 18px; }

/* ---------- 3. sobre nosotros ---------- */
.about {
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  margin: 0 var(--gutter);
}
.about__inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.about__body p {
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.75;
  color: var(--ink);
}

/* ---------- 4. contacto ---------- */
.contact__box {
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(59, 108, 230, .45), transparent 70%),
    var(--blue-900);
  border-radius: var(--radius-lg);
  padding: 80px 32px;
}
.contact__title {
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.035em;
  margin-bottom: 18px;
}
.contact__text {
  font-size: 18px;
  color: rgba(255, 255, 255, .75);
  max-width: 520px;
  margin: 0 auto 36px;
}

/* ---------- pie ---------- */
.footer {
  padding: 0 0 40px;
  color: var(--ink-soft);
  font-size: 14px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--blue-100);
}
.logo--small { color: var(--ink); font-size: 16px; }
.logo--small .logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

/* ---------- aparición suave al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; gap: 64px; }
  .hero__visual { justify-content: flex-start; }
  .about__inner { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 780px) {
  :root { --header-h: 64px; --gutter: 16px; }

  /* menú móvil desplegable */
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--blue-800);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a:not(.btn) {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }
  .nav a:not(.btn):hover { background: rgba(255, 255, 255, .06); }
  .nav .btn { margin-top: 6px; }
  .header.menu-open { background: var(--blue-900); }

  .hero { padding: calc(var(--header-h) + 44px) 0 72px; }
  .hero__visual { justify-content: center; }
  .chat { transform: none; }

  .section { padding: 76px 0; }
  .section__head { margin-bottom: 40px; }

  .delivery { padding: 20px; }
  .contact__box { padding: 56px 20px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .btn--lg { padding: 17px 22px; }
  .about { margin: 0 8px; }
}

/* respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
