/* ==========================================================================
   EDIFICIO PRAGA — layout.css
   Marco, navegación, hero, secciones y rejillas.
   ========================================================================== */

/* ---- Contenedor ---- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Marco fino permanente — replica el borde interior de cada lámina del dossier
   ========================================================================== */
.frame {
  position: fixed;
  inset: var(--frame-in);
  border: 1px solid var(--line-soft);
  pointer-events: none;
  z-index: 60;
}

/* ==========================================================================
   Barra de progreso de lectura
   ========================================================================== */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  z-index: 120;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--c-gold-dark), var(--c-gold), var(--c-gold-light));
  box-shadow: 0 0 12px rgba(192, 160, 88, .6);
}

/* ==========================================================================
   Navegación
   ========================================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .5s var(--ease), backdrop-filter .5s var(--ease),
              border-color .5s var(--ease), padding .5s var(--ease);
  border-bottom: 1px solid transparent;
  padding-block: clamp(.9rem, 1.6vw, 1.5rem);
}

.nav.is-scrolled {
  background-color: rgba(13, 16, 7, .82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-soft);
  padding-block: .7rem;
}

/* Oculta la barra al bajar, la devuelve al subir */
.nav.is-hidden { transform: translateY(-115%); }
.nav { transition-property: background-color, backdrop-filter, border-color, padding, transform; }

.nav__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}
.nav__brand img {
  width: auto;
  height: clamp(30px, 3.4vw, 40px);
}
.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav__brand-text strong {
  font-family: var(--f-display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--c-cream);
}
.nav__brand-text em {
  font-size: .53rem;
  font-style: normal;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--c-olive);
  margin-top: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.1vw, 2.1rem);
}
.nav__links > a:not(.nav__cta) {
  position: relative;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: rgba(244, 237, 224, .72);
  padding-block: .35rem;
  transition: color .35s var(--ease);
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 34px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--c-cream);
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: -8% 0 -8% 0;
  z-index: -2;
  will-change: transform;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 46%, rgba(13, 16, 7, .10) 0%, rgba(13, 16, 7, .62) 62%, rgba(13, 16, 7, .88) 100%),
    linear-gradient(to bottom, rgba(13, 16, 7, .72) 0%, rgba(13, 16, 7, .22) 26%, rgba(13, 16, 7, .55) 72%, var(--c-bg) 100%);
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(6rem, 12vh, 9rem) var(--gutter) clamp(4rem, 9vh, 6rem);
  width: 100%;
}

.hero__logo {
  width: clamp(88px, 11vw, 140px);
  height: auto;
  margin-bottom: clamp(1.6rem, 4vh, 3rem);
  filter: drop-shadow(0 6px 26px rgba(0, 0, 0, .55));
}

.hero__wordmark { line-height: 0; }
.hero__wordmark img {
  width: clamp(270px, 52vw, 660px);
  height: auto;
  filter: drop-shadow(0 14px 44px rgba(0, 0, 0, .6));
}

.hero__rule { margin-top: clamp(1.5rem, 3.5vh, 2.4rem); }

.hero__tagline {
  margin-top: clamp(1.1rem, 2.4vh, 1.7rem);
  font-size: clamp(.74rem, .62rem + .5vw, .98rem);
  font-weight: 400;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--c-cream);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .8);
}
.hero__tagline span { color: var(--c-gold); margin-inline: .35em; }

.hero__place {
  margin-top: .85rem;
  font-size: clamp(.6rem, .55rem + .2vw, .7rem);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--c-olive);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(-1rem, -2vh, 0rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: clamp(38px, 6vh, 62px);
  background: linear-gradient(to bottom, transparent, var(--c-gold));
  position: relative;
  overflow: hidden;
}
.hero__scroll-text {
  font-size: .58rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--c-olive);
  transition: color .35s var(--ease);
}

/* ==========================================================================
   Secciones
   ========================================================================== */
.section {
  position: relative;
  padding-block: var(--sec-y);
}

/* Alterna un fondo apenas más claro para separar bloques sin líneas duras */
.section:nth-of-type(even) {
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(36, 41, 20, .85) 0%, transparent 70%),
    var(--c-bg);
}

.section--center { text-align: center; }
.section--center .lede,
.section--center .note { margin-inline: auto; }
.section--center .rule { margin-inline: auto; }
.section--center .display { margin-top: 1rem; }
/* Aire suficiente para que la itálica no roce el ornamento */
.section--center .rule--ornament { margin-top: clamp(1.5rem, 2.8vw, 2.2rem); }

.section--flush { padding-block: 0; }

/* Folio "Nº 01" en la esquina, como en el dossier */
.section__no {
  position: absolute;
  top: clamp(1.8rem, 3.5vw, 3.2rem);
  right: clamp(1.6rem, 4vw, 4.2rem);
  font-family: var(--f-display);
  font-size: clamp(.9rem, .8rem + .4vw, 1.15rem);
  letter-spacing: .22em;
  color: var(--c-olive);
  opacity: .65;
  pointer-events: none;
}
.section__no sup { letter-spacing: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  margin-bottom: 1.6rem;
}
.section__head--split {
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}
/* Abre un respiro cuando el subapartado llega después de otro bloque */
.section__head--sub { margin-top: clamp(3.5rem, 7vw, 6rem); }
.note--right { text-align: right; max-width: 42ch; }

/* ---- Rejillas ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.grid-2--wide { grid-template-columns: 1.15fr 1fr; align-items: stretch; }
.grid-2--bottom { align-items: end; margin-top: clamp(2.5rem, 5vw, 4rem); }

.col { display: flex; flex-direction: column; }

/* La lista de "Un proyecto inteligente" es mucho más alta que su titular:
   se ancla para que acompañe a la lectura en vez de dejar un hueco. */
@media (min-width: 1025px) {
  #proyecto .col:first-child {
    position: sticky;
    top: clamp(7rem, 15vh, 10rem);
  }
}

/* Ritmo vertical dentro de una columna editorial */
.col > .display { margin-top: 1.1rem; }
.col > .rule    { margin-top: 1.8rem; }
.col > .lede    { margin-top: 1.8rem; }

/* ==========================================================================
   Bloque partido "Vivir Praga"
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  min-height: 92vh;
}

.split__media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.split__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
/* El texto cae sobre el cielo del render: el velo debe mantener oscura
   toda la banda izquierda, no sólo la esquina. */
.split__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg,
      rgba(13, 16, 7, .96) 0%,
      rgba(13, 16, 7, .90) 34%,
      rgba(13, 16, 7, .55) 58%,
      rgba(13, 16, 7, .16) 84%,
      rgba(13, 16, 7, 0) 100%),
    linear-gradient(to bottom,
      rgba(13, 16, 7, .45) 0%,
      rgba(13, 16, 7, 0) 42%);
}
.split__caption {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5.5rem);
  max-width: 34rem;
}
.split__caption .display { margin-top: 1rem; }
.split__caption .rule    { margin-top: 1.6rem; }
.split__caption .lede    { margin-top: 1.6rem; }

.split__cards {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
  background:
    radial-gradient(ellipse 80% 70% at 60% 40%, var(--c-surface-2) 0%, transparent 75%),
    var(--c-bg);
}

/* ==========================================================================
   Pie
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--c-void);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  font-size: var(--t-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-muted);
}
