/* 1. Tokens y reglas base */
:root {
  --ink: #172f47; --ink-soft: #23445e; --blue: #315d78; --river: #80c7dc;
  --brown: #946d4f; --copper: #d4a783; --paper: #f5f1e9; --sand: #e9e1d6;
  --white: #fffdfa; --text: #25394a; --muted: #63717a; --line: #d8d2c8;
  --mono: "Monaspace Neon", "SFMono-Regular", Consolas, monospace;
  --sans: "Open Sans", "Segoe UI", Arial, sans-serif;
  --page: 1160px; --gutter: clamp(22px, 5vw, 64px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--river); outline-offset: 4px; }
::selection { background: var(--river); color: var(--ink); }
.container { width: min(var(--page), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section-pad { padding-block: clamp(76px, 9vw, 124px); }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 10px 14px; transform: translateY(-160%); background: var(--white); color: var(--ink); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

/* 2. Marca y navegación */
.site-header { position: relative; z-index: 5; background: var(--ink); color: var(--white); }
.header-inner { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 11px; color: var(--white); text-decoration: none; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid rgba(128,199,220,.7); border-radius: 12px 12px 12px 3px; color: var(--river); font: 600 16px/1 var(--mono); letter-spacing: -.12em; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: -.035em; }
.brand-name > span { color: var(--river); }
.brand-name small { display: block; margin-top: 3px; color: rgba(255,253,250,.59); font: 9px/1.2 var(--mono); }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 38px); }
.site-nav a { color: rgba(255,253,250,.76); font-size: 13px; text-decoration: none; transition: color .18s ease; }
.site-nav a:hover { color: var(--white); }
.site-nav .nav-contact { display: inline-flex; align-items: center; gap: 12px; color: var(--white); }
.nav-contact span { color: var(--river); font-size: 16px; }
.menu-toggle { display: none; }

/* 3. Presentación */
.hero { overflow: hidden; background: radial-gradient(ellipse at 86% 35%, rgba(49,93,120,.4), transparent 35%), var(--ink); color: var(--white); }
.hero-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(390px,.9fr); align-items: center; gap: clamp(44px,6vw,88px); padding-block: clamp(70px,8vw,104px) clamp(56px,7vw,86px); }
.hero-copy { max-width: 680px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: rgba(255,253,250,.72); font: 500 11px/1.5 var(--mono); }
.eyebrow-dark { color: var(--muted); }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--river); }
.hero h1 { max-width: 710px; margin: 27px 0 23px; color: var(--white); font-size: clamp(53px,6.2vw,83px); font-weight: 600; line-height: 1.02; letter-spacing: -.075em; }
.hero h1 span { color: var(--river); }
.hero-lede { max-width: 540px; margin: 0; color: rgba(255,253,250,.76); font-size: clamp(15px,1.35vw,17px); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.button { display: inline-flex; min-height: 49px; align-items: center; justify-content: center; gap: 15px; padding: 0 21px; border-radius: 4px; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .18s ease,color .18s ease,transform .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--river); color: var(--ink); }
.button-primary:hover { background: #a0d7e5; }
.button span { font-size: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; text-underline-offset: 5px; }
.text-link span { color: var(--copper); font-size: 16px; text-decoration: none; }
.text-link-light { color: var(--white); text-decoration-color: rgba(255,253,250,.38); }
.text-link-light:hover { text-decoration-color: var(--river); }
.hero-visual { position: relative; min-width: 0; margin: 0; }
.hero-workbench-art { display: block; width: calc(100% + clamp(24px, 5vw, 64px)); max-width: none; height: auto; margin-inline: calc(clamp(24px, 5vw, 64px) / -2); filter: saturate(.9) contrast(.98); -webkit-mask-image: radial-gradient(ellipse 76% 72% at 50% 48%, #000 50%, rgba(0,0,0,.88) 66%, transparent 100%); mask-image: radial-gradient(ellipse 76% 72% at 50% 48%, #000 50%, rgba(0,0,0,.88) 66%, transparent 100%); }

.hero-ribbon { border-top: 1px solid rgba(220,232,235,.17); }
.ribbon-inner { display: flex; min-height: 58px; align-items: center; gap: 16px; color: rgba(255,253,250,.62); font: 9px/1.4 var(--mono); }
.ribbon-inner > i { width: 3px; height: 3px; flex: 0 0 3px; border-radius: 50%; background: var(--copper); }
.ribbon-location { margin-left: auto; color: rgba(255,253,250,.4); }

/* 4. Productos */
.projects { background: var(--paper); }
.section-heading { display: grid; grid-template-columns: 1fr .68fr; align-items: end; gap: 70px; margin-bottom: 48px; }
.section-heading h2, .approach-heading h2, .studio-copy h2, .contact h2 { margin: 17px 0 0; font-size: clamp(38px,4.8vw,60px); font-weight: 600; line-height: 1.08; letter-spacing: -.06em; }
.section-heading h2 span, .studio-copy h2 span { color: var(--blue); }
.section-intro { max-width: 405px; margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 22px; }
.project-card { min-width: 0; background: var(--white); }
.project-art { position: relative; height: clamp(195px,21vw,255px); overflow: hidden; }
.project-art.river-art { background: #d8e5e8; color: var(--ink); }
.project-art.river-art::before, .project-art.river-art::after { position: absolute; width: 290px; height: 290px; border: 1px solid rgba(49,93,120,.17); border-radius: 50%; content: ""; }
.project-art.river-art::before { top: 38px; left: 20%; }
.project-art.river-art::after { top: 58px; left: calc(20% + 21px); width: 248px; height: 248px; }
.art-overline { position: absolute; z-index: 1; top: 19px; left: 20px; color: rgba(23,47,71,.68); font: 10px/1.4 var(--mono); }
.art-overline i { padding-inline: 4px; color: var(--brown); font-style: normal; }
.project-art.river-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-art.river-art > svg path { fill: none; stroke: var(--blue); stroke-width: 1.5; opacity: .68; }
.project-art.river-art > svg path:nth-child(2) { stroke: var(--brown); stroke-width: 2.4; }
.art-caption { position: absolute; right: 18px; bottom: 17px; left: 18px; color: rgba(23,47,71,.76); font: 10px/1.4 var(--mono); }
.cryo-art { background: linear-gradient(145deg,#1b3852,#294c65); color: var(--white); }
.cryo-art::before { position: absolute; right: 13%; bottom: -112px; width: 270px; height: 270px; border: 1px solid rgba(128,199,220,.26); border-radius: 50%; content: ""; }
.cryo-art::after { position: absolute; right: calc(13% + 24px); bottom: -88px; width: 222px; height: 222px; border: 1px solid rgba(212,167,131,.46); border-radius: 50%; content: ""; }
.cryo-art .art-overline { color: rgba(255,253,250,.71); }
.cryo-vials { position: absolute; top: 64px; right: 20%; display: flex; align-items: end; gap: 14px; height: 108px; }
.cryo-vials span { position: relative; display: block; width: 20px; height: 82px; border: 1px solid rgba(128,199,220,.78); border-radius: 5px 5px 7px 7px; }
.cryo-vials span::before { position: absolute; top: -7px; left: 3px; width: 12px; height: 8px; border: 1px solid var(--copper); background: #294c65; content: ""; }
.cryo-vials span::after { position: absolute; right: 2px; bottom: 3px; left: 2px; height: 35%; background: rgba(128,199,220,.47); content: ""; }
.cryo-vials span:nth-child(2) { height: 104px; }
.cryo-vials span:nth-child(3) { height: 72px; }
.cryo-path { position: absolute; right: 20px; bottom: 47px; left: 20px; display: flex; align-items: center; justify-content: space-between; }
.cryo-path::before { position: absolute; right: 0; left: 0; height: 1px; background: linear-gradient(90deg,transparent,rgba(212,167,131,.8),transparent); content: ""; }
.cryo-path i { position: relative; width: 5px; height: 5px; border: 1px solid var(--copper); border-radius: 50%; background: #294c65; }
.cryo-art .art-caption { color: rgba(255,253,250,.72); }
.project-copy { display: flex; min-height: 260px; flex-direction: column; align-items: flex-start; padding: 25px 27px 28px; }
.project-kicker { margin: 0 0 12px; color: var(--muted); font: 10px/1.5 var(--mono); }
.project-copy h3 { margin: 0; color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -.055em; }
.project-copy > p:not(.project-kicker) { max-width: 480px; margin: 10px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.project-link { display: inline-flex; align-items: center; gap: 9px; margin-top: auto; color: var(--blue); font-size: 12px; font-weight: 700; text-decoration-color: rgba(148,109,79,.55); text-underline-offset: 5px; }
.project-link:hover { color: var(--ink); }
.project-link span { color: var(--brown); font-size: 16px; }

/* 5. Práctica de ingeniería */
.approach { background: var(--ink); color: var(--white); }
.approach-heading { max-width: 780px; }
.approach-heading h2 { margin-top: 20px; color: var(--white); }
.approach-heading h2 span { color: var(--river); }
.approach-heading > p:last-child { max-width: 610px; margin: 19px 0 0; color: rgba(255,253,250,.65); font-size: 14px; line-height: 1.85; }
.approach-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 58px; margin-top: 54px; }
.approach-item { padding: 21px 0 24px; border-top: 1px solid rgba(220,232,235,.25); }
.approach-method { margin: 0 0 13px; color: #9ad0df; font: 10px/1.5 var(--mono); }
.approach-method span { color: var(--copper); }
.approach-item h3 { max-width: 420px; margin: 0; color: var(--white); font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.035em; }
.approach-item > p:last-child { max-width: 440px; margin: 9px 0 0; color: rgba(255,253,250,.61); font-size: 12px; line-height: 1.8; }
.learning-line { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 35px; padding-top: 18px; border-top: 1px solid rgba(220,232,235,.2); color: rgba(255,253,250,.81); font: 10px/1.5 var(--mono); }
.learning-arrow { color: var(--copper); }
.learning-note { margin-left: auto; color: rgba(255,253,250,.49); }

/* 6. Estudio y recorrido */
.studio { background: var(--sand); }
.studio-layout { display: grid; grid-template-columns: 1fr .78fr; align-items: center; gap: clamp(55px,9vw,125px); }
.studio-copy h2 { max-width: 630px; margin-top: 20px; font-size: clamp(37px,4.35vw,54px); }
.studio-copy > p:not(.eyebrow) { max-width: 595px; margin: 19px 0 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.text-link-dark { margin-top: 25px; color: var(--ink); text-decoration-color: rgba(23,47,71,.35); }
.text-link-dark:hover { text-decoration-color: var(--brown); }
.trajectory { position: relative; padding: 25px 27px 20px; border: 1px solid #d0c3b4; background: rgba(255,253,250,.67); }
.trajectory::after { position: absolute; top: 0; right: 28px; width: 1px; height: 37px; background: var(--brown); content: ""; }
.trajectory-heading { margin: 0 0 22px; color: var(--muted); font: 10px/1.4 var(--mono); }
.trajectory-list { position: relative; margin: 0; padding: 0; list-style: none; }
.trajectory-list::before { position: absolute; top: 7px; bottom: 21px; left: 48px; width: 1px; background: #c8b8a6; content: ""; }
.trajectory-list li { position: relative; display: grid; grid-template-columns: 49px 1fr; gap: 18px; padding-bottom: 26px; }
.trajectory-list li:last-child { padding-bottom: 18px; }
.trajectory-year { position: relative; z-index: 1; width: max-content; padding: 2px 7px 2px 0; background: var(--white); color: var(--brown); font: 600 13px/1.4 var(--mono); }
.trajectory-list h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; }
.trajectory-list p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.trajectory-footer { display: flex; align-items: center; gap: 9px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font: 9px/1.4 var(--mono); }
.trajectory-footer i { width: 3px; height: 3px; border-radius: 50%; background: var(--copper); }

/* 7. Contacto y pie */
.contact { background: #203f58; color: var(--white); }
.contact-main { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding-block: 22px 55px; }
.contact h2 { margin-top: 17px; font-size: clamp(44px,5.5vw,70px); }
.contact h2 span { color: var(--river); }
.contact-main > div > p { max-width: 470px; margin: 18px 0 0; color: rgba(255,253,250,.68); font-size: 14px; line-height: 1.8; }
.button-light { flex: 0 0 auto; margin-bottom: 7px; background: var(--paper); color: var(--ink); }
.button-light:hover { background: var(--river); }
.contact-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 15px; border-top: 1px solid rgba(255,253,250,.2); color: rgba(255,253,250,.55); font: 9px/1.5 var(--mono); }
.contact-bottom i { padding-inline: 4px; color: var(--copper); font-style: normal; }
.site-footer { background: var(--ink); color: var(--white); }
.footer-inner { display: flex; min-height: 83px; align-items: center; justify-content: space-between; gap: 22px; }
.brand-footer .brand-mark { width: 31px; height: 31px; border-radius: 9px 9px 9px 3px; font-size: 13px; }
.brand-footer .brand-name { font-size: 12px; }
.footer-inner > p, .back-top { margin: 0; color: rgba(255,253,250,.56); font-size: 11px; }
.back-top { text-decoration: none; }
.back-top span { padding-left: 5px; color: var(--river); }

/* 8. Ajustes responsivos */
@media (max-width: 980px) {
  :root { --gutter: 34px; }
  .hero-layout { grid-template-columns: 1fr; gap: 20px; }
  .hero-copy { max-width: 790px; }
  .hero h1 { max-width: 820px; font-size: clamp(54px,7vw,76px); }
  .hero-visual { width: min(100%,620px); justify-self: center; }
  .section-heading { gap: 38px; }
  .studio-layout { gap: 50px; }
  .cryo-vials { right: 16%; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 22px; }
  :root { --gutter: 22px; }
  .header-inner { min-height: 72px; flex-wrap: wrap; gap: 0; padding-block: 15px; }
  .brand-mark { width: 35px; height: 35px; }
  .site-nav { width: 100%; flex-wrap: wrap; gap: 9px 22px; padding-top: 17px; }
  .site-nav a { font-size: 12px; }
  .site-nav .nav-contact { margin-left: auto; }
  .menu-enhanced .menu-toggle { display: flex; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(255,253,250,.24); background: transparent; color: var(--white); cursor: pointer; }
  .menu-toggle span { width: 15px; height: 1px; background: currentColor; transition: transform .18s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .menu-enhanced .site-nav { display: none; }
  .menu-enhanced .site-nav.is-open { display: flex; align-items: stretch; flex-direction: column; gap: 0; padding: 14px 0 0; }
  .menu-enhanced .site-nav a { padding: 11px 2px; }
  .menu-enhanced .site-nav .nav-contact { justify-content: space-between; margin: 7px 0 0; padding: 12px; border: 1px solid rgba(255,253,250,.2); }
  .hero-layout { display: flex; flex-direction: column; align-items: stretch; gap: 35px; padding-block: 57px 41px; }
  .hero h1 { max-width: 590px; margin-top: 22px; font-size: clamp(48px,10.5vw,68px); }
  .hero-lede { max-width: 570px; font-size: 14px; }
  .hero-actions { gap: 18px 22px; margin-top: 25px; }
  .hero-visual { max-width: 590px; align-self: center; }
  .ribbon-inner { min-height: 54px; flex-wrap: wrap; gap: 8px 12px; padding-block: 12px; font-size: 8px; }
  .ribbon-location { display: none; }
  .section-pad { padding-block: 76px; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading h2, .approach-heading h2 { margin-top: 14px; font-size: clamp(39px,9vw,54px); }
  .section-intro { margin-top: 17px; font-size: 13px; }
  .project-grid { grid-template-columns: 1fr; gap: 15px; }
  .project-art { height: 210px; }
  .project-copy { min-height: 0; padding: 22px 21px 24px; }
  .project-copy > p:not(.project-kicker) { font-size: 13px; }
  .approach-heading > p:last-child { font-size: 13px; }
  .approach-list { grid-template-columns: 1fr; margin-top: 38px; }
  .approach-item { padding-block: 18px 21px; }
  .approach-item h3 { font-size: 17px; }
  .learning-line { gap: 9px; margin-top: 25px; }
  .learning-note { width: 100%; margin: 4px 0 0; }
  .studio-layout { grid-template-columns: 1fr; gap: 38px; }
  .studio-copy h2 { font-size: clamp(38px,8.8vw,52px); }
  .studio-copy > p:not(.eyebrow) { font-size: 13px; }
  .trajectory { padding: 22px 20px 17px; }
  .contact-main { display: block; padding-block: 15px 39px; }
  .contact h2 { font-size: clamp(43px,10vw,61px); }
  .contact-main > div > p { font-size: 13px; }
  .button-light { margin-top: 24px; }
  .footer-inner { min-height: 75px; flex-wrap: wrap; padding-block: 13px; }
  .footer-inner > p { order: 3; width: 100%; font-size: 10px; }
}
@media (max-width: 390px) {
  :root { --gutter: 17px; }
  .hero-layout { padding-top: 48px; }
  .hero h1 { font-size: 46px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .project-art { height: 185px; }
  .contact-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
