:root {
  --ink: #17181a;
  --graphite: #3f4145;
  --muted: #70747b;
  --line: #e7e4df;
  --paper: #f7f5f1;
  --white: #ffffff;
  --orange: #f5822a;
  --orange-dark: #d96512;
  --blue: #3434a5;
  --shadow: 0 24px 70px rgba(22, 23, 26, .14);
  --radius: 24px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(245,130,42,.55); outline-offset: 3px; }

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.section { padding: 104px 0; }
.section--soft { background: var(--paper); }
.section--dark { background: var(--ink); color: var(--white); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--orange-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; }
.section-title { margin: 0; font-size: clamp(2rem, 5vw, 4.6rem); line-height: 1.03; letter-spacing: -.045em; }
.section-lead { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.section--dark .section-lead { color: rgba(255,255,255,.68); }

.topbar { background: var(--ink); color: rgba(255,255,255,.78); font-size: .82rem; }
.topbar__inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar__links { display: flex; align-items: center; gap: 18px; }
.topbar a:hover { color: var(--white); }
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(28,29,31,.08);
}
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand img { width: 72px; height: 48px; object-fit: contain; }
.brand__text { display: grid; line-height: 1.05; }
.brand__text strong { letter-spacing: .12em; font-size: .88rem; }
.brand__text small { color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: .92rem; font-weight: 700; }
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -9px; height: 2px; background: var(--orange); transition: right .25s ease; }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { right: 0; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 12px; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); transition: .25s; }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: var(--white); box-shadow: 0 12px 30px rgba(245,130,42,.28); }
.btn--primary:hover { background: var(--orange-dark); box-shadow: 0 16px 38px rgba(245,130,42,.34); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--ghost { border-color: rgba(255,255,255,.32); color: var(--white); background: rgba(255,255,255,.04); }
.btn--outline { border-color: var(--line); background: var(--white); }
.btn--small { min-height: 42px; padding-inline: 18px; font-size: .86rem; }
.arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.hero { position: relative; min-height: calc(100vh - 114px); display: grid; align-items: stretch; overflow: hidden; background: var(--ink); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.86) contrast(1.02); transform: scale(1.04); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,16,18,.92) 0%, rgba(15,16,18,.72) 43%, rgba(15,16,18,.16) 78%), linear-gradient(0deg, rgba(15,16,18,.35), transparent 45%); }
.hero__content { position: relative; z-index: 2; color: var(--white); padding: 112px 0 82px; display: grid; grid-template-columns: minmax(0, 760px) 1fr; align-items: end; gap: 50px; }
.hero h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.9rem); line-height: .93; letter-spacing: -.065em; max-width: 820px; }
.hero h1 span { color: var(--orange); }
.hero__copy { max-width: 650px; margin: 28px 0 0; color: rgba(255,255,255,.82); font-size: clamp(1rem, 2vw, 1.28rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__proof { align-self: end; justify-self: end; width: min(100%, 310px); padding: 26px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); background: rgba(255,255,255,.09); backdrop-filter: blur(15px); }
.hero__proof strong { display: block; font-size: 3.2rem; line-height: 1; color: var(--orange); }
.hero__proof p { margin: 12px 0 0; color: rgba(255,255,255,.76); }
.hero__scroll { position: absolute; right: 24px; bottom: 30px; z-index: 2; color: rgba(255,255,255,.6); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; writing-mode: vertical-rl; }

.metrics { border-bottom: 1px solid var(--line); background: var(--white); }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 34px 28px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; font-size: 1.55rem; line-height: 1.15; }
.metric span { color: var(--muted); font-size: .9rem; }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.split__media::before { content: ""; position: absolute; left: -20px; bottom: -20px; width: 48%; height: 42%; border: 2px solid var(--orange); border-radius: 20px; z-index: -1; }
.quote-card { position: absolute; right: -28px; bottom: 36px; width: min(80%, 330px); padding: 24px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow); }
.quote-card strong { display: block; margin-bottom: 8px; }
.quote-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.checks { display: grid; gap: 15px; margin: 30px 0 0; }
.check { display: flex; align-items: flex-start; gap: 14px; }
.check__icon { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(245,130,42,.13); color: var(--orange-dark); font-weight: 900; }
.check p { margin: 0; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.service-card { position: relative; min-height: 310px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.service-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); border-color: rgba(245,130,42,.35); }
.service-card__num { color: var(--orange); font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.service-card h3 { margin: 68px 0 12px; font-size: 1.55rem; line-height: 1.1; }
.service-card p { margin: 0; color: var(--muted); }
.service-card__link { position: absolute; left: 32px; bottom: 28px; font-weight: 800; }
.service-card::after { content: ""; position: absolute; right: -44px; top: -44px; width: 110px; height: 110px; border: 1px solid rgba(245,130,42,.28); border-radius: 50%; transition: transform .3s ease; }
.service-card:hover::after { transform: scale(1.2); }

.projects-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; margin-top: 48px; }
.project-card { position: relative; min-height: 420px; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: var(--white); }
.project-card:nth-child(1), .project-card:nth-child(4) { grid-column: span 7; }
.project-card:nth-child(2), .project-card:nth-child(3) { grid-column: span 5; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15,16,18,.86), transparent 62%); }
.project-card:hover img { transform: scale(1.05); }
.project-card__body { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 25px; }
.project-card__meta { color: rgba(255,255,255,.7); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.project-card h3 { margin: 7px 0 0; font-size: clamp(1.35rem, 3vw, 2.2rem); line-height: 1.05; }

.process { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.process__sticky { position: sticky; top: 130px; }
.process__steps { display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 58px 1fr; gap: 18px; padding: 25px; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.035); }
.step__num { width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; display: grid; place-items: center; color: var(--orange); font-weight: 900; }
.step h3 { margin: 0 0 5px; }
.step p { margin: 0; color: rgba(255,255,255,.65); }

.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.trust-card { padding: 27px; border: 1px solid var(--line); border-radius: 18px; }
.trust-card strong { display: block; font-size: 1.1rem; }
.trust-card p { margin: 8px 0 0; color: var(--muted); font-size: .93rem; }

.faq { max-width: 900px; margin: 45px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; padding: 24px 4px; cursor: pointer; font-size: 1.1rem; font-weight: 800; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 1.6rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq__answer { padding: 0 40px 24px 4px; color: var(--muted); }

.cta-band { position: relative; overflow: hidden; padding: 82px 0; background: var(--orange); color: var(--white); }
.cta-band::before { content: "JEA"; position: absolute; right: -20px; top: -95px; font-size: 17rem; font-weight: 900; letter-spacing: -.09em; color: rgba(255,255,255,.12); }
.cta-band__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-band h2 { margin: 0; max-width: 720px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.045em; }

.page-hero { padding: 106px 0 80px; background: var(--ink); color: var(--white); }
.page-hero__grid { display: grid; grid-template-columns: 1fr .7fr; gap: 60px; align-items: end; }
.page-hero h1 { margin: 0; font-size: clamp(3rem, 7vw, 6rem); line-height: .95; letter-spacing: -.055em; }
.page-hero p { margin: 0; color: rgba(255,255,255,.7); font-size: 1.1rem; }
.breadcrumb { margin-bottom: 22px; color: rgba(255,255,255,.58); font-size: .84rem; }
.breadcrumb a:hover { color: var(--white); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0; }
.filter-btn { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-weight: 800; }
.filter-btn.is-active, .filter-btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery-card { border-radius: 20px; overflow: hidden; background: var(--white); border: 1px solid var(--line); transition: .25s; }
.gallery-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gallery-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-card__body { padding: 22px; }
.gallery-card__body span { color: var(--orange-dark); font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.gallery-card h3 { margin: 8px 0 6px; line-height: 1.15; }
.gallery-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.gallery-card.is-hidden { display: none; }

.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; }
.contact-panel { padding: 34px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.contact-panel h2 { margin-top: 0; }
.contact-list { display: grid; gap: 18px; margin-top: 30px; }
.contact-item { padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.contact-item:last-child { border-bottom: 0; }
.contact-item span { display: block; color: rgba(255,255,255,.56); font-size: .77rem; text-transform: uppercase; letter-spacing: .12em; }
.contact-item strong { display: block; margin-top: 4px; }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .85rem; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; background: var(--white); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(245,130,42,.12); }
.field textarea { min-height: 130px; resize: vertical; }
.consent { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .83rem; }
.consent input { margin-top: 5px; }
.form-status { min-height: 24px; font-size: .9rem; font-weight: 700; }
.form-status.is-error { color: #a82020; }
.form-status.is-success { color: #167546; }

.footer { background: #101113; color: var(--white); padding: 70px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.35fr .75fr .75fr 1fr; gap: 45px; }
.footer__brand img { width: 110px; height: 74px; object-fit: contain; background: var(--white); border-radius: 12px; padding: 5px; }
.footer__brand p { max-width: 370px; color: rgba(255,255,255,.58); }
.footer h3 { margin: 0 0 18px; font-size: .95rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: rgba(255,255,255,.62); }
.footer a:hover { color: var(--white); }
.footer__bottom { margin-top: 54px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.48); font-size: .78rem; }

.whatsapp-float { position: fixed; z-index: 60; right: 22px; bottom: 22px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 16px 38px rgba(37,211,102,.35); font-weight: 900; transition: transform .2s; }
.whatsapp-float:hover { transform: translateY(-4px) scale(1.03); }
.whatsapp-float svg { width: 27px; height: 27px; fill: currentColor; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

.legal { max-width: 840px; }
.legal h2 { margin-top: 42px; }
.legal p, .legal li { color: var(--muted); }
.notice { padding: 18px 20px; border-left: 4px solid var(--orange); background: rgba(245,130,42,.08); border-radius: 0 14px 14px 0; }

@media (max-width: 980px) {
  .topbar { display: none; }
  .menu-toggle { display: block; }
  .nav__links { position: fixed; inset: 78px 20px auto; display: grid; gap: 0; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); transform: translateY(-15px); opacity: 0; pointer-events: none; transition: .25s; }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 13px 10px; }
  .nav__actions .btn { display: none; }
  .hero { min-height: 760px; }
  .hero__content { grid-template-columns: 1fr; align-content: end; padding-top: 90px; }
  .hero__proof { justify-self: start; }
  .hero__scroll { display: none; }
  .metrics__grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .split, .process, .contact-layout, .page-hero__grid { grid-template-columns: 1fr; }
  .process__sticky { position: static; }
  .service-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .project-card, .project-card:nth-child(n) { grid-column: span 6; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, var(--max)); }
  .section { padding: 76px 0; }
  .brand__text { display: none; }
  .brand { min-width: auto; }
  .brand img { width: 62px; }
  .hero { min-height: 720px; }
  .hero__content { padding: 90px 0 50px; }
  .hero h1 { font-size: clamp(2.75rem, 15vw, 4.5rem); }
  .hero__proof { width: 100%; }
  .metrics__grid, .service-grid, .gallery, .trust-grid, .footer__grid, .form-row { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .split__media::before, .quote-card { display: none; }
  .project-card, .project-card:nth-child(n) { grid-column: 1 / -1; min-height: 360px; }
  .projects-header, .cta-band__inner, .footer__bottom { align-items: flex-start; flex-direction: column; }
  .cta-band::before { font-size: 10rem; top: -40px; }
  .whatsapp-float { right: 14px; bottom: 14px; }
}

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


/* Robustez de carga y accesibilidad */
img { background: #ece9e3; }
img.is-broken { min-height: 180px; object-fit: contain; padding: 24px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
