
:root{
  --navy:#123b5d;
  --navy-dark:#0c2c45;
  --teal:#2bb7a5;
  --ink:#16212b;
  --muted:#65717d;
  --line:#dfe6eb;
  --soft:#f6f9fb;
  --white:#ffffff;
  --radius:16px;
  --shadow:0 8px 22px rgba(15,46,72,.045);
  --header-h:58px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--white);
  line-height:1.45;
}
main{flex:1}
a{color:inherit}
img{max-width:100%;display:block}
.wrap{width:min(1180px,calc(100% - 36px));margin:0 auto}

/* FIXED HEADER */
.site-header{
  position:fixed;
  inset:0 0 auto 0;
  z-index:100;
  height:var(--header-h);
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
}
.nav-wrap{
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
}
.brand{
  display:flex;
  align-items:center;
  height:100%;
}
.brand img{
  width:clamp(170px,14vw,205px);
  height:auto;
  max-height:42px;
  object-fit:contain;
}
.nav{
  display:flex;
  align-items:center;
  gap:clamp(16px,2vw,24px);
  font-size:14px;
  font-weight:600;
}
.nav a{text-decoration:none}

/* GLOBAL PAGE FIT */
.page-shell{
  min-height:calc(100dvh - var(--header-h));
  padding:
    calc(var(--header-h) + clamp(16px,2.5vh,26px))
    0
    clamp(16px,2.2vh,24px);
}
.page-shell.section-soft{background:var(--soft)}

.page-heading{
  max-width:900px;
  margin-bottom:clamp(14px,2.4vh,24px);
}
.eyebrow{
  margin:0 0 7px;
  color:var(--teal);
  font-size:10px;
  font-weight:800;
  letter-spacing:.18em;
}
.eyebrow-light{color:#9ce4d9}

h1,h2,h3{margin-top:0;color:var(--navy-dark)}
h1{
  margin-bottom:10px;
  font-size:clamp(30px,min(3.4vw,5.5vh),48px);
  line-height:1.03;
  letter-spacing:-.04em;
}
h2{
  margin-bottom:8px;
  font-size:clamp(26px,min(2.8vw,4.8vh),36px);
  line-height:1.06;
  letter-spacing:-.03em;
}
h3{
  margin-bottom:7px;
  font-size:clamp(17px,min(1.5vw,2.6vh),19px);
  line-height:1.18;
}
p{margin-top:0}
.lead{
  color:var(--muted);
  font-size:clamp(14px,min(1.25vw,2.2vh),16px);
  max-width:780px;
}

/* BUTTONS */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 16px;
  border-radius:9px;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  border:1px solid transparent;
}
.btn-primary{background:var(--navy);color:#fff}
.btn-primary:hover{background:var(--navy-dark)}
.btn-secondary{background:#fff;color:var(--navy);border-color:var(--line)}
.btn-small{min-height:38px;padding:0 13px}
.btn-accent{background:var(--teal);color:#082b27}
.btn-dark-outline{color:#fff;border-color:#6f889a;background:transparent}

/* SHARED PANEL */
.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

/* HOME */
.home-page{background:linear-gradient(180deg,#fff 0%,#f8fbfc 100%)}
.hero-grid{
  display:grid;
  grid-template-columns:1.12fr .88fr;
  gap:clamp(26px,3vw,40px);
  align-items:center;
}
.hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:clamp(12px,2vh,18px) 0 12px;
}
.hero-proof{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  color:var(--muted);
  font-size:12px;
}
.hero-proof span::before{
  content:"✓";
  margin-right:6px;
  color:var(--teal);
  font-weight:800;
}
.problem-panel{padding:clamp(18px,2.5vh,22px)}
.problem-panel ul{margin:0;padding-left:20px}
.problem-panel li{margin:clamp(4px,.8vh,7px) 0}
.panel-note{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
  color:var(--navy);
  font-size:14px;
  font-weight:700;
}
.home-links{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:clamp(14px,2.4vh,22px);
}
.mini-card{
  text-decoration:none;
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  padding:13px 15px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:2px 10px;
  align-items:center;
}
.mini-index{
  grid-row:1/3;
  width:32px;height:32px;
  border-radius:9px;
  display:grid;place-items:center;
  background:#e7f7f4;
  color:var(--teal);
  font-weight:800;
}
.mini-card strong{color:var(--navy-dark);font-size:14px}
.mini-card small{color:var(--muted);font-size:12px}

/* SERVICES / CASES */
.grid-3{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:clamp(12px,1.5vw,18px);
}
.service-card{padding:clamp(17px,2.4vh,21px)}
.service-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;height:34px;
  margin-bottom:12px;
  border-radius:9px;
  background:#e7f7f4;
  color:var(--teal);
  font-weight:800;
}
.service-card p{color:var(--muted);font-size:clamp(14px,min(1.1vw,2vh),15px)}
.plain-list{
  margin:10px 0 0;
  padding-left:17px;
  font-size:clamp(14px,min(1.1vw,2vh),15px);
}
.plain-list li{margin:4px 0}

.case-card{overflow:hidden}
.case-visual{
  width:100%;
  aspect-ratio:16/7.6;
  object-fit:cover;
  background:#eef4f7;
  border-bottom:1px solid var(--line);
}
.case-content{padding:clamp(15px,2vh,18px)}
.case-type{
  margin-bottom:6px;
  color:var(--teal);
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
}
.case-subtitle{font-weight:700;color:var(--navy);font-size:14px}
.case-content > p:last-of-type{
  color:var(--muted);
  font-size:clamp(13px,min(1vw,1.9vh),14px);
  margin-bottom:6px;
}
.text-link{
  display:inline-block;
  margin-top:4px;
  color:var(--navy);
  font-size:14px;
  font-weight:800;
  text-decoration:none;
}

/* METHOD */
.process{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  background:#fff;
}
.process-step{
  padding:clamp(14px,2.2vh,18px) 16px;
  border-right:1px solid var(--line);
}
.process-step:last-child{border-right:0}
.process-number{
  width:26px;height:26px;
  margin-bottom:9px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--teal);
  color:#fff;
  font-size:11px;
  font-weight:800;
}
.process-step p{
  color:var(--muted);
  margin-bottom:0;
  font-size:clamp(13px,min(1vw,1.9vh),14px);
}
.method-note{
  margin-top:clamp(10px,1.7vh,16px);
  padding:13px 16px;
}
.method-note strong{font-size:14px}
.method-note p{margin:3px 0 0;color:var(--muted);font-size:13px}

/* CONTACT */
.contact-panel{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:26px;
  align-items:center;
  padding:clamp(24px,3.5vh,32px);
  border-radius:22px;
  background:var(--navy-dark);
  color:#fff;
}
.contact-panel h2{color:#fff}
.contact-panel p{color:#c9d5dd;font-size:14px}
.contact-actions{display:flex;flex-direction:column;gap:9px}
.contact-meta{margin:5px 0 0!important;font-size:12px}

/* FOOTER */
footer{
  border-top:1px solid var(--line);
  padding:12px 0;
  background:#fff;
}
.footer-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:20px;
}
.footer-logo{
  width:150px;
  height:auto;
}
.footer-row p{margin:0;color:var(--muted);font-size:12px}
.footer-end{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  color:var(--muted);
  font-size:11px;
}
.footer-end a{color:var(--navy);font-weight:600;text-decoration:none}

/* RESPONSIVE WIDTH */
@media (max-width:980px){
  .hero-grid,.contact-panel{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .home-links{grid-template-columns:1fr}
  .process{grid-template-columns:1fr 1fr}
  .process-step:nth-child(2n){border-right:0}
  .process-step{border-bottom:1px solid var(--line)}
}
@media (max-width:760px){
  :root{--header-h:56px}
  .nav a:not(.btn){display:none}
  .brand img{width:170px;max-height:36px}
  .page-shell{padding-top:calc(var(--header-h) + 18px)}
  h1{font-size:34px}
  .process{grid-template-columns:1fr}
  .process-step{border-right:0;border-bottom:1px solid var(--line)}
  .footer-row{grid-template-columns:1fr}
  .footer-end{align-items:flex-start}
}
@media (max-width:560px){
  .wrap{width:min(100% - 22px,1180px)}
  .problem-panel,.service-card,.case-content{padding:16px}
  .contact-panel{padding:22px 18px}
  h1{font-size:30px}
}

/* RESPONSIVE HEIGHT — desktop screens with less vertical space */
@media (min-width:981px) and (max-height:850px){
  :root{--header-h:54px}
  .brand img{width:185px;max-height:38px}
  .page-shell{
    min-height:calc(100dvh - var(--header-h));
    padding-top:calc(var(--header-h) + 14px);
    padding-bottom:12px;
  }
  .page-heading{margin-bottom:13px}
  h1{font-size:clamp(30px,min(3.1vw,5vh),43px)}
  h2{font-size:30px}
  .lead{font-size:14px}
  .service-card{padding:16px}
  .plain-list li{margin:3px 0}
  .case-visual{aspect-ratio:16/6.8}
  .case-content{padding:13px 15px}
  .process-step{padding:12px 14px}
  .method-note{margin-top:10px;padding:10px 14px}
  .contact-panel{padding:22px 26px}
  footer{padding:8px 0}
  .footer-logo{width:135px}
}
@media (min-width:981px) and (max-height:730px){
  .page-shell{padding-top:calc(var(--header-h) + 10px)}
  h1{font-size:36px}
  .page-heading{margin-bottom:10px}
  .case-visual{aspect-ratio:16/5.8}
  .service-card{padding:13px 15px}
  .process-step{padding:10px 12px}
  .problem-panel{padding:16px}
  .home-links{margin-top:10px}
}


/* =========================================================
   v0.9 — BODY FIT + CASE CARD CONTENT SAFETY
   Header/footer from v0.8 intentionally preserved.
   ========================================================= */

:root{
  --footer-estimate: 62px;
}

/* Use the full available space between fixed header and footer */
.page-shell{
  min-height:calc(100dvh - var(--footer-estimate));
  display:flex;
  flex-direction:column;
}

.page-shell > .wrap{
  width:min(1180px,calc(100% - 36px));
  flex:1;
  display:flex;
  flex-direction:column;
}

/* Services: let the cards occupy the useful body height naturally */
body.servicios .grid-3{
  flex:1;
  align-items:stretch;
}

body.servicios .service-card{
  display:flex;
  flex-direction:column;
  height:100%;
}

/* Cases: cards must grow with text; no forced clipping */
body.casos .grid-3{
  flex:1;
  align-items:stretch;
}

body.casos .case-card{
  display:flex;
  flex-direction:column;
  height:auto;
  min-height:0;
  overflow:hidden;
}

body.casos .case-visual{
  flex:0 0 auto;
  width:100%;
  height:auto;
  aspect-ratio:16/7.1;
  object-fit:contain;
  object-position:center;
  background:#eef4f7;
}

body.casos .case-content{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  min-height:0;
}

body.casos .case-content p{
  overflow:visible;
}

body.casos .text-link{
  margin-top:auto;
  padding-top:6px;
}

/* Method: fill available body instead of leaving large empty lower area */
body.metodo .process{
  flex:0 0 auto;
}

body.metodo .method-note{
  flex:0 0 auto;
}

/* Contact: keep the body balanced vertically */
body.contacto .contact-wrap{
  justify-content:flex-start;
}

/* Desktop: use remaining viewport height more effectively */
@media (min-width:981px){
  body.servicios .grid-3{
    min-height:clamp(330px,46vh,470px);
  }

  body.casos .grid-3{
    min-height:clamp(360px,49vh,500px);
  }

  body.metodo .process{
    min-height:clamp(180px,27vh,260px);
  }

  body.contacto .contact-panel{
    min-height:clamp(190px,28vh,260px);
  }
}

/* Low-height desktop screens: never clip the case content */
@media (min-width:981px) and (max-height:850px){
  body.casos .case-visual{
    aspect-ratio:16/6.4;
  }

  body.casos .grid-3{
    min-height:0;
  }

  body.servicios .grid-3{
    min-height:0;
  }

  body.casos .case-content{
    padding:12px 14px;
  }

  body.casos .case-content > p:last-of-type{
    line-height:1.35;
  }
}

/* If viewport is short, page is allowed to scroll instead of cropping */
@media (min-width:981px) and (max-height:700px){
  .page-shell{
    min-height:auto;
  }

  body.casos .case-card,
  body.servicios .service-card{
    height:auto;
  }
}

/* Mobile/tablet: natural document flow */
@media (max-width:980px){
  .page-shell{
    min-height:auto;
  }

  .page-shell > .wrap{
    display:block;
  }

  body.servicios .service-card,
  body.casos .case-card{
    height:auto;
  }

  body.casos .case-visual{
    aspect-ratio:16/9;
  }
}
