/* =========================================================
   Elias Nicolas Caranza Jaramillo · Portafolio personal
   ========================================================= */
:root {
  --bg: #f8f9fa;
  --bg-alt: #eef2f7;
  --paper: #ffffff;
  --ink: #212529;
  --muted: #5c666f;
  --green: #0056b3;
  --green-dark: #00407e;
  --wood: #20c997;
  --wood-dark: #14885f;
  --accent: #20c997;
  --wa: #25d366;
  --line: rgba(0, 86, 179, 0.14);
  --shadow: 0 18px 45px rgba(0, 86, 179, 0.12);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Barra superior ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 64, 126, 0.97);
  backdrop-filter: blur(8px);
  padding: 10px 24px;
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { height: 34px; width: auto; border-radius: 7px; background: #fff; padding: 3px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--paper);
  white-space: nowrap;
}
.brand strong { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; font-weight: 600; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--wa);
  color: #fff !important;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}
.nav-cta:hover { filter: brightness(1.06); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 60px 24px 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M0 80h35l20-28h30l25-30h40' fill='none' stroke='%230056b3' stroke-width='1.4'/%3E%3Cpath d='M45 52 70 42h25l20-26h25' fill='none' stroke='%230056b3' stroke-width='1.4'/%3E%3Cpath d='M40 150v-33h30l15-20h35' fill='none' stroke='%230056b3' stroke-width='1.4'/%3E%3Cpath d='M160 34h-22l-20 30h-42l-16 22H0' fill='none' stroke='%230056b3' stroke-width='1.4' stroke-dasharray='3 7'/%3E%3Ccircle cx='20' cy='80' r='3' fill='%230056b3'/%3E%3Ccircle cx='55' cy='52' r='2.4' fill='%2320c997'/%3E%3Ccircle cx='95' cy='40' r='2.4' fill='%2320c997'/%3E%3Ccircle cx='150' cy='150' r='3' fill='%230056b3'/%3E%3Ccircle cx='40' cy='82' r='3' fill='%230056b3'/%3E%3Ccircle cx='70' cy='150' r='2.4' fill='%2320c997'/%3E%3Ccircle cx='110' cy='118' r='2.4' fill='%2320c997'/%3E%3Ccircle cx='120' cy='42' r='3' fill='%230056b3'/%3E%3Ccircle cx='160' cy='34' r='3' fill='%230056b3'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.06;
  pointer-events: none;
}
.hero-inner { max-width: 1120px; margin: 0 auto; position: relative; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  box-shadow: 13px 0 0 rgba(32, 201, 151, 0.3);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--green-dark);
  margin-bottom: 18px;
}
.hero h1 .hl { color: var(--wood-dark); }
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin-bottom: 26px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  background: var(--bg-alt);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--paper); box-shadow: 0 8px 22px rgba(32, 201, 151, 0.35); }
.btn-primary:hover { transform: translateY(-2px); background: var(--wood-dark); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4); }
.btn-wa:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-outline { background: transparent; color: var(--green-dark); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--wood); color: var(--wood-dark); }

.hero-phone {
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px 28px 26px;
  border: 1px solid var(--green);
  position: relative;
}
.hero-phone::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--accent);
}
.hero-logo { width: 100%; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 20px; }
.phone-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin-bottom: 4px; }
.phone-num { font-size: 1.5rem; font-weight: 800; color: var(--green-dark); }
.phone-num small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.phone-list { margin-top: 18px; display: grid; gap: 12px; }
.phone-item { display: flex; gap: 12px; color: var(--muted); font-size: 0.94rem; }
.phone-item b { color: var(--green-dark); }

/* ---------- Secciones ---------- */
.section { padding: 84px 24px; }
.section-alternativa { background: var(--bg-alt); }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-head p.intro { color: var(--muted); }

/* ---------- Sobre mí ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-text p b { color: var(--green-dark); }
.about-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
}
.about-card h3 { font-family: var(--serif); font-size: 1.15rem; color: var(--green-dark); margin-bottom: 16px; }
.about-skills { display: grid; gap: 14px; }
.skill-line { display: flex; align-items: center; gap: 14px; }
.skill-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wood); flex-shrink: 0; }
.skill-line div { flex: 1; }
.skill-name { font-weight: 700; font-size: 0.95rem; color: var(--green-dark); }
.skill-sub { font-size: 0.82rem; color: var(--muted); }

/* ---------- Planes (servicio chatbot) ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.plan:hover { transform: translateY(-5px); box-shadow: 0 26px 60px rgba(0, 86, 179, 0.2); }
.plan.destacado { border: 2px solid var(--wood); position: relative; }
.plan-badge {
  position: absolute;
  top: -13px;
  left: 30px;
  background: var(--wood);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}
.plan-tag { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-dark); margin-bottom: 8px; }
.plan h3 { font-family: var(--serif); font-size: 1.5rem; color: var(--green-dark); margin-bottom: 10px; }
.plan-desc { color: var(--muted); font-size: 0.94rem; margin-bottom: 18px; }
.plan-list { display: grid; gap: 10px; margin-bottom: 22px; }
.plan-item { display: flex; gap: 10px; font-size: 0.92rem; color: var(--muted); }
.plan-item b { color: var(--green-dark); font-weight: 600; }
.plan-item .check { color: var(--green); font-weight: 800; }
.plan-link { margin-top: auto; text-align: center; font-size: 0.95rem; font-weight: 700; color: var(--wood-dark); border-top: 1px solid var(--line); padding-top: 18px; }
.plan-link:hover { color: var(--green-dark); }

/* ---------- Riesgos Evolution API ---------- */
.riesgos {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--wood);
  border-radius: 18px;
  padding: 28px 30px;
  max-width: 1120px;
  margin: 0 auto;
}
.riesgos h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--green-dark); margin-bottom: 12px; }
.riesgos > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; max-width: 900px; }
.riesgos-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.riesgo-item {
  background: var(--bg);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 0.9rem;
  color: var(--muted);
}
.riesgo-item b { display: block; color: var(--green-dark); margin-bottom: 4px; font-size: 0.95rem; }
.riesgo-item ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.riesgo-item li { margin-left: 12px; color: var(--muted); font-size: 0.88rem; }
.riesgo-item li::marker { color: var(--green); }
.riesgos-pies { display: grid; gap: 10px; }
.riesgos-pies li { list-style: none; display: flex; gap: 10px; font-size: 0.9rem; color: var(--muted); }
.riesgos-pies .check { color: var(--green); font-weight: 800; }
.riesgos-fuente {
  font-size: 0.82rem;
  color: var(--wood-dark);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.riesgos-fuente a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.riesgos-fuente a:hover { color: var(--green-dark); }

/* ---------- Estudios / evidencia ---------- */
.estudios { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.estudio {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.estudio:hover { transform: translateY(-4px); box-shadow: 0 24px 54px rgba(0, 86, 179, 0.18); }
.estudio-tag { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-dark); margin-bottom: 8px; }
.estudio h3 { font-family: var(--serif); font-size: 1.35rem; color: var(--green-dark); margin-bottom: 14px; }
.estudio-metrica {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.05;
  margin-bottom: 14px;
}
.estudio-metrica small { font-size: 1rem; font-weight: 600; color: var(--wood-dark); }
.estudio-desc { color: var(--muted); font-size: 0.93rem; }
.estudio-src {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--wood-dark);
  font-weight: 600;
}
.estudio-src a { text-decoration: underline; text-underline-offset: 3px; }
.estudio-src a:hover { color: var(--green-dark); }

/* ---------- Portafolio ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }
.card {
  background: var(--paper);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(0, 86, 179, 0.22); }
.card-media { position: relative; }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-step {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--green);
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
}
.card-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card-case { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-dark); margin-bottom: 8px; }
.card-tipo { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--green-dark); margin-bottom: 10px; }
.card-desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.card-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.card-feat {
  background: var(--bg-alt);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
}
.card-foot { margin-top: auto; }
.btn-block { width: 100%; }

/* ---------- CTA final ---------- */
.cta { background: var(--green-dark); color: var(--paper); text-align: center; padding: 80px 24px; }
.cta-inner { max-width: 680px; margin: 0 auto; }
.cta .eyebrow { color: var(--accent); }
.cta h2 { font-family: var(--serif); font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 600; margin-bottom: 16px; }
.cta p { color: rgba(255, 255, 255, 0.8); margin-bottom: 30px; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta .btn-primary { background: var(--paper); color: var(--green-dark); }
.cta .btn-primary:hover { background: var(--bg-alt); }
.cta .btn-outline { color: var(--paper); border-color: rgba(255, 255, 255, 0.55); }
.cta .btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
.footer { background: var(--green-dark); color: rgba(255, 255, 255, 0.85); text-align: center; padding: 36px 24px; }
.footer-logo { height: 46px; width: auto; margin: 0 auto 14px; border-radius: 9px; background: #fff; padding: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.footer .brand { margin-bottom: 8px; }
.footer p { font-size: 0.92rem; }
.footer a { color: var(--accent); font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 60px 20px; }
  .projects, .plans { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
}