/* Retícula editorial sobre v6.1. Los recursos aprobados se sirven intactos. */
:root {
  --editorial-gutter: clamp(18px, 4vw, 58px);
  --editorial-column: clamp(206px, 19.5vw, 272px);
  --editorial-rule: #dcd6cc;
  --idem-petrol: #004f43;
  --idem-action: linear-gradient(#086e59, #00392f);
}
html { scroll-behavior: auto; }

html[lang] body :is(.goal, .system, .service-detail, .experience, .process, .founder-faq) {
  padding-inline: var(--editorial-gutter) !important;
  padding-block: 16px !important;
  border-bottom: 1px solid var(--editorial-rule);
}

.topbar .nav :is(a, button), .topbar .lang-switch button {
  font-size: 14px;
}
.topbar .lang-switch button { min-width: 30px; min-height: 38px; }
.topbar .menu-btn { min-width: 44px; min-height: 44px; }
.topbar .brand-tag { font-size: 13px; }
.topbar .idem-brand-image { width: 113px; height: auto; }
.topbar .nav-actions > .btn { min-height: 36px; font-size: 13px; }
.topbar :is(a, button):focus-visible, .goal-card:focus-visible, .rec-close:focus-visible {
  outline: 2px solid #B65B46;
  outline-offset: 3px;
}

html[lang] body .hero { min-height: clamp(248px, 20vw, 290px) !important; }
html[lang] body .hero-copy {
  padding: 20px 8px 20px var(--editorial-gutter) !important;
}
html[lang] body .hero-copy::after {
  width: clamp(78px, 10.5vw, 148px) !important;
}
html[lang] body .hero h1 {
  font-size: clamp(30px, 2.76vw, 42px) !important;
  line-height: 1.02 !important;
}
html[lang] body .hero-lead {
  max-width: 51ch !important;
  font-size: clamp(13px, 1.03vw, 15px) !important;
  margin: 9px 0 13px !important;
}
html[lang] body :is(.hero, .final-cta) .cta-row > .btn {
  min-height: 40px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
  gap: 7px;
}
.hero .whatsapp-link::before, .final-cta .whatsapp-link::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M20.5%2011.5A8.5%208.5%200%200%201%208%2019l-5%201.4L4.4%2016a8.5%208.5%200%201%201%2016.1-4.5Z%22%2F%3E%3Cpath%20d%3D%22M8%207.5c-.8.7-.3%203.5%201.8%205.6s5%202.7%205.8%201.8l1-1.4-2.8-1.5-1%201c-1.4-.5-2.5-1.6-3-3l.9-1L9.4%206.6Z%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}
.hero .cta-row .btn-primary, html[lang] body .final-cta .cta-row .btn-light {
  color: #fff;
  background: var(--idem-action);
  border: 1px solid #388477;
  box-shadow: none;
}

html[lang] body .goal { min-height: 0 !important; }
html[lang] body .goal-card {
  min-height: 100px !important;
  border-radius: 9px;
}
.goal-icon .symbol { width: 34px; height: 34px; }
html[lang] body .goal-card[aria-pressed="true"] {
  background: linear-gradient(145deg, #07614f, #003b32);
  border-color: var(--idem-petrol);
  color: #fff;
}
.goal-card[aria-pressed="true"] :is(.goal-icon, b) { color: #fff; }
html[lang] body .goal-recommendation:not([hidden]) {
  padding: 21px 34px 21px 20px !important;
  gap: clamp(13px, 1.65vw, 25px) !important;
  align-items: center;
}
.goal-recommendation :is(.rec-identification, .rec-description, .rec-outcome) { min-width: 0; }
html[lang] body .goal-recommendation :is(.rec-description, .rec-outcome) p {
  font-size: 15px;
  line-height: 1.4;
}
.rec-close { min-width: 36px; min-height: 36px; }

/* Las curvas y los nodos conservan su SVG y sus proporciones intrínsecas. */
html[lang] body .system {
  min-height: 0 !important;
  height: auto !important;
  padding-bottom: 0 !important;
  align-items: center;
}
html[lang] body .system > .section-intro { padding-bottom: 14px; }
html[lang] body .system .journey-wrap {
  display: grid;
  align-items: start;
  container-type: inline-size;
  min-height: 0 !important;
  align-self: end;
}
html[lang] body .system .idem-curves {
  inset: 0 0 auto;
  height: auto;
}
html[lang] body .system .idem-route {
  inset: auto 0 0;
  height: auto;
}
html[lang] body .system .mountain-terrain {
  height: 7.9cqw !important;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 91%, transparent),
              linear-gradient(180deg, transparent, #000 26%);
}
html[lang] body .system .journey-cards {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 6.05cqw 3.3% max(7.7cqw, 45px) 8.4%;
}
html[lang] body .system .journey-cards button:nth-child(n) {
  position: relative;
  left: auto;
  width: auto;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  transform: none !important;
  padding-inline: 4px !important;
}
html[lang] body .system .journey-cards h3 {
  font-size: clamp(17px, 2.45cqw, 27px) !important;
  margin-bottom: 3px !important;
}
html[lang] body .system .journey-cards p {
  font-size: clamp(12px, 1.37cqw, 15px) !important;
  line-height: 1.22 !important;
  margin-inline: auto;
  max-width: 17ch;
}

/* Una cabecera óptica común deja los cuatro textos en la misma línea. */
html[lang] body .experience .experience-main { align-items: start; padding-block: 0 12px !important; }
html[lang] body .experience .evidence-card { align-self: stretch; }
html[lang] body .experience :is(.logo-row, .wordmark.tif) {
  height: 79px !important;
  min-height: 79px !important;
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
}
html[lang] body .experience .celulas-card .logo-row img { width: 58px !important; height: 58px !important; }
html[lang] body .experience .logo-row .logo-concamin { width: 122px !important; height: 77px !important; object-position: center; }
html[lang] body .experience .logo-row .logo-coppel { width: 143px !important; object-position: center; }
html[lang] body .experience .wordmark.tif .idem-tif { width: min(100%, 153px); padding: 5px 7px; }
html[lang] body .experience .evidence-card p { margin-top: 0 !important; font-size: clamp(12px, 1.03vw, 15px) !important; }
.experience .celulas-card strong { font-size: clamp(13px, 1.08vw, 16px); }
html[lang] body .experience .cases {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  min-height: 0 !important;
}
html[lang] body .case-card {
  min-height: 117px !important;
  padding: 12px 16px !important;
  background-position: 72% center !important;
}
html[lang] body .case-card::before {
  background: linear-gradient(90deg, #041a17cc, #051b17a3 42%, transparent 76%) !important;
}
html[lang] body .case-card.sand::before {
  background: linear-gradient(90deg, #291c0fbd, #301a0bc2 42%, transparent 76%) !important;
}
html[lang] body .case-card > div { max-width: 63%; }
html[lang] body .case-card p { color: #fff; font-size: clamp(12px, 1vw, 14px) !important; line-height: 1.28 !important; }
html[lang] body .case-card > .case-arrow {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #172824a3;
  color: #fff;
  font: 400 21px/1 'IBM Plex Sans', sans-serif;
}

/* El área reservada al relieve respeta la relación 2172:230 de VIS-20 v3. */
html[lang] body .process { min-height: 0 !important; padding-bottom: 0 !important; height: auto !important; }
html[lang] body .process > .section-intro { padding-bottom: 13px; }
html[lang] body .process .process-track {
  container-type: inline-size;
  min-height: 0 !important;
  padding: 0 !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}
html[lang] body .process .process-line {
  top: 14px !important;
  inset-inline: 7.8% 10.5%;
}
html[lang] body .process .process-terrain {
  display: block !important;
  position: relative;
  grid-row: 2;
  grid-column: 1 / -1;
  align-self: end;
  aspect-ratio: 2172 / 230;
  height: auto !important;
  background-size: 100% auto !important;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent),
              linear-gradient(0deg, transparent, #000 20%, #000 82%, transparent);
  mask-composite: intersect;
}
html[lang] body .process .process-track article {
  grid-row: 1;
  padding: 35px 8px 0 !important;
  min-width: 0;
}
html[lang] body .process .process-track b {
  left: calc(var(--idem-station, 42%) - 14px) !important;
}
.process-track article:nth-of-type(1) { --idem-station: 46.8%; }
.process-track article:nth-of-type(2) { --idem-station: 36.0%; }
.process-track article:nth-of-type(3) { --idem-station: 42.7%; }
.process-track article:nth-of-type(4) { --idem-station: 39.5%; }
.process-track article:nth-of-type(5) { --idem-station: 36.5%; }
.process-track article:nth-of-type(6) { --idem-station: 36.8%; }
html[lang] body .process .process-track h3 { font-size: clamp(13px, 1.08vw, 15px) !important; }
html[lang] body .process .process-track p { font-size: clamp(12px, 1vw, 14px) !important; }

/* La órbita se recorta en su propia caja. El PNG queda por delante y llega al pie. */
html[lang] body .founder-faq { padding-bottom: 0 !important; }
html[lang] body .founder-card {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr) !important;
  align-items: center;
  align-self: end;
  gap: clamp(11px, 1.65vw, 24px);
}
html[lang] body .founder-card .portrait-wrap {
  height: clamp(166px, 16vw, 226px) !important;
  min-height: 0 !important;
  overflow: visible;
  align-self: end;
}
html[lang] body .founder-card .portrait-orbit {
  background-position: center 27px !important;
  background-size: 100% auto !important;
}
html[lang] body .founder-card .portrait-wrap img {
  position: absolute !important;
  inset: auto 0 0 !important;
  width: min(90%, 239px) !important;
  max-width: none !important;
  max-height: none !important;
  height: auto !important;
  display: block;
  margin: 0 auto !important;
}
.founder-card .founder-copy { text-align: left; padding-block: 5px 14px; }
.founder-card .founder-copy strong { display: block; line-height: 1.28; }
.founder-card .founder-copy p:not(.eyebrow) { font-size: clamp(13px, 1vw, 15px); }
.founder-faq .faq { padding-bottom: 14px; }
.founder-faq .faq summary { list-style: none; }

html[lang] body .final-cta {
  min-height: 104px !important;
  padding: 15px var(--editorial-gutter) !important;
}
html[lang] body .final-cta .btn-ghost-light {
  border-color: #a3bfb0;
  color: #fff;
  background: #06392ede;
}
html[lang] body .footer { padding: 10px var(--editorial-gutter); gap: 12px 18px; }
html[lang] body .footer .idem-brand-image {
  width: 135px;
  height: auto;
  border-radius: 0;
  padding: 0;
  background: none;
}
html[lang="es"] body .footer .brand-tag {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
html[lang] body .footer .footer-links :is(a, button) { font-size: 12px; }
html[lang] body .footer small { font-size: 11px; }

@media (min-width: 1101px) {
  html[lang] body .hero-copy::after { display: none; }
  html[lang] body .hero-visual {
    position: absolute;
    inset: 0 0 0 34%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 23% 100%);
  }
  html[lang="en"] body .hero-visual { inset-inline-start: 37%; }
  html[lang="en"] body .hero h1 { font-size: clamp(30px, 2.61vw, 39px) !important; }
  html[lang] body :is(.goal, .system, .process),
  html[lang] body .experience :is(.experience-main, .cases) {
    grid-template-columns: var(--editorial-column) minmax(0, 1fr);
    gap: 14px;
  }
  html[lang] body .experience .cases { grid-template-columns: var(--editorial-column) repeat(2, minmax(0, 1fr)); }
  html[lang] body .goal-recommendation:not([hidden]) {
    grid-template-columns: .92fr 1fr 1fr 1.1fr !important;
  }
  html[lang] body .founder-faq { grid-template-columns: 1.02fr 1fr !important; }
  html[lang] body .final-cta {
    grid-template-columns: 1.05fr .65fr minmax(max-content, .9fr);
    column-gap: 16px;
    background-image: linear-gradient(90deg, #06392f 49%, #06392fb3 66%, #06392f26 100%),
      image-set(url('/assets/VIS-23-1280w.webp') 1x, url('/assets/VIS-23.webp') 2x) !important;
    background-size: 100% 100%, max(47%, 620px) auto !important;
    background-position: center, right 32% !important;
  }
}

@media (max-width: 850px) {
  html[lang] body .hero { min-height: 0 !important; }
  html[lang] body .hero-copy { padding: 18px var(--editorial-gutter) 13px !important; }
  html[lang] body .hero h1 { font-size: clamp(29px, 6vw, 47px) !important; }
  html[lang] body .hero-lead { max-width: 58ch !important; }
  html[lang] body .hero-visual { height: clamp(140px, 29vw, 224px) !important; }
  html[lang] body .system { padding-top: 16px !important; }
  html[lang] body .system > .section-intro { padding-bottom: 0; }
  html[lang] body .process .process-line { display: block !important; }
  html[lang] body .founder-card { grid-template-columns: minmax(0, 38%) minmax(0, 1fr) !important; }
  html[lang] body .founder-card .portrait-wrap { height: min(29vw, 210px) !important; }
  html[lang] body .footer .footer-links { justify-content: center; }
}

@media (max-width: 620px) {
  html[lang] body :is(.goal, .service-detail, .experience, .process, .founder-faq) { padding-block: 13px !important; }
  html[lang] body .goal-card { min-height: 46px !important; padding-inline: 9px !important; }
  .goal-icon .symbol { width: 26px; height: 26px; }
  html[lang] body .goal-recommendation:not([hidden]) {
    padding: 17px 14px !important;
    gap: 15px !important;
    align-items: stretch !important;
  }
  html[lang] body .goal-recommendation .rec-identification { padding-right: 21px; order: -2; }
  html[lang] body .goal-recommendation .rec-media { order: -1; }
  .rec-outcome .rec-cta { width: 100%; min-height: 44px; }
  html[lang] body .service-tile {
    grid-template-rows: auto auto;
    height: auto;
    min-height: 54px;
  }
  html[lang] body .service-tile :is(strong, small) { text-align: left; justify-self: stretch; }
  html[lang] body .experience .experience-grid { gap: 10px 9px !important; }
  html[lang] body .experience :is(.logo-row, .wordmark.tif) { height: 67px !important; min-height: 67px !important; }
  html[lang] body .experience .celulas-card .logo-row img { width: 46px !important; height: 49px !important; }
  html[lang] body .experience .logo-row .logo-concamin { height: 64px !important; }
  html[lang] body .case-card { background-position: 57% center !important; }
  html[lang] body .case-card > div { max-width: 63%; }
  html[lang] body .process .process-track {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    margin-block: 2px 0;
  }
  html[lang] body .process .process-track article {
    grid-row: auto;
    border: 0;
    background: transparent;
    min-height: 54px !important;
    padding: 7px 0 7px 40px !important;
  }
  html[lang] body .process .process-track b { left: 1px !important; top: 7px !important; }
  html[lang] body .process .process-line {
    inset: 17px auto 59px 13px !important;
    width: 1px;
    height: auto;
  }
  html[lang] body .process .process-terrain {
    order: 1;
    grid-row: auto;
    background-image: image-set(url('/assets/VIS-20-768w.webp') 1x, url('/assets/VIS-20-1280w.webp') 2x) !important;
  }
  html[lang] body .founder-card {
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr) !important;
    grid-template-rows: auto auto 1fr auto auto;
    align-items: start;
    height: auto !important;
    row-gap: 5px !important;
    margin-bottom: 14px;
  }
  html[lang] body .founder-card .portrait-wrap { height: 39vw !important; max-height: 226px; grid-row: 1 / 4; }
  html[lang] body .founder-card .portrait-wrap img { width: 100% !important; }
  html[lang] body .founder-card .portrait-orbit { background-position: center 20px !important; }
  .founder-card .founder-copy { display: contents; }
  .founder-card .founder-copy > :is(.eyebrow, h2, strong) { grid-column: 2; text-align: left; margin: 0; }
  .founder-card .founder-copy > p:not(.eyebrow) { grid-row: 4; grid-column: 1 / -1; margin: 4px 0; text-align: left; }
  .founder-card .founder-copy > .btn { grid-row: 5; grid-column: 1 / -1; justify-self: start; }
  .founder-card .founder-copy h2 { font-size: clamp(21px, 6.05vw, 32px); }
  .founder-faq .faq { margin-top: 12px; padding-bottom: 0; }
  html[lang] body .final-cta.section-shell { width: calc(100% - 2 * var(--editorial-gutter)); margin-inline: auto; }
  html[lang] body .final-cta .btn-ghost-light { background: #F5F2EB; color: #00483c; }
}
