
:root{--navy:#123456;--ink:#203e5e;--blue:#376b9b;--slate:#60758b;--pale:#f3f5f7;--soft:#e9edf1;--line:#d9e0e7;--white:#fff}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Arial,'Helvetica Neue',sans-serif;color:var(--ink);font-size:16px;line-height:1.7;background:white;-webkit-font-smoothing:antialiased}a{color:inherit}img{display:block;max-width:100%}p{margin:0 0 1.2em}h1,h2,h3{line-height:1.16;color:var(--navy);letter-spacing:-.035em}h1{font-size:clamp(2.55rem,5vw,4.35rem);margin:0 0 25px}h2{font-size:clamp(2rem,3.4vw,2.85rem);margin:0 0 22px}h3{font-size:1.35rem;margin:0 0 13px}.wrap{width:min(1160px,calc(100% - 72px));margin-inline:auto}.skip{position:absolute;left:12px;top:-100px;background:white;padding:12px;z-index:200}.skip:focus{top:12px}.header{position:sticky;top:0;z-index:100;background:#fffffff5;backdrop-filter:blur(13px);border-bottom:1px solid var(--line)}.header-inner{height:93px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand img{width:158px;max-height:83px;object-fit:contain}.nav{display:flex;gap:30px;align-items:center}.nav a{font-size:14px;text-decoration:none;font-weight:700;color:var(--navy);padding:8px 0;border-bottom:2px solid transparent}.nav a:hover,.nav a[aria-current="page"]{border-color:var(--blue)}.hamburger{display:none;border:1px solid var(--line);border-radius:9px;padding:7px 14px;background:white;color:var(--navy);font-size:25px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.17em;font-weight:800;color:var(--blue);margin:0 0 13px;display:block}.pill{display:inline-block;background:#edf0f4;border-radius:30px;padding:6px 16px;font-size:12px;font-weight:700;color:var(--blue);margin-bottom:26px}.lead{font-size:clamp(1.12rem,1.6vw,1.28rem);line-height:1.65;max-width:770px;color:#38536d}.strong{font-weight:700;color:var(--navy)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:13px;background:var(--blue);color:white;border-radius:9px;text-decoration:none;padding:13px 21px;font-size:14px;font-weight:700;transition:background .2s;margin-top:12px}.btn:hover{background:#204d78}.text-link{font-weight:700;color:#2c6594;text-decoration:none;border-bottom:1px solid #9eb6cb;display:inline-block;margin-top:15px}.section{padding:92px 0}.soft{background:var(--pale)}.split{display:grid;grid-template-columns:1fr 1fr;gap:75px;align-items:center}.split img{width:100%;height:350px;object-fit:cover;border-radius:19px;background:var(--soft)}.hero{position:relative;overflow:hidden;background:#f2f5f7}.hero .wrap{min-height:535px;display:flex;align-items:center}.hero-copy{position:relative;z-index:2;width:52%;padding:70px 0}.hero-copy p{font-size:17px;max-width:520px;line-height:1.55}.hero-copy h1{color:#245788}.hero-image{position:absolute;right:0;top:0;width:54%;height:100%;object-fit:cover;object-position:center}.hero::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#f2f5f7 39%,#f2f5f7b0 54%,transparent 73%);pointer-events:none}.hero-kicker{font-style:italic;font-weight:700}.stat-row{display:flex;gap:25px;align-items:center;margin:20px 0}.stat-row strong{font-size:65px;color:var(--blue);white-space:nowrap;letter-spacing:-.06em;line-height:1}.stat-row span{border-left:1px solid #bccad6;padding-left:24px;font-weight:600}.note{font-size:13px;color:var(--slate);line-height:1.55}.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:32px 0}.value{border:1px solid var(--line);border-radius:14px;padding:28px 22px;background:white}.value .icon{font-size:30px;font-weight:400;color:var(--blue);display:block;margin-bottom:18px}.value h3{font-size:17px}.value p{font-size:14px;margin:0;line-height:1.5}.spec-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:33px 0}.spec-card{border-radius:15px;overflow:hidden;background:var(--pale);border:1px solid var(--line)}.spec-card img{width:100%;height:165px;object-fit:cover}.spec-card-content{padding:22px}.spec-card h3{font-size:18px;margin-bottom:7px}.spec-card p{font-size:14px;line-height:1.5;margin-bottom:0}.page-head{padding:95px 0 83px;background:linear-gradient(110deg,#f3f5f7,#fff)}.page-head h1{max-width:950px}.reading{max-width:860px}.reading p{font-size:17px}.panel{padding:35px;border:1px solid var(--line);background:white;border-radius:17px}.numbered{display:grid;grid-template-columns:repeat(2,1fr);gap:22px;margin-top:32px}.numbered article{padding:30px;border-radius:15px;background:#f5f6f8}.numbered .n{font-size:13px;letter-spacing:.12em;color:var(--blue);font-weight:700}.numbered h3{margin-top:10px}.subheading{margin-top:36px}.inline-image{width:100%;height:320px;object-fit:cover;border-radius:17px}.large-spec{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:38px 0}.large-spec article{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff}.large-spec img{height:190px;width:100%;object-fit:cover}.large-spec .body{padding:27px}.large-spec p{font-size:15px}.large-spec .subtitle{font-weight:700;color:var(--blue);margin-bottom:13px}.mini-list{padding-left:20px;margin:14px 0}.mini-list li{padding:3px 0}.quote{font-size:clamp(1.4rem,2.3vw,2rem);color:var(--navy);font-weight:700;line-height:1.45;max-width:950px}.cta{background:#e9edf1;text-align:center;padding:66px 0}.cta p{max-width:730px;margin:0 auto 15px}.email-placeholder{display:inline-block;background:#f3f5f7;border:1px solid var(--line);padding:13px 24px;border-radius:10px;color:var(--slate);font-weight:700}.footer{background:#2c5d89;color:white;padding:40px 0}.footer-content{display:grid;grid-template-columns:185px 1fr;gap:65px;align-items:center}.footer img{width:170px;filter:brightness(0) invert(1)}.footer p{font-size:13px;max-width:780px;margin:8px 0;line-height:1.55}.footer small{font-size:11px;color:#d4e3ef}a:focus-visible,button:focus-visible{outline:3px solid #3980af;outline-offset:3px}
@media(max-width:940px){.nav{gap:17px}.nav a{font-size:12px}.wrap{width:min(100% - 52px,1160px)}.split{gap:35px}.grid-4{grid-template-columns:repeat(2,1fr)}.hero-copy{width:60%}.hero-image{width:53%}.spec-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.wrap{width:calc(100% - 36px)}.header-inner{height:78px}.brand img{width:140px}.hamburger{display:block}.nav{display:none;position:absolute;top:78px;left:0;right:0;background:white;box-shadow:0 12px 20px #1d365428;flex-direction:column;align-items:stretch;padding:15px 24px;gap:0}.nav.open{display:flex}.nav a{font-size:15px;border-bottom:1px solid var(--line);padding:12px 3px}.hero .wrap{min-height:710px;align-items:flex-end}.hero-copy{width:100%;padding:330px 0 45px}.hero-copy h1{font-size:39px}.hero-copy p{font-size:15px}.hero-image{width:100%;height:390px;object-position:70% center}.hero::after{background:linear-gradient(0deg,#f2f5f7 42%,#f2f5f7aa 57%,transparent 79%)}.section{padding:58px 0}.page-head{padding:65px 0}.split,.large-spec,.numbered{grid-template-columns:1fr}.split img,.inline-image{height:250px}.spec-grid{grid-template-columns:1fr}.spec-card img{height:205px}.grid-4{gap:12px}.value{padding:20px 16px}.value h3{font-size:15px}.value p{font-size:13px}.stat-row strong{font-size:50px}.footer-content{grid-template-columns:1fr;text-align:center;gap:22px}.footer img{margin:auto}.footer p{margin:10px auto}.large-spec img{height:220px}.reading p{font-size:16px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Navegación etapa 1: Inicio siempre identificable */
.nav a[aria-current="page"]{color:#245788;border-bottom-color:#376b9b}
.nav a:first-child{font-weight:800}
@media(max-width:700px){.brand{margin-right:auto}.header-inner{gap:10px}}

/* Fotografías SDMG v6: cada archivo es independiente y sin textos incrustados. */
.hero-image { object-position: 54% center; }
.spec-card img, .large-spec img, .split img { image-rendering: auto; }
@media (max-width: 700px) {
  .hero-image { object-position: 58% center; }
}


/* SDMG V7 — Microinteracciones discretas; sin cambios en la composición. */
.header { transition: box-shadow .3s ease, background-color .3s ease; }
.header.has-scrolled { box-shadow: 0 5px 22px rgba(18,52,86,.075); background: rgba(255,255,255,.985); }
.nav a { position:relative; transition: color .22s ease, border-color .22s ease; }
.nav a:hover { color: var(--blue); }

.text-link { transition: color .2s ease, border-color .2s ease; }
.text-link:hover { color:var(--navy); border-color:var(--blue); }

.spec-card,.large-spec article { overflow:hidden; }

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

}

.header {
  background-image: linear-gradient(115deg,rgba(255,255,255,.97),rgba(242,246,250,.91) 48%,rgba(255,255,255,.98));
}
.header.has-scrolled {
  background-image: linear-gradient(115deg,rgba(255,255,255,.99),rgba(244,247,250,.98) 53%,rgba(255,255,255,.99));
}

.brand{display:flex;align-items:center;min-width:0;flex:1 1 auto}
.brand img{width:auto;height:78px;max-width:min(280px, 100%);object-fit:contain;object-position:left center}
.header-inner{position:relative}
/* Menú móvil con transición visible en lugar de aparecer de golpe */
@media(max-width:700px){
  .header{backdrop-filter:blur(18px) saturate(1.08);}
  .header::after{content:"";position:absolute;inset:auto 0 0 0;height:1px;background:linear-gradient(90deg,transparent,rgba(55,107,155,.18),transparent);pointer-events:none}
  .header-inner{height:88px}
  .brand img{height:68px;max-width:62vw}
  .hamburger{padding:10px 15px;border-radius:14px;box-shadow:0 10px 24px rgba(18,52,86,.08);background:rgba(255,255,255,.92)}
  .nav{display:flex;visibility:hidden;opacity:0;pointer-events:none;transform:translateY(-10px) scale(.98);transform-origin:top right;transition:opacity .22s ease,transform .22s ease,visibility 0s linear .22s;border-top:1px solid rgba(217,224,231,.75);backdrop-filter:blur(14px) saturate(1.06);background:rgba(255,255,255,.96);border-bottom-left-radius:20px;border-bottom-right-radius:20px}
  .nav.open{visibility:visible;opacity:1;pointer-events:auto;transform:translateY(0) scale(1);transition:opacity .22s ease,transform .22s ease,visibility 0s linear 0s}
  .nav a{padding:14px 6px}
  .hero{background:linear-gradient(180deg,#eef2f6 0%,#f7f9fb 100%)}
  .hero .wrap{min-height:auto;padding-top:312px;padding-bottom:26px;align-items:stretch}
  .hero-image{height:380px;object-position:64% center;filter:saturate(1.02);transform:scale(1.015)}
  .hero::after{background:linear-gradient(180deg,rgba(243,245,247,0) 0%,rgba(243,245,247,.24) 36%,rgba(243,245,247,.88) 68%,#f2f5f7 100%)}
  .pill{margin-bottom:18px;box-shadow:0 8px 18px rgba(18,52,86,.08)}
  .hero-copy{width:100%;padding:24px 22px 26px;margin-top:-34px;background:rgba(255,255,255,.86);backdrop-filter:blur(14px) saturate(1.08);border:1px solid rgba(217,224,231,.92);border-radius:26px;box-shadow:0 18px 40px rgba(18,52,86,.10)}
  .hero-copy h1{font-size:clamp(2.65rem,11vw,4rem);margin-bottom:16px;line-height:1.05}
  .hero-copy p{font-size:1.08rem;line-height:1.58}
  .section{padding:64px 0}
  .split,.large-spec,.numbered,.grid-4,.spec-grid{gap:16px}
  .value,.spec-card,.large-spec article,.numbered article,.panel{box-shadow:0 12px 28px rgba(18,52,86,.07);border-color:#dfe6ed}
  .value,.panel,.numbered article{border-radius:18px}
  .spec-card,.large-spec article{border-radius:20px}
  .spec-card img,.large-spec img,.split img,.inline-image{border-radius:18px}
  .spec-card img,.large-spec img{box-shadow:inset 0 -1px 0 rgba(18,52,86,.04)}
  .btn{box-shadow:0 14px 28px rgba(18,52,86,.16)}
  .btn:active,.hamburger:active{transform:scale(.98)}
  .footer{padding:34px 0 44px}
}

/* V10 — Principios del modelo integral */
.principles {
  gap: 22px;
}

.principles .value {
  overflow: hidden;
  padding: clamp(20px, 2vw, 30px);
  border: 1px solid #bdcfe1;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 90% 0%, #fff 0%, transparent 56%),
    linear-gradient(150deg, #fdfdff 0%, #eef4fb 57%, #dfeaf6 100%);
  box-shadow:
    inset 0 1px 0 #fff,
    0 5px 10px rgba(18, 52, 86, .09),
    0 16px 24px -10px rgba(18, 52, 86, .28);
}

.principle-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border: 1px solid #6086ac;
  border-radius: 17px;
  background: linear-gradient(145deg, #4777a7, #123456 86%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), 0 7px 14px rgba(18, 52, 86, .29);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}


@media (max-width: 560px) {
  .grid-4.principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

/* V11 — Prioridades de la visión institucional */
.vision-priorities {
  background: radial-gradient(ellipse at 95% 0%, #376b9b 0%, #173d63 52%, #123456 100%);
}

.vision-priorities > .wrap > .eyebrow {
  color: #d8e8f7;
}

.vision-priorities > .wrap > h2 {
  color: #fff;
}

.vision-priorities .numbered {
  gap: clamp(16px, 2vw, 26px);
}

.vision-priorities .numbered article {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #c8d8e9;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff 24%, #ecf4fc 100%);
  box-shadow: inset 0 1px 0 #fff, 0 14px 28px rgba(8, 25, 45, .28);
}

.vision-priorities .numbered .n {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 7px;
  background: #123456;
  color: #fff;
  font-size: .75rem;
}

.vision-priorities .numbered h3 {
  margin: 16px 0 8px;
  color: #123456;
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.2;
}

.vision-priorities .numbered p {
  margin: 0;
  color: #203e5e;
  font-size: 1rem;
  line-height: 1.6;
}

/* V12 — Estudios y seguimiento en Medicina del Sueño */
.sleep-care {
  gap: clamp(16px, 2.5vw, 28px);
  margin-bottom: 30px;
}

.numbered.sleep-care article {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid #426b94;
  border-radius: 22px;
  background: linear-gradient(145deg, #244e76 0%, #123456 74%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 24px rgba(18, 52, 86, .22);
}

.sleep-care article h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(1.3rem, 2.25vw, 1.7rem);
  line-height: 1.2;
}

.sleep-care article p {
  margin: 0;
  color: #e9f2fb;
  font-size: 1rem;
  line-height: 1.6;
}

/* El distintivo se anima al cargar. El resto de la interfaz conserva su propio ritmo. */
.project-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #b4cadf;
  background: #ecf3fa;
  color: #123456;
  max-width: 100%;
}

.status-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #376b9b;
}

.page-head .project-status { margin-bottom: 20px; }
.page-head .lead { margin-bottom: 0; }

.hero-copy h1 { font-size: clamp(2.35rem, 4.5vw, 4.2rem); }
.hero-image { width: 56%; object-position: 64% center; }
.hero-copy p { max-width: 44ch; }
.hero .wrap { min-height: 565px; }

.home-intro p { max-width: 68ch; }
.contact-panel { max-width: 740px; }
.contact-panel .note { margin: 14px 0 0; }
.contact-panel .btn { overflow-wrap: anywhere; }
.stat-row { position: relative; }

.area-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}

.area-list a {
  display: block;
  padding: 14px 18px;
  border: 1px solid #c6d6e6;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.area-list a:is(:hover,:focus-visible) { background: #e7f0f9; }
.spec-card[id] { scroll-margin-top: 114px; }
.spec-card:target { outline: 2px solid var(--blue); outline-offset: 3px; }
.large-spec img { height: clamp(160px, 22vw, 260px); border-radius: 0; }
.vision-priorities .numbered article { box-shadow: none; }
.numbered .n:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .status-dot { animation: status-pulse 1.2s .35s ease-out 2; }
  .stat-row.entered strong { animation: statistic-enter .7s ease-out; }
  .btn span, .text-link span { display: inline-block; transition: transform .2s ease-out; }
  :is(.btn,.text-link):is(:hover,:focus-visible) span { transform: translateX(4px); }

  @keyframes status-pulse {
    0% { box-shadow: 0 0 0 0 rgba(55, 107, 155, .32); }
    75%, 100% { box-shadow: 0 0 0 7px rgba(55, 107, 155, 0); }
  }


  @keyframes statistic-enter {
    from { opacity: .45; }
    to { opacity: 1; }
  }
}

@media (max-width: 700px) {
  .hero .wrap { min-height: 0; padding-top: clamp(172px, 49vw, 310px); }
  .hero-image { width: 100%; height: clamp(235px, 63vw, 365px); filter: none; transform: none; }
  .hero-copy h1 { font-size: clamp(2rem, 8.5vw, 3.25rem); }
  .page-head h1 { font-size: clamp(2rem, 8.5vw, 3rem); }
  .area-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-panel { padding: 22px; }
  .contact-panel .btn { padding-inline: 12px; }
}

@media (max-width: 380px) {
  .area-list { grid-template-columns: 1fr; }
  .stat-row { display: block; }
  .stat-row span { display: block; border: 0; padding: 7px 0 0; }
}

/* Portada institucional */
.hero {
  overflow: visible;
  background: linear-gradient(135deg, #f8fbfd 8%, #eaf1f7 100%);
  border-bottom: 1px solid #d9e5ee;
}

.hero::after { content: none; }

.hero .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  min-height: auto;
  padding-block: clamp(54px, 7vw, 100px);
}

.hero-layout .hero-copy {
  width: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-layout h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  color: var(--navy);
  text-wrap: balance;
}

.hero-layout .hero-copy p { max-width: 46ch; }
.hero-layout .project-status { margin-bottom: 20px; box-shadow: none; }

.hero-actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.hero-actions :is(.btn, .text-link) { margin-top: 0; }

.hero-photo {
  min-width: 0;
  margin: 0;
  padding: 7px;
  border-radius: 22px;
  border: 1px solid #d0dee9;
  background: #fff;
  box-shadow: 0 18px 42px -21px #12345662;
}

.hero-photo .hero-image {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;
  object-fit: contain;
  transform: none;
  filter: none;
}

@media (max-width: 820px) {
  .hero .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 23px;
    padding-block: 28px 38px;
  }

  .hero-photo { grid-row: 1; }
  .hero-layout h1 { max-width: 17ch; font-size: clamp(2.35rem, 9vw, 4rem); }
  .hero-layout .hero-copy p { max-width: 53ch; }
}

@media (max-width: 360px) {
  .hero-photo { padding: 5px; }
  .hero-layout .project-status { padding-inline: 11px; }
}

.partner-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: left;
  margin-bottom: 22px;
}

.partner-options article {
  background: #fff;
  border: 1px solid #c8d8e9;
  padding: clamp(20px, 2.5vw, 30px);
}

.partner-options article p { margin: 0; }

@media (max-width: 800px) {
  .partner-options { grid-template-columns: minmax(0, 1fr); }
}

/* Inicio: acceso editorial a las seis disciplinas. */
.home-disciplines {
  background: radial-gradient(ellipse at 95% 0%, #2b587e, #142d49 65%);
  color: #e9f2fa;
}
.home-disciplines .eyebrow { color: #c5dcee; }
.home-disciplines h2 { max-width: 17ch; color: #fff; text-wrap: balance; }
.home-disciplines .wrap > p { max-width: 62ch; }
.home-disciplines .area-list { gap: 14px; }
.home-disciplines .area-list a {
  position: relative;
  height: 100%;
  min-height: 118px;
  padding: 20px 45px 20px 20px;
  background: #ffffff0d;
  border-color: #adc8dd66;
  color: #fff;
  text-decoration: none;
}
.home-disciplines .area-list a strong { display: block; font-size: 1.12rem; }
.home-disciplines .area-list a span:not(.discipline-arrow) {
  display: block;
  margin-top: 5px;
  color: #d5e5f2;
  font-size: .89rem;
  font-weight: 400;
  line-height: 1.45;
}
.home-disciplines .discipline-arrow { position: absolute; top: 17px; right: 18px; }
.home-disciplines .area-list a:is(:hover,:focus-visible) { background: #ffffff24; }
.home-disciplines .area-list a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* El proyecto: etapa actual. */
.research-citation { font-size: .75rem; line-height: 1.55; }
.project-stage .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  border: 1px solid #d6e3ee;
  border-radius: 24px;
  overflow: hidden;
  background: #eef4fa;
}
.project-stage-copy { padding: clamp(24px, 5vw, 68px); }
.project-stage-copy p { max-width: 54ch; margin-bottom: 0; }
.project-stage-photo { min-height: 270px; margin: 0; position: relative; }
.project-stage-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }

/* Nuestro modelo: principios. */
.model-principles { background: #edf3f8; }
.model-principles .principles { gap: 14px; }
.model-principles .principles .value {
  padding: clamp(22px, 2.8vw, 34px);
  border: 1px solid #d5e2ee;
  border-radius: 14px 14px 22px 22px;
  border-top: 3px solid #376b9b;
  background: #fff;
  box-shadow: 0 12px 24px -19px #12345680;
}
.model-principles .value h3 { font-size: 1.18rem; overflow-wrap: anywhere; }
.model-principles .value p { font-size: .95rem; line-height: 1.55; }
.model-principles .principle-number {
  width: auto;
  height: auto;
  display: inline-block;
  margin-bottom: 17px;
  color: #315f88;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 1.65rem;
  line-height: 1;
}

/* Especialidades: realce visual de las capacidades de sueño. */
.sleep-capabilities .sleep-care { gap: 14px; }
.sleep-capabilities .sleep-care article {
  background: #fff;
  color: var(--navy);
  border: 1px solid #cfdeec;
  border-radius: 16px;
  border-left: 5px solid #3b709d;
  padding: clamp(19px, 3vw, 32px);
  box-shadow: 0 14px 28px -22px #12345680;
}
.sleep-capabilities .sleep-care h3 { color: var(--navy); font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
.sleep-capabilities .sleep-care p { color: var(--ink); margin: 0; }

/* Visión: prioridades institucionales. */
.vision-priorities { background: linear-gradient(135deg, #122c48 0%, #254c71 100%); }
.vision-priorities .numbered { gap: 1px; padding: 1px; background: #a7c2d067; border-radius: 19px; overflow: hidden; }
.vision-priorities .numbered article {
  background: #183753;
  border: 0;
  border-radius: 0;
  padding: clamp(23px, 4vw, 42px);
}
.vision-priorities .numbered .n { background: #c9ddeb; color: #173550; }
.vision-priorities .numbered h3 { color: #fff; }
.vision-priorities .numbered p { color: #e2edf6; }

@media (max-width: 700px) {
  .home-disciplines .area-list { grid-template-columns: 1fr; }
  .home-disciplines .area-list a { min-height: auto; }
  .project-stage .wrap { grid-template-columns: minmax(0, 1fr); }
  .project-stage-photo { grid-row: 1; min-height: 0; aspect-ratio: 3 / 2; }
}

/* Inicio: portada panorámica y transiciones propias de la escena. */
.hero-full {
  overflow: hidden;
  isolation: isolate;
  background: #f1f5f8;
  --hero-fade: #f1f5f8;
}

.hero-full .hero-layout {
  display: flex;
  align-items: center;
  min-height: clamp(500px, 46vw, 690px);
  padding-block: clamp(50px, 6vw, 92px);
}

.hero-full .hero-copy {
  position: relative;
  z-index: 2;
  width: min(48%, 520px);
}

.hero-full .hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
}

.hero-full .hero-photo .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  border-radius: 0;
}

.hero-full::after {
  content: "";
  display: block;
  z-index: -1;
  background: linear-gradient(90deg, var(--hero-fade) 0%, var(--hero-fade) 24%, #f1f5f8fa 33%, #f1f5f8e8 41%, #f1f5f886 49%, #f1f5f818 56%, transparent 63%);
}

.hero-full h1 {
  font-size: clamp(2.65rem, 5.1vw, 5rem);
  text-wrap: balance;
  max-width: 12ch;
}

.hero-full .hero-copy p { color: #203e5e; max-width: 44ch; }
.hero-full .hero-actions .btn { border-radius: 10px; }
.hero-full .hero-actions .text-link {
  color: #123456;
  border-color: #7897b2;
}

@media (max-width: 900px) {
  .hero-full .hero-layout {
    min-height: auto;
    padding-block: clamp(168px, 53vw, 390px) 38px;
  }

  .hero-full .hero-copy { width: min(100%, 570px); }
  .hero-full .hero-photo { height: clamp(205px, 64vw, 475px); }
  .hero-full .hero-photo .hero-image { object-position: right center; }
  .hero-full::after {
    inset: 0 0 auto;
    height: clamp(205px, 64vw, 475px);
    background: linear-gradient(180deg, transparent 42%, #f1f5f845 58%, #f1f5f8ed 76%, var(--hero-fade) 93%);
  }

  .hero-full h1 { max-width: 14ch; font-size: clamp(2.2rem, 8.5vw, 4rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-full .hero-image { animation: panoramic-settle 1.35s cubic-bezier(.22, .61, .36, 1) both; }
  .hero-full h1 { animation: hero-headline .72s .10s cubic-bezier(.22, .61, .36, 1) both; }
  .hero-full .hero-copy p { animation: hero-text-in .65s .24s ease-out both; }
  .hero-full .hero-actions { animation: hero-text-in .6s .38s ease-out both; }
  .hero-full .hero-actions a { transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease; }
  .hero-full .hero-actions .btn:is(:hover,:focus-visible) { box-shadow: 0 9px 18px #12345633; }
  .hero-full .hero-actions .btn:active { transform: translateY(2px); }
  .home-disciplines .area-list li.entered { animation: discipline-in .54s var(--discipline-delay, 0ms) ease-out both; }
  .home-disciplines .area-list li:nth-child(2) { --discipline-delay: 45ms; }
  .home-disciplines .area-list li:nth-child(3) { --discipline-delay: 90ms; }
  .home-disciplines .area-list li:nth-child(4) { --discipline-delay: 135ms; }
  .home-disciplines .area-list li:nth-child(5) { --discipline-delay: 180ms; }
  .home-disciplines .area-list li:nth-child(6) { --discipline-delay: 225ms; }
  .home-disciplines .area-list a { transition: background-color .24s ease, border-color .24s ease; }
  .home-disciplines .discipline-arrow { transition: transform .22s ease; }
  .home-disciplines .area-list a:is(:hover,:focus-visible) .discipline-arrow { transform: translateX(4px); }

  @keyframes panoramic-settle {
    from { transform: scale(1.045); opacity: .72; }
    to { transform: scale(1); opacity: 1; }
  }

  @keyframes hero-headline {
    from { transform: translateY(12px); opacity: .25; }
    to { transform: translateY(0); opacity: 1; }
  }

  @keyframes hero-text-in {
    from { opacity: .35; }
    to { opacity: 1; }
  }

  @keyframes discipline-in {
    from { transform: translateX(-7px); opacity: .55; }
    to { transform: translateX(0); opacity: 1; }
  }
}

/* Efectos editoriales por sección. El contenido mantiene su estado final sin JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  [data-motion] {
    --motion-x: 8px;
    --motion-y: 8px;
    --motion-duration: 560ms;
  }

  [data-motion="rule"],
  [data-motion="accent"],
  [data-motion="sleep"],
  [data-motion="priority"],
  [data-motion="contact"] { position: relative; }

  [data-motion="rule"]::after,
  [data-motion="accent"]::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 12px;
    border-radius: 2px;
    background: #6d97b8;
    transform-origin: left center;
    pointer-events: none;
  }

  [data-motion="accent"]::after {
    width: 26px;
    height: 3px;
    background: #8facc5;
    transform-origin: center;
  }

  [data-motion="title"].entered {
    animation: heading-appear var(--motion-duration) ease-out;
  }

  [data-motion="rule"].entered::after {
    animation: rule-draw var(--motion-duration) cubic-bezier(.2,.65,.25,1);
  }

  [data-motion="accent"].entered::after {
    animation: accent-open 460ms ease-out;
  }

  [data-motion="photo"].entered {
    animation: photo-settle 640ms cubic-bezier(.2,.65,.25,1);
  }

  [data-motion="stage"].entered img {
    animation: stage-light 700ms ease-out;
  }

  [data-motion="focus"].entered {
    animation: coordination-focus 620ms ease-out;
  }

  [data-motion="specialty"].entered img {
    animation: specialty-photo 580ms ease-out;
  }

  [data-motion="sleep"].entered::after,
  [data-motion="priority"].entered::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  [data-motion="sleep"].entered::after {
    inset: 12px auto 12px -4px;
    width: 3px;
    border-radius: 3px;
    background: #a3c3df;
    transform-origin: top;
    animation: sleep-edge 700ms ease-out both;
  }

  [data-motion="priority"].entered::after {
    inset: 0 0 auto;
    height: 2px;
    background: #b2d0e4;
    transform-origin: center;
    animation: priority-line 640ms ease-out both;
  }

  [data-motion="partner"].entered {
    animation: partner-rise 490ms cubic-bezier(.22,.68,.3,1);
  }

  [data-motion="contact"].entered::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid #5686ae;
    border-radius: inherit;
    animation: contact-halo 750ms ease-out both;
    pointer-events: none;
  }

  .sleep-capabilities article:active { border-left-color: #123456; }
  .home-disciplines .area-list a:active .discipline-arrow { transform: translateX(3px); }

  @keyframes heading-appear {
    from { opacity: .62; transform: translateY(var(--motion-y)); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes rule-draw {
    from { transform: scaleX(.18); opacity: .35; }
    to { transform: scaleX(1); opacity: 1; }
  }
  @keyframes accent-open {
    from { transform: scaleX(.4) translateX(6px); opacity: .4; }
    to { transform: scaleX(1); opacity: 1; }
  }
  @keyframes photo-settle {
    from { transform: translateX(calc(-1 * var(--motion-x))); opacity: .72; }
    to { transform: translateX(0); opacity: 1; }
  }
  @keyframes stage-light {
    from { filter: brightness(.9); }
    to { filter: brightness(1); }
  }
  @keyframes coordination-focus {
    from { opacity: .76; filter: saturate(.76); }
    to { opacity: 1; filter: saturate(1); }
  }
  @keyframes specialty-photo {
    from { opacity: .75; transform: scale(1.025); }
    to { opacity: 1; transform: scale(1); }
  }
  @keyframes sleep-edge {
    0% { transform: scaleY(.14); opacity: 0; }
    65% { transform: scaleY(1); opacity: .95; }
    100% { transform: scaleY(1); opacity: 0; }
  }
  @keyframes priority-line {
    0% { transform: scaleX(.15); opacity: 0; }
    65% { transform: scaleX(1); opacity: .85; }
    100% { transform: scaleX(1); opacity: 0; }
  }
  @keyframes partner-rise {
    from { transform: translateY(var(--motion-y)); opacity: .68; }
    to { transform: translateY(0); opacity: 1; }
  }
  @keyframes contact-halo {
    from { transform: scale(.98); opacity: .6; }
    to { transform: scale(1.045); opacity: 0; }
  }
  @keyframes mobile-panoramic-settle {
    from { transform: scale(1.018); opacity: .86; }
    to { transform: scale(1); opacity: 1; }
  }

  @media (max-width: 700px) {
    [data-motion] {
      --motion-x: 4px;
      --motion-y: 4px;
      --motion-duration: 470ms;
    }
    .hero-full .hero-image { animation-name: mobile-panoramic-settle; animation-duration: .95s; }
    .hero-full h1 { animation-name: heading-appear; --motion-y: 6px; }
    .home-disciplines .area-list li.entered { animation-duration: .4s; }
    }
}

/* Nuestro modelo: cada principio responde a su propia entrada en pantalla. */
@media (prefers-reduced-motion: no-preference) {
  .model-principles .principles .value {
    --principle-shift: 11px;
    --principle-time: 700ms;
    position: relative;
  }

  .model-principles .value.principle-in-view {
    animation: principle-surface var(--principle-time) ease-out;
  }

  .model-principles .value.principle-in-view h3,
  .model-principles .value.principle-in-view p {
    animation: principle-copy var(--principle-time) cubic-bezier(.22,.68,.26,1);
  }

  .model-principles .value::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: #91b9d9;
    opacity: 0;
  }

  .model-principles .value:nth-child(2)::after { transform-origin: right center; }
  .model-principles .value:nth-child(odd)::after { transform-origin: left center; }
  .model-principles .value.principle-in-view::after {
    animation: principle-edge var(--principle-time) ease-out;
  }

  @keyframes principle-surface {
    from { background-color: #e1edf8; }
    to { background-color: #fff; }
  }

  @keyframes principle-copy {
    from { opacity: .58; transform: translateY(var(--principle-shift)); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes principle-edge {
    0% { opacity: 0; transform: scaleX(.1); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: scaleX(1); }
  }

  @media (max-width: 700px) {
    .model-principles .principles .value {
      --principle-shift: 7px;
      --principle-time: 620ms;
    }
  }
}

.model-principles .principle-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.model-principles .principle-mark .principle-number { margin: 0; }

.model-principles .principle-icon {
  display: block;
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  padding: 8px;
  border: 1px solid #c9deed;
  border-radius: 12px;
  background: #e9f2f9;
}

@media (prefers-reduced-motion: no-preference) {
  [data-motion="intro-copy"].entered { animation: copy-rise 520ms cubic-bezier(.2,.7,.25,1); }
  [data-motion="stage-copy"].entered { animation: stage-copy-in 540ms ease-out; }
  [data-motion="sleep-title"].entered { animation: copy-rise 520ms cubic-bezier(.2,.7,.25,1); }
  [data-motion="vision-lead"].entered { animation: vision-copy-in 570ms ease-out; }
  [data-motion="contact-title"].entered { animation: copy-rise 470ms ease-out; }
  .model-principles .principle-in-view .principle-icon { animation: icon-settle 520ms cubic-bezier(.2,.7,.25,1); }

  [data-motion="directory-rule"]::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    margin-top: 12px;
    background: #729dbd;
    transform-origin: left;
  }
  [data-motion="directory-rule"].entered::after { animation: rule-draw 580ms ease-out; }

  [data-motion="model-link"] { position: relative; }
  [data-motion="model-link"]::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 2px;
    background: #376b9b;
    opacity: 0;
    transform-origin: left;
    pointer-events: none;
  }
  [data-motion="model-link"].entered::after { animation: model-link-line 660ms ease-out; }

  @keyframes copy-rise {
    from { opacity: .65; transform: translateY(var(--motion-y)); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes stage-copy-in {
    from { opacity: .72; transform: translateX(calc(-1 * var(--motion-x))); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes vision-copy-in {
    from { opacity: .56; }
    to { opacity: 1; }
  }

  @keyframes icon-settle {
    from { opacity: .6; transform: scale(.88); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes model-link-line {
    0% { transform: scaleX(.08); opacity: 0; }
    65% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
  }

  @media (max-width: 700px) {
    [data-motion="stage"].entered img,
    [data-motion="focus"].entered { animation: vision-copy-in 440ms ease-out; }
    .model-principles .principles .value { --principle-shift: 4px; --principle-time: 520ms; }
    .home-disciplines .area-list li.entered { animation-delay: 0ms; }
  }
}

/* Respuestas al cursor y al toque. Las tarjetas conservan su función informativa. */
[data-response="panel"] { --response-bg: #eaf3fa; --response-edge: #6c99ba; }
[data-response="principle"] { --response-bg: #edf5fb; --response-edge: #5689b1; }
[data-response="specialty"] { --response-bg: #eef5fa; --response-edge: #6c99ba; }
[data-response="priority"] { --response-bg: #244c70; --response-edge: #a5c7e1; }

@media (prefers-reduced-motion: no-preference) {
  [data-response] { transition: background-color .22s ease, box-shadow .22s ease; }
  [data-response="principle"] .principle-icon,
  [data-response="specialty"] img { transition: transform .25s ease-out; }
  [data-response="link"] span { transition: transform .2s ease-out; }
}

@media (hover: hover) and (pointer: fine) {
  [data-response]:not([data-response="link"]):hover {
    background-color: var(--response-bg);
    box-shadow: inset 0 0 0 1px var(--response-edge);
  }
  [data-response="link"]:hover { box-shadow: 0 3px 0 #779bb455; }
}

main [data-response].touch-feedback:not([data-response="link"]) {
  background-color: var(--response-bg);
  box-shadow: inset 0 0 0 1px var(--response-edge);
}

[data-response="link"]:is(:focus-visible, :active) {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) and (pointer: fine) {
    [data-response="principle"]:hover .principle-icon { transform: translateY(-3px); }
    [data-response="specialty"]:hover img { transform: scale(1.025); }
    [data-response="link"]:hover span { transform: translateX(4px); }
  }

  [data-response="principle"].touch-feedback .principle-icon { transform: translateY(-2px); }
  [data-response="specialty"].touch-feedback img { transform: scale(1.015); }
  [data-response="link"]:is(:focus-visible, :active) span { transform: translateX(3px); }
}

/* Línea editorial compartida para los encabezados de sección. */
main h2[data-section-rule]::after {
  content: "";
  display: block;
  width: 65px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: #608baa;
  transform-origin: left center;
}

main :is(.project-scope,.home-disciplines,.vision-priorities) h2[data-section-rule]::after {
  background: #a6c9e4;
}

.cta h2[data-section-rule]::after { margin-inline: auto; }

@media (prefers-reduced-motion: no-preference) {
  main h2[data-section-rule].entered::after {
    animation: section-rule-grow .75s ease-out;
  }

  @keyframes section-rule-grow {
    from { transform: scaleX(.08); opacity: .35; }
    to { transform: scaleX(1); opacity: 1; }
  }
}

/* Visión: la línea de aliados se activa cuando ella misma llega a la pantalla. */
.allies-heading .allies-rule {
  display: block;
  width: 65px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 2px;
  background: #608baa;
}

@media (prefers-reduced-motion: no-preference) {
  .allies-heading .allies-rule.entered {
    transform-origin: left center;
    animation: section-rule-grow .75s ease-out;
  }
}

/* V35: líneas reales y animación centralizada mediante Web Animations. */
main h2::after { content: none !important; }
.sdmg-heading-line {
  display: block;
  width: 65px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: #608baa;
  transform-origin: left center;
}
:is(.home-disciplines,.project-scope,.vision-priorities) .sdmg-heading-line { background: #a6c9e4; }
.cta .sdmg-heading-line { margin-inline: auto; }
main [data-motion], main [data-motion]::before, main [data-motion]::after,
main .principle-number, main .principle-icon,
main .area-list li, main .stat-row strong { animation: none !important; }

.section-next { margin-top: 32px; padding-top: 24px; border-top: 1px solid #c7d9e7; text-align: right; }
.project-scope [data-response="project"] { --response-bg: #2e5677; --response-edge: #b1d3eb; }
[data-response="photo"] { transition: box-shadow .25s ease; }
[data-response="photo"].touch-feedback { box-shadow: 0 0 0 3px #84aeca; }
@media (hover: hover) and (pointer: fine) {
  [data-response="photo"]:hover { box-shadow: 0 0 0 3px #84aeca; }
}
@media (max-width: 700px) {
  .section-next { text-align: center; }
  .section-next a { width: 100%; }
}

/* V38 — Equilibrio de las siete disciplinas sin alterar el diseño móvil. */
@media (min-width: 761px) {
  .specialty-directory .large-spec > .spec-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc((100% - 24px) / 2);
    justify-self: center;
  }
}
@media (min-width: 701px) {
  .home-disciplines .area-list > li:last-child:nth-child(odd) {
    grid-column: 2;
    width: 100%;
  }
}
