/* Tejado Claro — demo · paleta: azules profundos + verdes; ámbar solo en contacto */
:root {
  --navy-950: #041221;
  --navy-900: #071b30;
  --navy-800: #0b2742;
  --navy-700: #12385a;
  --line: rgba(168, 189, 204, 0.16);
  --ink: #eaf2f6;
  --muted: #a8bdcc;          /* ≈ 9.9:1 sobre navy-950 */
  --green: #43d39e;          /* ≈ 9.6:1 sobre navy-950 */
  --green-deep: #13775a;
  --amber: #f4b740;          /* solo botones de contacto */
  --amber-hi: #ffc95c;
  --amber-ink: #1d1400;      /* ≈ 11:1 sobre ámbar */
  --paper: #eef4f1;
  --paper-ink: #0a1f33;      /* ≈ 15:1 sobre paper */
  --paper-muted: #3b5366;    /* ≈ 7.3:1 sobre paper */
  --radius: 22px;
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 18ch; }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; line-height: 1.2; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--green); }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--navy-950); }
.skip:focus { left: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green); margin-bottom: 1.2rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }

/* Barra de demo */
.demo-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px; text-align: center;
  font-size: .82rem; color: var(--ink);
  background: var(--navy-800); border-bottom: 1px solid var(--line);
}
.demo-bar__tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--green); color: var(--green);
}

/* Botones */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), background-color .25s, box-shadow .35s var(--ease), border-color .25s;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--contact { background: var(--amber); color: var(--amber-ink); box-shadow: 0 10px 30px -14px rgba(244, 183, 64, .9); }
.btn--contact:hover { background: var(--amber-hi); transform: translateY(-2px); box-shadow: 0 18px 40px -16px rgba(244, 183, 64, .95); }
.btn--contact:focus-visible { outline-color: var(--ink); }
.btn--ghost { color: var(--ink); border-color: rgba(234, 242, 246, .28); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--small { min-height: 42px; padding: 0 20px; font-size: .92rem; }
.btn--big { min-height: 60px; padding: 0 32px; font-size: 1.08rem; }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 100;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(4, 18, 33, .82);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; color: var(--green); }
.nav__menu { display: flex; align-items: center; gap: 30px; }
.nav__menu a:not(.btn) { position: relative; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .96rem; transition: color .2s; }
.nav__menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__menu a:not(.btn):hover { color: var(--ink); }
.nav__menu a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; }

/* HERO */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 clamp(70px, 9vw, 120px); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 85% 20%, rgba(19, 119, 90, .28), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(18, 56, 90, .7), transparent 70%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
          mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
  opacity: .35;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title { font-size: clamp(2.6rem, 6.4vw, 5.4rem); max-width: 13ch; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 50ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; margin: 2.2rem 0 0; padding: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; border-top: 1px solid var(--line); }
.trust li { display: inline-flex; align-items: center; gap: 8px; font-size: .93rem; color: var(--ink); }
.trust svg { width: 18px; height: 18px; color: var(--green); flex: none; }

/* Escena ilustrada */
.scene {
  position: relative; margin: 0;
  border-radius: 32px; padding: clamp(10px, 2vw, 22px);
  background: linear-gradient(160deg, rgba(18, 56, 90, .55), rgba(7, 27, 48, .6));
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.scene__svg { width: 100%; height: auto; }
.scene__tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; color: var(--muted); background: rgba(4, 18, 33, .7); border: 1px solid var(--line);
}
.layer { transition: transform .6s var(--ease); will-change: transform; }
.chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; font-size: .86rem; font-weight: 500; color: var(--ink);
  background: rgba(7, 27, 48, .82); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .9);
}
.chip--a { left: -14px; bottom: 26%; }
.chip--b { right: -10px; bottom: 6%; }
.chip__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(67, 211, 158, .2); animation: pulse 2.4s ease-in-out infinite; }
.chip__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--green); background: rgba(67, 211, 158, .12); }
.chip__icon svg { width: 16px; height: 16px; }

.sun-rays { animation: spin 50s linear infinite; }
.glint { animation: glint 7s var(--ease) infinite 1.2s; }
.flow { animation: flow 1.6s linear infinite; }
.beam { animation: flow 3s linear infinite; }
.cells rect { animation: charge 3.6s ease-in-out infinite; }
.cells rect:nth-child(2) { animation-delay: .4s; }
.cells rect:nth-child(3) { animation-delay: .8s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glint {
  0% { transform: skewX(-18deg) translateX(0); }
  45%, 100% { transform: skewX(-18deg) translateX(420px); }
}
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes charge { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(67, 211, 158, .2); } 50% { box-shadow: 0 0 0 8px rgba(67, 211, 158, 0); } }

/* Secciones */
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.section__head { margin-bottom: clamp(40px, 6vw, 70px); }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.section__lead { font-size: clamp(1.02rem, 1.5vw, 1.15rem); max-width: 56ch; }

/* Bento de ventajas */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  position: relative; overflow: hidden;
  padding: 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 56, 90, .38), rgba(7, 27, 48, .5));
  border: 1px solid var(--line);
  transition: border-color .3s, transform .5s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(67, 211, 158, .12), transparent 60%);
  transition: opacity .3s;
}
.tile:hover { border-color: rgba(67, 211, 158, .4); }
.tile:hover::before { opacity: 1; }
.tile p { margin: 0; }
.tile--wide { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.tile--wide h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); max-width: 20ch; }
.tile--wide .tile__text p { max-width: 52ch; }
@media (min-width: 981px) {
  .bento .tile:last-child { grid-column: span 2; }
  .bento .tile:last-child p { max-width: 52ch; }
  .bento .tile:last-child .tile__media { aspect-ratio: 16 / 6; }
}
.tile__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 26px; border-radius: 14px; color: var(--green); background: rgba(67, 211, 158, .1); border: 1px solid rgba(67, 211, 158, .25); }
.tile__icon svg { width: 24px; height: 24px; }

.curve { margin: 0; }
.curve svg { width: 100%; height: auto; overflow: visible; }
.curve__line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .curve__line { stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease) .3s; }
.js .curve__area, .js .curve__use { opacity: 0; transition: opacity 1s ease .9s; }
.js .is-in .curve__line { stroke-dashoffset: 0; }
.js .is-in .curve__area, .js .is-in .curve__use { opacity: 1; }
.curve figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; font-size: .86rem; color: var(--ink); }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; width: 22px; height: 0; border-top: 3px solid var(--green); border-radius: 2px; }
.key--use::before { border-top: 3px dashed #8fc9ff; }
.key__note { color: var(--muted); font-size: .8rem; margin-left: auto; }

/* Testimonios (sección clara) */
.section--light { background: var(--paper); color: var(--paper-ink); }
.section--light h2 { color: var(--paper-ink); }
.section--light h2 em { color: var(--green-deep); }
.section--light .eyebrow { color: var(--green-deep); }
.section--light p { color: var(--paper-muted); }
.notice { display: inline-flex; align-items: center; gap: 12px; max-width: 34ch; margin: 0; font-size: .92rem; }

.badge {
  display: inline-block; flex: none;
  font: 700 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: var(--paper-ink); color: #fff;
}
.badge--dark { background: rgba(67, 211, 158, .14); color: var(--green); border: 1px solid rgba(67, 211, 158, .35); }

.quotes { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: 18px; }
.quote {
  position: relative; margin: 0; display: flex; flex-direction: column; gap: 22px;
  padding: 30px; border-radius: var(--radius);
  background: #fff; border: 1px solid rgba(10, 31, 51, .08);
  box-shadow: 0 30px 60px -45px rgba(10, 31, 51, .45);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.quote:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -45px rgba(10, 31, 51, .55); }
.quote blockquote { margin: 0; flex: 1; }
.quote blockquote p { color: var(--paper-ink); font-size: 1.12rem; line-height: 1.5; margin: 0; }
.quote--feature { grid-row: span 2; }
.quote--feature blockquote p { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.22; }
.quote .badge { align-self: flex-start; }
.badge--float { position: absolute; top: 46px; left: 46px; }
.quote figcaption { display: flex; align-items: center; gap: 14px; }
.quote figcaption strong { display: block; color: var(--paper-ink); font-weight: 600; }
.quote figcaption small { color: var(--paper-muted); font-size: .86rem; }
.avatar {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none;
  font: 600 .9rem/1 var(--sans); color: #fff;
  background: linear-gradient(135deg, #13775a, #12385a);
}
.avatar--b { background: linear-gradient(135deg, #12385a, #1d6c8f); }
.avatar--c { background: linear-gradient(135deg, #0f5a5c, #13775a); }

/* Fotos: el hueco se reserva con aspect-ratio para que nada salte al cargar */
.media {
  position: relative; overflow: hidden; border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(140deg, #12385a, #0f5a5c);
}
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 1.2s var(--ease);
}
.media--169 { aspect-ratio: 16 / 9; }
.media__note {
  position: absolute; right: 12px; bottom: 12px; max-width: calc(100% - 24px);
  padding: 5px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 500; line-height: 1.3; color: #fff;
  background: rgba(4, 18, 33, .78);
}
.quote--feature:hover .media img { transform: scale(1.03); }

.tile--photo { padding-top: 0; }
.tile__media { margin: 0 -30px 24px; border-radius: 0; }
.tile--photo:hover .tile__media img { transform: scale(1.04); }

.card-info__media { margin: 8px -18px 6px; aspect-ratio: 16 / 9; }

/* Contacto */
.contact { overflow: hidden; background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.contact__glow {
  position: absolute; width: 720px; height: 720px; left: 50%; top: 50%; translate: -70% -50%; pointer-events: none;
  background: radial-gradient(circle, rgba(19, 119, 90, .35), transparent 65%);
  filter: blur(10px);
}
.contact__grid { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.contact__title { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 12ch; }
.contact .section__lead { margin-bottom: 2rem; }
.card-info {
  margin: 0; padding: 10px 28px 18px; border-radius: var(--radius);
  background: rgba(11, 39, 66, .6); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card-info__head { padding: 18px 0 8px; }
.card-info__row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.card-info__row:first-of-type { border-top: 0; }
.card-info dt { color: var(--muted); font-size: .9rem; }
.card-info dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

.footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--navy-950); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 40px; }
.footer p { margin: 0; font-size: .88rem; max-width: 60ch; }
.footer .credits { font-size: .8rem; flex-basis: 100%; max-width: none; }
.footer .credits a { color: var(--ink); text-underline-offset: 3px; }
.brand--small { font-size: 1.05rem; }
.brand--small .brand__mark { width: 24px; height: 24px; }

/* Aparición al hacer scroll (solo con JS activo) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .scene { max-width: 620px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--wide { grid-column: span 2; grid-row: auto; }
  .quotes { grid-template-columns: 1fr 1fr; }
  .quote--feature { grid-column: span 2; grid-row: auto; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; cursor: pointer;
    border-radius: 14px; border: 1px solid var(--line); background: rgba(7, 27, 48, .6);
  }
  .nav__toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .js .nav__menu {
    position: absolute; top: 72px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 20px; background: var(--navy-950); border-bottom: 1px solid var(--line);
  }
  .js .nav__menu.is-open { display: flex; }
  .js .nav__menu a:not(.btn) { padding: 14px 4px; font-size: 1.05rem; }
  .js .nav__menu a:not(.btn)::after { display: none; }
  .js .nav__menu .btn { margin-top: 8px; }
  html:not(.js) .nav__toggle { display: none; }
  html:not(.js) .nav__menu { gap: 16px; }
  html:not(.js) .nav__menu a:not(.btn) { display: none; }

  .hero__actions .btn { width: 100%; white-space: normal; text-align: center; }
  .scene { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip { position: static; font-size: .8rem; padding: 8px 11px; }

  .bento { grid-template-columns: 1fr; }
  .tile--wide { grid-column: auto; }
  .tile { padding: 24px; }
  .tile--photo { padding-top: 0; }
  .tile__media { margin: 0 -24px 20px; }
  .card-info__media { margin: 8px -12px 6px; }
  .key__note { margin-left: 0; width: 100%; }
  .curve__axis { font-size: 26px; }

  .quotes { grid-template-columns: 1fr; }
  .quote--feature { grid-column: auto; }
  .quote { padding: 22px; }
  .badge--float { top: 34px; left: 34px; }

  .btn--big { width: 100%; white-space: normal; text-align: center; }
  .card-info { padding: 6px 20px 12px; }
  .card-info__row { grid-template-columns: 1fr; gap: 2px; }
}

/* Movimiento reducido: sin animaciones, todo visible y estático */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .curve__line { stroke-dashoffset: 0; }
  .js .curve__area, .js .curve__use { opacity: 1; }
  .layer { transform: none !important; }
}
