:root {
  --ink: #0a2e28;
  --ink-soft: #1f4a41;
  --muted: #5a726a;
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --green: #0a3d33;
  --green-mid: #0f5c4c;
  --gold: #e8a317;
  --gold-soft: #f5c451;
  --wa: #1f9b4f;
  --wa-hover: #188642;
  --white: #fffcf7;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
}

/* —— Nav —— */
.kf-nav {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.75rem);
}

.kf-logo img {
  height: 48px;
  width: auto;
  background: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.kf-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.kf-nav-links a { color: rgba(255, 252, 247, 0.88); transition: color 0.2s ease; }
.kf-nav-links a:hover { color: var(--white); }
.kf-nav-cta {
  background: var(--gold);
  color: var(--ink) !important;
  padding: 0.55rem 1rem;
  border-radius: 6px;
}
.kf-nav-cta:hover { background: var(--gold-soft); }

/* —— Hero —— */
.kf-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.kf-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 85% 15%, rgba(232, 163, 23, 0.22), transparent 50%),
    linear-gradient(145deg, #062820 0%, #0a3d33 38%, #0f5c4c 68%, #08352c 100%);
}
.kf-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 252, 247, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 252, 247, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
}

.kf-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding:
    clamp(5.5rem, 11vh, 6.75rem)
    clamp(1rem, 4vw, 2.75rem)
    clamp(2rem, 5vh, 3.25rem);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.kf-hero-brand {
  width: min(280px, 70vw);
  height: auto;
  margin: 0 0 1.1rem;
  background: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.kf-hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  max-width: 16ch;
  color: rgba(255, 252, 247, 0.96);
}

.kf-lead {
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
  color: rgba(255, 252, 247, 0.74);
  max-width: 36ch;
}

.kf-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.kf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.3rem;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.kf-btn:hover { transform: translateY(-2px); }
.kf-btn-lg { padding: 1rem 1.55rem; font-size: 1.05rem; }

.kf-btn-primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(232, 163, 23, 0.28);
}
.kf-btn-primary:hover { background: var(--gold-soft); }

.kf-btn-wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 10px 28px rgba(31, 155, 79, 0.28);
}
.kf-btn-wa:hover { background: var(--wa-hover); }

.kf-btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(10, 46, 40, 0.25);
}
.kf-btn-outline:hover { border-color: var(--green); }

.kf-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.kf-hero-img {
  width: min(100%, 560px);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.85s ease, transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.4));
}
.kf-hero-img.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* —— Sections —— */
.kf-section {
  padding: clamp(3.25rem, 7vh, 5rem) clamp(1rem, 4vw, 2.75rem);
  max-width: 1120px;
  margin: 0 auto;
}

.kf-section h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.kf-section-lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.05rem;
}
.kf-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kf-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.kf-points {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.95rem;
}
.kf-points li {
  padding-top: 0.95rem;
  border-top: 1px solid rgba(10, 46, 40, 0.1);
  color: var(--muted);
}
.kf-points strong {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
}

.kf-split-media {
  margin: 0;
  display: flex;
  justify-content: center;
}
.kf-split-media img,
.kf-proceso img {
  width: min(100%, 480px);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.8s ease;
  filter: drop-shadow(0 18px 36px rgba(10, 46, 40, 0.18));
}
.kf-split-media img.is-visible,
.kf-proceso img.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.kf-section-proceso {
  max-width: none;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-top: 1px solid rgba(10, 46, 40, 0.06);
  border-bottom: 1px solid rgba(10, 46, 40, 0.06);
  text-align: center;
}
.kf-section-proceso h2,
.kf-section-proceso .kf-section-lead {
  max-width: 1120px;
}
.kf-proceso {
  margin: 0 auto;
  max-width: 980px;
}
.kf-proceso img {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  background: #fff;
}

.kf-section-api .kf-cta { margin-top: 1.25rem; }

.kf-code {
  margin: 0;
  padding: 1.2rem 1.3rem;
  background: var(--ink);
  color: #d5ebe3;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
  box-shadow: 0 14px 40px rgba(10, 46, 40, 0.16);
}

/* —— Contacto —— */
.kf-contacto {
  padding: clamp(3.5rem, 8vh, 5.5rem) clamp(1rem, 4vw, 2.75rem);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(232, 163, 23, 0.16), transparent 55%),
    linear-gradient(160deg, #062820, #0a3d33 55%, #0f5c4c);
  color: var(--white);
  text-align: center;
}
.kf-contacto-inner { max-width: 520px; margin: 0 auto; }
.kf-contacto-logo {
  margin: 0 auto 1.1rem;
  height: 52px;
  width: auto;
  background: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}
.kf-contacto h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}
.kf-contacto p {
  margin: 0 0 1.35rem;
  color: rgba(255, 252, 247, 0.75);
}
.kf-contacto-meta {
  margin-top: 1rem !important;
  font-size: 0.88rem;
  color: rgba(255, 252, 247, 0.55) !important;
}

/* —— Footer —— */
.kf-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.35rem;
  padding: 1.35rem clamp(1rem, 4vw, 2.75rem);
  background: #051c18;
  color: rgba(255, 252, 247, 0.65);
  font-size: 0.88rem;
}
.kf-footer img {
  height: 34px;
  width: auto;
  background: #fff;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
}
.kf-footer a {
  color: var(--gold-soft);
  font-weight: 600;
}
.kf-footer a:last-child { margin-left: auto; }

/* —— FAB WhatsApp —— */
.kf-fab-wa {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(31, 155, 79, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}
.kf-fab-wa:hover {
  transform: scale(1.06);
  background: var(--wa-hover);
}

@media (max-width: 900px) {
  .kf-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 5.25rem;
  }
  .kf-hero-visual { order: -1; }
  .kf-hero-img { width: min(100%, 380px); }
  .kf-hero h1 { max-width: none; }
  .kf-split { grid-template-columns: 1fr; }
  .kf-nav-links a:not(.kf-nav-cta) { display: none; }
  .kf-footer a:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .kf-hero-img,
  .kf-split-media img,
  .kf-proceso img,
  .kf-btn,
  .kf-fab-wa { transition: none; }
  .kf-hero-img,
  .kf-split-media img,
  .kf-proceso img {
    opacity: 1;
    transform: none;
  }
}
