/* Home editorial review */
[data-editorial-theme=home] > header {
  isolation: isolate;
  transition: color .4s;
}
[data-editorial-theme=home] > header::before {
  inset: 0;
  mask-image: none;
  border-bottom: 1px solid rgb(150 178 206 / .22);
  transition: opacity .4s;
}
:root.over-home-hero [data-editorial-theme=home] > header {
  text-shadow: none;
  box-shadow: none;
}
:root.over-home-hero [data-editorial-theme=home] > header::before { opacity: 0; }
[data-editorial-theme=home] > header .brand { display: inline-flex; align-items: flex-start; gap: .2rem; }
[data-editorial-theme=home] > header .brand b { font-weight: inherit; transition: translate .35s var(--editorial-ease); }
[data-editorial-theme=home] > header .brand span { font: inherit; font-size: .59em; line-height: 1; margin: .17em 0 0; }
@media (hover:hover) {
  [data-editorial-theme=home] > header .brand:hover b { translate: 0 -2px; }
  [data-editorial-theme=home] > header .brand:hover span { animation: brand-turn .7s both; }
}
@keyframes brand-turn { 64% { rotate: 395deg; } 82% { rotate: 347deg; } 100% { rotate: 360deg; } }

.home-progress {
  position: fixed;
  inset: 27% max(.5rem, env(safe-area-inset-right)) 27% auto;
  width: 3px;
  z-index: 49;
  border-radius: 2px;
  overflow: hidden;
  background: rgb(144 172 203 / .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.home-progress.is-visible { opacity: 1; }
.home-progress span { display: block; height: 100%; background: #75bedb; transform: scaleY(var(--site-progress, 0)); transform-origin: top; }
.home-lens, .home-cursor {
  position: fixed;
  inset: 0 auto auto 0;
  translate: var(--pointer-x, -100px) var(--pointer-y, -100px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s;
}
.home-lens {
  z-index: 46;
  width: 72px;
  aspect-ratio: 1;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  backdrop-filter: contrast(1.08) saturate(1.14) blur(.35px);
  mask-image: radial-gradient(circle, #000 15%, transparent 69%);
}
.home-cursor {
  z-index: 51;
  margin: 17px 0 0 18px;
  padding: .42rem .66rem;
  border: 1px solid rgb(180 225 242 / .4);
  background: #0b1f3a;
  color: white;
  border-radius: 2rem;
  font: 500 .62rem/1.3 'IBM Plex Mono', monospace;
  letter-spacing: .09em;
}
.home-optics { position: absolute; }
@supports (backdrop-filter: url(#home-refraction)) {
  .home-lens { backdrop-filter: url(#home-refraction) contrast(1.08) saturate(1.14); }
}
.home-lens.is-visible, .home-cursor.is-visible { opacity: 1; }

.editorial #observatorio.story {
  min-height: 100svh;
  background: radial-gradient(ellipse at 10% 40%, #dfecfa, transparent 65%), var(--home-base);
}
.editorial #observatorio::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 1;
  inset: 0;
  opacity: .11;
  background: repeating-linear-gradient(119deg, rgb(30 78 140 / .16) 0 1px, transparent 1px 4px);
  mask-image: radial-gradient(ellipse at 85% 75%, #000, transparent 62%);
}
.editorial #observatorio .story-copy { z-index: 2; }
.layout-ornament {
  position: absolute;
  inset: auto -4rem 4rem auto;
  width: clamp(6rem, 11vw, 13rem);
  aspect-ratio: 2 / 1;
  background: url('assets/escenas/home/human-enxaimel.png') center / contain no-repeat;
  opacity: .1;
  transform: translateY(calc(var(--intro-velocity, 0) * 1px)) skewY(calc(var(--intro-velocity, 0) * .16deg));
  transition: transform .45s var(--editorial-ease);
  pointer-events: none;
}

[data-editorial-theme=home] .human .human-stage {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  padding: 0;
  min-height: min(100svh, 62rem);
  isolation: isolate;
}
[data-editorial-theme=home] .human .human-copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-self: stretch;
  max-width: none;
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}
.human-copy::before, .human-copy::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.human-copy::before {
  background: url('assets/escenas/home/human-enxaimel.png') 96% 94% / auto 85% no-repeat;
  opacity: .12;
}
.human-copy::after {
  background-image: linear-gradient(rgb(154 216 232 / .23) 1px, transparent 1px), linear-gradient(90deg, rgb(154 216 232 / .23) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at var(--local-x, 70%) var(--local-y, 60%), black, transparent 55%);
  opacity: .45;
}
[data-editorial-theme=home] .human-stage > .human-photo {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  max-height: 100svh;
  z-index: 0;
  object-fit: cover;
  object-position: right center;
  mask-image: linear-gradient(to right, transparent, #000 15%);
}

[data-editorial-theme=home] .human .fact strong,
[data-editorial-theme=home] .evidence h2 em,
[data-editorial-theme=home] .studies h2 em,
[data-editorial-theme=home] .analysis .section-heading em {
  background: linear-gradient(180deg, #fff, #9ad8e8);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-editorial-theme=home] .analysis .section-heading {
  isolation: isolate;
  position: relative;
  padding: clamp(1.5rem, 4vw, 4rem);
  background: #102a4c;
  color: white;
}
.editorial[data-editorial-theme=home] .analysis .section-heading :is(p,h2) { color: white; }
.editorial .section-heading > .indicator-emblem {
  grid-column: auto;
  position: absolute;
  display: grid;
  place-items: center;
  inset: clamp(.7rem, 2.8vw, 2rem) clamp(.8rem, 3vw, 2.65rem) auto auto;
  width: clamp(2.5rem, 6.3vw, 6rem);
  aspect-ratio: 1;
  perspective: 24rem;
}
.indicator-emblem::before {
  content: '';
  display: block;
  width: 68%;
  height: 100%;
  mask: url('assets/escenas/home/isotipo-blumenau.png') center / contain no-repeat;
  background: #bce7f5;
  transform: rotateY(var(--emblem-angle, 0deg));
}

.metric-demo { margin: clamp(2rem, 5vw, 4rem) 0 1.5rem; }
.metric-demo > p { margin-bottom: .7rem; font: 500 .7rem/1.6 'IBM Plex Mono', monospace; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: #7595ac; border: 1px solid #7595ac; }
.metric-cell {
  position: relative;
  isolation: isolate;
  min-height: 7rem;
  min-width: 0;
  padding: 0;
  background: #112a47;
  color: #dce8f5;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
}
.metric-cell:is(:hover,:focus-visible) { transform: none; }
.metric-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: radial-gradient(14rem circle at var(--local-x, 50%) var(--local-y, 50%), #ccf4ff, transparent 45%);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 2;
}
.metric-cell:is(:hover,:focus-visible)::after { opacity: 1; }
.metric-face,.metric-result {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .22rem;
  text-align: center;
  padding: .6rem .25rem;
  min-height: inherit;
  pointer-events: none;
}
.metric-face span,.metric-result span { font-size: .72rem; }
.metric-face strong {
  color: #dce8f5;
  font: 500 clamp(1.85rem, 3.4vw, 3.7rem)/1 'IBM Plex Mono', monospace;
  background: radial-gradient(circle, #d9f6ff 45%, #79abc8 55%) 0 0 / 4px 4px;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric-result {
  position: absolute;
  inset: 0;
  background: #edf9f4;
  color: #145437;
  clip-path: circle(0 at center);
}
.metric-result.down { background: #fff0f0; color: #882f35; }
.metric-result strong { font: 500 clamp(1.35rem, 3vw, 2.9rem)/1.15 'IBM Plex Mono', monospace; }

[data-editorial-theme=home] .evidence .evidence-intro { grid-column: 1 / -1; }
[data-editorial-theme=home] .evidence .source-layout { grid-template-columns: minmax(0, 1fr); gap: .95rem; }
[data-editorial-theme=home] .evidence .source-tabs {
  flex-direction: row;
  flex-wrap: wrap;
  margin: 0;
  gap: .45rem;
}
[data-editorial-theme=home] .source-tabs button { font-size: .8rem; padding: .55rem .92rem; }
.source-deck {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(.28rem, 1vw, .75rem);
  perspective: 45rem;
}
.source-card {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: .4rem;
  background: #0c233e;
  padding: .28rem;
  border: 1px solid rgb(205 236 255 / .26);
  border-radius: .22rem;
  min-width: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--card-x, 0deg)) rotateY(var(--card-y, 0deg)) translateY(var(--card-rise, 0px));
  transition: transform .24s, border-color .2s, background .2s;
}
.source-card:hover { --card-rise: -5px; }
.source-card[aria-pressed=true] { border-color: #bdeaf9; background: #224a64; }
.source-card img { width: 100%; aspect-ratio: 1.6; object-fit: cover; transform: translateZ(7px); }
.source-card span { color: #f3f9ff; font-size: clamp(.63rem, 1.25vw, .83rem); padding: 0 .12rem .18rem; transform: translateZ(13px); overflow-wrap: anywhere; }
[data-editorial-theme=home] .evidence .source-reading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #102a4c;
  padding: clamp(1.2rem, 3.5vw, 3.2rem);
  min-height: 22rem;
  border: 1px solid rgb(198 227 248 / .27);
}
.source-atmosphere, .source-atmosphere > img, .source-reading::after { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.source-atmosphere { z-index: -2; overflow: hidden; }
.source-atmosphere > img { object-fit: cover; object-position: center; transform-origin: top left; }
.source-reading::after {
  content: '';
  z-index: -1;
  background: linear-gradient(90deg, rgb(7 25 46 / .97) 8%, rgb(8 28 50 / .92) 48%, rgb(8 28 50 / .68)), linear-gradient(0deg, #0b1f3a, transparent 45%);
}
[data-editorial-theme=home] .evidence .source-detail { opacity: 1 !important; translate: none; }
.source-duo { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1.25rem; }
.source-duo div { padding-top: .55rem; border-top: 1px solid rgb(215 239 255 / .32); }
.source-duo dt { color: #fff; font-weight: 600; font-size: .85rem; }
.source-duo dd { margin: .4rem 0 0; color: #dce8f5; font-size: .82rem; line-height: 1.5; }
.source-reading .text-link .out-icon { transition: translate .25s; }
.source-reading .text-link:is(:hover,:focus-visible) .out-icon { translate: 3px -3px; }
[data-editorial-theme=home] .studies {
  min-height: 100svh;
  background: radial-gradient(ellipse at 88% 10%, #133455, transparent 60%), linear-gradient(#09172b 55%, #102a4c);
}
[data-editorial-theme=home] .studies .publication { transition: border-color .25s, background-color .3s; }
[data-editorial-theme=home] .studies .publication:is(:hover,:focus-visible) { background-color: #163254; }
.editorial .people article { position: relative; transition: opacity .24s; }
.editorial .people:has(article:is(:hover,:focus-visible)) article:not(:is(:hover,:focus-visible)) { opacity: .68; }
.team-avatar {
  display: grid;
  place-items: center;
  width: 3.3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgb(202 228 252 / .55);
  color: #dfecfa;
  background: #143255;
  font: 500 .9rem 'IBM Plex Mono', monospace;
  margin-bottom: .7rem;
  transition: background .3s;
}
article:is(:hover,:focus-visible) .team-avatar { background: #225982; }
.team { position: relative; isolation: isolate; }
.team::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, #c9dfea 1px, transparent 1.5px), radial-gradient(circle, #9ad8e8 1px, transparent 1.5px);
  background-size: 103px 81px, 179px 125px;
  background-position: 0 0, 31px 38px;
  mask-image: radial-gradient(ellipse at 36% 35%, #000, transparent 73%);
  opacity: .18;
}
@media (prefers-reduced-motion:no-preference) {
  .team::after { animation: team-air 26s ease-in-out infinite alternate; animation-play-state: var(--team-motion, paused); }
}
@keyframes team-air { to { transform: translateY(14px); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion:no-preference) {
    .editorial :is(#observatorio .story-intro, .human-copy, .analysis .section-heading, .evidence-intro, .team > div, .studies .section-heading) {
      animation: chapter-light linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 80%;
    }
    @keyframes chapter-light { from { opacity: .78; translate: 0 .4rem; } to { opacity: 1; translate: none; } }
  }
}

@media (max-width:950px) {
  .source-deck { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width:650px) {
  [data-editorial-theme=home] .human .human-stage { grid-template-columns: minmax(0, 1fr); }
  [data-editorial-theme=home] .human .human-copy { padding: 4rem var(--pad) 2rem; }
  [data-editorial-theme=home] .human-stage > .human-photo { aspect-ratio: 16/10; height: auto; mask-image: linear-gradient(transparent, #000 19%); }
  [data-editorial-theme=home] .analysis .section-heading { padding-right: 1rem; padding-top: 3.25rem; }
  .editorial .section-heading > .indicator-emblem { inset: .55rem .7rem auto auto; width: 2rem; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-cell { min-height: 5.4rem; }
  .source-deck { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .source-reading::after { background: rgb(8 27 50 / .91); }
  .layout-ornament { display: none; }
}
@media (prefers-reduced-motion:reduce), (hover:none), (pointer:coarse) {
  .home-lens, .home-cursor { display: none; }
}

