/* ==========================================================================
   CIVILDENT — Landing page
   ========================================================================== */

:root {
  --blue: #0F4C81;
  --blue-dark: #0A3560;
  --cyan: #22C3E6;
  --cyan-soft: #E6F6FB;
  --bg: #F5F8FB;
  --white: #FFFFFF;
  --text: #1B2B3A;
  --muted: #5B6B7B;
  --border: #DCE6EE;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(15, 76, 129, .08);
  --shadow-lg: 0 18px 40px rgba(15, 76, 129, .16);
  --header-h: 80px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

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

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--blue); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.6rem; border-radius: var(--radius);
  font: inherit; font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s, background-color .2s, box-shadow .2s, color .2s;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(15, 76, 129, .28); }
.btn--primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn--ghost { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--ghost:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--blue); }
.logo__mark { width: 34px; height: 34px; }
.logo__text { font-size: 1.3rem; font-weight: 500; letter-spacing: .08em; }
.logo__text strong { font-weight: 800; color: var(--cyan); }
.logo__text small { font-size: .65em; font-weight: 600; letter-spacing: .12em; opacity: .75; }

.nav__menu { display: flex; align-items: center; gap: 2rem; }
.nav__menu a:not(.btn) { font-weight: 500; font-size: .95rem; color: var(--text); position: relative; padding: .25rem 0; }
.nav__menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav__menu a:not(.btn):hover::after,
.nav__menu a.is-active::after { transform: scaleX(1); }

.nav__toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav__toggle span { display: block; height: 2px; background: var(--blue); margin: 6px 0; transition: transform .25s, opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section--white { background: var(--white); }

.section__head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section__head p:last-child { color: var(--muted); margin-top: .75rem; }

.eyebrow {
  display: inline-block; margin-bottom: .75rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow--light { color: #8FE3F5; }

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--blue); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; color: var(--blue); }
h3 { font-size: 1.15rem; line-height: 1.35; font-weight: 600; color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(34, 195, 230, .18), transparent 60%),
    linear-gradient(180deg, var(--white), var(--bg));
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(5rem, 9vw, 7.5rem);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero__lead { margin-top: 1.25rem; font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { color: var(--blue); font-size: 1.05rem; }
.hero__stats span { color: var(--muted); font-size: .88rem; }
.photo { width: 100%; height: auto; object-fit: cover; }
.hero__visual .photo { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.4; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about__text > p { margin-top: 1.25rem; color: var(--muted); }
.checklist { margin-top: 1.5rem; display: grid; gap: .75rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3rem; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--cyan-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F4C81' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.about__media { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about__media .photo { aspect-ratio: 4 / 3; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--cyan)); transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__num { position: absolute; top: 1.25rem; right: 1.5rem; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--cyan-soft); -webkit-text-stroke: 1px #BFE6F2; }
.card h3 { margin: 1.25rem 0 .6rem; }
.card > p { color: var(--muted); font-size: .96rem; }
.card__icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), #1A6FB5); color: #fff; box-shadow: 0 8px 18px rgba(15, 76, 129, .28);
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card__list { display: grid; gap: .5rem; margin: 1.25rem 0 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--border); font-size: .92rem; }
.card__list li { position: relative; padding-left: 1.5rem; }
.card__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.card__link { margin-top: auto; font-weight: 600; font-size: .92rem; color: var(--blue); }
.card__link span { display: inline-block; transition: transform .2s; }
.card__link:hover span { transform: translateX(5px); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem; margin-top: 4rem; padding: 2rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.steps li { counter-increment: step; display: grid; gap: .15rem; padding-left: 3.4rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--cyan-soft); color: var(--blue); font-weight: 800; border: 2px solid var(--cyan); }
.steps strong { color: var(--blue); }
.steps span { color: var(--muted); font-size: .9rem; }

/* ---------- Trust bar ---------- */
.trust { position: relative; z-index: 2; margin-top: -2.5rem; padding-bottom: 1rem; }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.trust__grid li { display: grid; gap: .25rem; align-content: start; padding: 1.75rem 1.5rem; border-right: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.trust__grid li:last-child { border-right: 0; }
.trust__grid strong { color: var(--text); font-size: 1rem; }
.trust__num { font-size: .8rem; font-weight: 800; letter-spacing: .12em; color: var(--cyan); }

/* ---------- Floating badges (hero) ---------- */
.hero__visual { position: relative; }
.float-badge { position: absolute; display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem .7rem .7rem; background: var(--white); border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .85rem; line-height: 1.25; animation: float 6s ease-in-out infinite; }
.float-badge small { display: block; color: var(--muted); font-size: .76rem; }
.float-badge__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cyan); color: #fff; flex: none; }
.float-badge__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.float-badge--a { left: -1.5rem; bottom: 2rem; }
.float-badge--b { right: -1rem; top: 1.75rem; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero__visual .photo::after { content: none; }

/* ---------- Mercado Público ---------- */
.banner {
  display: grid; grid-template-columns: 1.4fr .8fr; gap: 2.5rem; align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(500px 260px at 100% 0, rgba(34, 195, 230, .35), transparent 70%),
    linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: var(--shadow-lg);
}
.banner h2 { color: #fff; }
.banner__text > p:not(.eyebrow) { margin-top: 1rem; color: #D6E7F5; max-width: 52ch; }
.banner__tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.banner__tags li {
  padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 500;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
}

.seal {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem;
  justify-self: center; width: min(100%, 290px); padding: 2rem 1.5rem 1.5rem;
  background: var(--white); color: var(--blue); border-radius: var(--radius-lg);
  border: 3px double var(--cyan); box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}
.seal__check {
  width: 54px; height: 54px; padding: 12px; border-radius: 50%;
  background: var(--cyan); color: #fff; margin-top: -3.2rem; margin-bottom: .4rem;
  border: 4px solid var(--white); box-sizing: content-box;
}
.seal__label { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.seal__name { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; }
.seal__foot { margin-top: .6rem; padding: .45rem 1rem; border-radius: var(--radius); background: var(--cyan-soft); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact__intro > p:not(.eyebrow) { margin-top: 1rem; color: var(--muted); }
.contact__meta { font-weight: 600; color: var(--blue) !important; }

.form {
  display: grid; gap: 1.25rem; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus {
  outline: none; background: var(--white); border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 195, 230, .2);
}
.field.has-error input, .field.has-error textarea { border-color: #C53030; }
.form .btn { justify-self: start; }
.form__status { min-height: 1.4em; font-size: .92rem; font-weight: 500; }
.form__status.is-ok { color: #1F7A4D; }
.form__status.is-error { color: #C53030; }

/* ---------- Footer ---------- */
.footer { background: var(--blue-dark); color: #C9DBEC; padding-top: 3.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.logo--light { color: #fff; }
.footer__desc { margin-top: .75rem; font-size: .92rem; max-width: 32ch; }
.footer__legal { font-style: normal; font-size: .92rem; line-height: 1.8; }
.footer__legal strong { color: #fff; }
.footer__links { display: grid; gap: .5rem; font-size: .92rem; }
.footer__links a:hover { color: var(--cyan); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.25rem 1.25rem; text-align: center; font-size: .85rem; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid, .about, .banner, .contact { grid-template-columns: 1fr; }
  .hero__visual { max-width: 520px; margin-inline: auto; }
  .banner { gap: 3.5rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .trust__grid { grid-template-columns: 1fr 1fr; }
  .trust__grid li:nth-child(2) { border-right: 0; }
  .trust__grid li:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .float-badge--a { left: .5rem; } .float-badge--b { right: .5rem; }
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    padding: .5rem 1.25rem 1.25rem; display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { border-bottom: 1px solid var(--border); }
  .nav__menu li:last-child { border: 0; padding-top: 1rem; }
  .nav__menu a:not(.btn) { display: block; padding: .9rem 0; }
  .nav__menu a:not(.btn)::after { display: none; }
  .nav__menu .btn { width: 100%; }
}

@media (max-width: 600px) {
  .form__row, .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn, .form .btn { width: 100%; }
  .hero__stats { gap: 1.25rem; }
  .trust__grid { grid-template-columns: 1fr; }
  .trust__grid li { border-right: 0; border-bottom: 1px solid var(--border); }
  .trust__grid li:last-child { border-bottom: 0; }
  .float-badge { font-size: .78rem; padding: .5rem .75rem .5rem .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .float-badge { animation: none; }
}

/* ---------- Logo (imagen) ---------- */
.logo__img { height: 68px; width: auto; }
.logo__img--footer { height: 84px; padding: .5rem .9rem; background: var(--white); border-radius: var(--radius); }
.seal__logo { width: 190px; height: auto; margin: .1rem 0; }
@media (max-width: 600px) { .logo__img { height: 56px; } }
