:root{
  --reveal: 0;        /* 0..1 (empieza totalmente cerrado e invisible) */
  --tag: 0;           /* 0..1 aparición del texto */
  --stageW: min(1100px, 92vw);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:#111;
  background:#fff;
}

/* =========================
   HERO
========================= */
.hero{
  min-height: 180vh;
  display:flex;
  justify-content:center;
}

.stage{
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--stageW);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

/* =========================
   MARCA (ESTÁTICA)
========================= */
.brand{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: clamp(28px, 4.2vw, 72px);
  position:relative;
  z-index:4;
  padding: 0 12px;
  transform: translateY(-4vh);
}

.mark{
  width: clamp(74px, 7vw, 120px);
  height:auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 16px 36px rgba(0,0,0,.18));
}

.word{
  display:flex;
  align-items:baseline;
  letter-spacing: .08em;
  font-weight: 600;
  line-height: 1;
  font-size: clamp(34px, 5vw, 74px);
  user-select:none;
  white-space:nowrap;
  text-shadow: 0 14px 36px rgba(0,0,0,.14);
}

.avant{ color:#1b2a3a; }
.klima{ color:#6c6f73; }

/* =========================
   RECTÁNGULO (SOLO CONTORNO)
   - Invisible hasta que haya scroll
========================= */
.revealWindow{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);

  width: min(980px, 94vw);
  aspect-ratio: 16 / 9;
  border-radius: 18px;

  background: transparent;
  z-index:2;

  /* 1) Se abre desde el centro (clip) */
  clip-path: inset(
    0 calc(50% - (50% * var(--reveal)))
    0 calc(50% - (50% * var(--reveal)))
    round 18px
  );

  /* 2) Además: invisible si no hay apertura (arranque perfecto) */
  opacity: calc(var(--reveal) * 1);
}

/* Contorno */
.revealWindow::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,.22);
  box-shadow: 0 22px 55px rgba(0,0,0,.10);
}

/* =========================
   TEXTO CENTRAL QUE APARECE
   - Aparece de centro -> extremos (wipe horizontal)
   - Más abajo (se separa del logo)
========================= */
.taglineWrap{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;

  /* bajar texto respecto al centro del rectángulo */
  transform: translateY(54px);
}

.tagline{
  font-weight: 600;
  letter-spacing: .04em;
  font-size: clamp(16px, 2.1vw, 28px);
  color: rgba(0,0,0,.78);

  /* suavidad */
  opacity: var(--tag);
  transform: translateY(calc((1 - var(--tag)) * 8px));

  /* “desde el centro a los extremos”: clip horizontal */
  -webkit-clip-path: inset(0 calc(50% - (50% * var(--tag))) 0 calc(50% - (50% * var(--tag))));
  clip-path: inset(0 calc(50% - (50% * var(--tag))) 0 calc(50% - (50% * var(--tag))));
}

/* =========================
   CONTENIDO POSTERIOR
========================= */
.after{
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 16px 120px;
}

.ctaRow{
  display:flex;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}

.btn{
  display:inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  background:#111;
  color:#fff;
  text-decoration:none;
  font-weight:600;
}
.btnOutline{
  background:transparent;
  color:#111;
  border: 1px solid rgba(0,0,0,.2);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 520px){
  .brand{ transform: translateY(-2vh); }
  .word{ letter-spacing: .06em; }
  .revealWindow{ width: min(980px, 96vw); }
  .taglineWrap{ transform: translateY(42px); }
}
