/* ==========================================================================
   ZOLDERTECH · Estilos específicos del INDEX
   ========================================================================== */

/* ---------------------------------------------------------------- HERO -- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: var(--header-h);
}
/* Grilla técnica sutil + resplandor cálido. Sin z-index ni transform en
   ancestros del logo, para que la mezcla del JPG con el fondo funcione. */
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 68% 42%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 70% at 68% 42%, #000 0%, transparent 78%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 42% 46% at 68% 44%, rgba(255,217,0,.075), transparent 70%);
}
.hero__inner {
  position: relative; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 5vh, 4rem);
}
.hero__copy { position: relative; }
.hero__logo {
  width: min(100%, 440px);
  margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
  background: transparent; /* se funde con la grilla del hero */
}
.hero__logo img { animation: logoIn 1s var(--ease) .1s both; }
@keyframes logoIn { from { opacity: 0; } to { opacity: 1; } }

.hero__title { font-size: clamp(2rem, 1.1rem + 2.7vw, 3.35rem); margin-bottom: var(--s-5); }
.hero__title em { font-style: normal; color: var(--z-yellow); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); animation: lineIn .9s var(--ease) forwards; }
.hero__title .line:nth-child(1) > span { animation-delay: .35s; }
.hero__title .line:nth-child(2) > span { animation-delay: .47s; }
.hero__title .line:nth-child(3) > span { animation-delay: .59s; }
@keyframes lineIn { to { transform: none; } }

.hero__lead, .hero__actions { opacity: 0; animation: riseIn .9s var(--ease) forwards; }
.hero__lead { animation-delay: .8s; margin-bottom: var(--s-6); }
.hero__actions { animation-delay: .95s; display: flex; flex-wrap: wrap; gap: var(--s-3); }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Dibujo técnico ---- */
.hero__visual { position: relative; min-width: 0; }
.hero__drawing { transition: transform 600ms var(--ease); will-change: transform; }
.filter-svg { width: 100%; height: auto; overflow: visible; }
.filter-svg * { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.filter-svg .o1 { stroke: var(--z-silver); stroke-width: 1.3; }
.filter-svg .o2 { stroke: #6a6a6a; stroke-width: 1; }
.filter-svg .axis { stroke: #4a4a4a; stroke-width: 1; stroke-dasharray: 14 4 2 4; opacity: 0; animation: fade .8s var(--ease) .1s forwards; }
.filter-svg .pleat line { stroke: #7a7a7a; stroke-width: .9; opacity: 0; animation: fade .5s var(--ease) forwards; animation-delay: calc(1.1s + var(--i) * 28ms); }
.filter-svg .tube { stroke: var(--z-silver); stroke-width: 1.1; stroke-dasharray: 9 5; }
.filter-svg .thread line { stroke: #7a7a7a; stroke-width: 1; }
.filter-svg .valve rect, .filter-svg .valve polyline { stroke: var(--z-red); stroke-width: 1.5; }
.filter-svg .fl { stroke: var(--z-yellow); stroke-width: 2.2; }
.filter-svg .flow polyline { stroke: var(--z-yellow); stroke-width: 2; }
.filter-svg .flow .arrow { fill: var(--z-yellow); stroke: none; }
.filter-svg .ld { stroke: #6a6a6a; stroke-width: .9; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; animation-delay: var(--d); }
.filter-svg .callout .dot { fill: var(--z-red); stroke: none; opacity: 0; animation: fade .4s var(--ease) forwards; animation-delay: var(--d); }
.filter-svg .lbl { fill: var(--z-silver); stroke: none; font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; opacity: 0; animation: fade .6s var(--ease) forwards; animation-delay: var(--d); }
.filter-svg .lbl .n { fill: var(--z-dim); }

.filter-svg .dr { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s var(--ease) forwards; animation-delay: var(--d, 0s); }
.filter-svg .fl { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
.filter-svg .fd { opacity: 0; animation: fade .7s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---- Franja inferior (datos de plataforma) ---- */
.hero__strip { position: relative; border-top: 1px solid var(--z-line); background: rgba(21,21,21,.55); }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip > div { padding: 1.05rem 1.25rem; border-left: 1px solid var(--z-line); }
.strip > div:first-child { border-left: 0; padding-left: 0; }
.strip dt { color: var(--z-dim); margin-bottom: .2rem; font-size: .68rem; }
.strip dd { font-family: var(--f-display); font-stretch: 105%; font-weight: 600; font-size: 1rem; letter-spacing: .03em; }

/* ------------------------------------------------------- PLATAFORMA ----- */
.plat { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.plat__head .eyebrow { margin-bottom: var(--s-5); }
.plat__head .h2 { font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.75rem); font-stretch: 108%; line-height: 1.12; }
.plat__body { display: grid; gap: var(--s-6); padding-top: 2.6rem; }
.spec { padding: var(--s-5); }
.spec__title { color: var(--z-dim); margin-bottom: var(--s-4); }
.spec dl > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: .75rem 0; border-top: 1px solid var(--z-line); }
.spec dt { color: var(--z-dim); align-self: center; font-size: .7rem; }
.spec dd { text-align: right; font-size: .98rem; }

/* --------------------------------------------------------- PRINCIPIOS --- */
.prin__head { margin-bottom: var(--s-7); }
.prin__head .eyebrow { margin-bottom: var(--s-5); }
.prin__head .h2 { font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.75rem); font-stretch: 108%; line-height: 1.12; }
.prin__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--z-line); }
.principle {
  --pl: var(--s-6);
  position: relative;
  padding: var(--s-6) var(--s-5) var(--s-2) var(--pl);
  border-left: 1px solid var(--z-line);
}
.principle:first-child { --pl: 0px; border-left: 0; }
/* franja del isotipo: corta en reposo, se extiende al pasar el mouse */
.principle::before {
  content: ""; position: absolute; left: var(--pl); top: -1px; width: 56px; height: 9px;
  background: repeating-linear-gradient(to bottom, var(--z-red) 0 2px, transparent 2px 4.5px);
  transition: width var(--t-slow) var(--ease);
}
.principle:hover::before { width: calc(100% - var(--pl) - var(--s-5)); }
.principle__n {
  display: block; margin-bottom: var(--s-5);
  font-size: clamp(3.75rem, 2.4rem + 4.6vw, 6.25rem); font-stretch: 125%; line-height: .9; letter-spacing: -.02em;
  color: var(--z-line);
  transition: color var(--t-med) var(--ease);
}
.principle__n::after { content: ""; display: block; width: 28px; height: 2px; margin-top: var(--s-4); background: var(--z-yellow); }
.principle:hover .principle__n { color: var(--z-yellow); }
.principle__t { font-size: clamp(1.35rem, 1.05rem + .9vw, 1.8rem); font-stretch: 108%; margin-bottom: var(--s-3); }
.principle__d { color: var(--z-silver); max-width: 34ch; }

/* -------------------------------------------------------------- ÁMBITO -- */
.section--alt { background: linear-gradient(to bottom, rgba(21,21,21,0), rgba(21,21,21,.7) 20%, rgba(21,21,21,.7) 80%, rgba(21,21,21,0)); }
.amb__head { margin-bottom: var(--s-7); max-width: 60ch; }
.amb__head .eyebrow { margin-bottom: var(--s-5); }
.amb__head .h2 { margin-bottom: var(--s-4); }
.scopes { display: flex; gap: var(--s-4); }
.scope {
  flex: 1 1 0; min-width: 0; min-height: 380px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--s-5); cursor: pointer; overflow: hidden;
  transition: flex-grow var(--t-slow) var(--ease), border-color var(--t-med) var(--ease);
}
.scope.is-open { flex-grow: 2.4; border-color: rgba(255,217,0,.4); }
.scope:hover { border-color: rgba(255,217,0,.4); }
.scope__top { display: flex; justify-content: space-between; align-items: flex-start; }
.scope__n { color: var(--z-dim); }
.scope__icon { width: 52px; height: 52px; color: var(--z-silver); transition: color var(--t-med) var(--ease); }
.scope.is-open .scope__icon { color: var(--z-yellow); }
.scope__t { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-stretch: 112%; margin-top: auto; padding-top: var(--s-6); }
.scope__more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--t-slow) var(--ease), opacity var(--t-med) var(--ease); }
.scope__more > * { overflow: hidden; min-height: 0; }
.scope.is-open .scope__more { grid-template-rows: 1fr; opacity: 1; }
.scope__more p { color: var(--z-silver); margin-top: var(--s-3); max-width: 44ch; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: var(--s-4); }
.tags li { padding: .3rem .6rem; border: 1px solid var(--z-line); border-radius: 2px; color: var(--z-silver); font-size: .68rem; }

/* ------------------------------------------------------- CIRCUIT ZOLDER - */
.cz { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.cz__copy .eyebrow { margin-bottom: var(--s-5); }
.cz__copy .h2 { margin-bottom: var(--s-5); }
/* relación de origen: Circuit Zolder → ZOLDERTECH */
.relation { width: 100%; max-width: 520px; justify-self: end; }
.node { padding: var(--s-5); }
.node__name { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.1; margin-bottom: var(--s-2); }
.node__meta { color: var(--z-dim); font-size: .7rem; }
.node--platform { border-color: rgba(255,217,0,.4); }
.link { display: flex; align-items: center; gap: var(--s-4); height: 108px; padding-left: var(--s-5); }
.link__line {
  position: relative; align-self: stretch; width: 28px; margin-block: 6px 16px;
  background: repeating-linear-gradient(to bottom, var(--z-red) 0 2px, transparent 2px 6px);
}
.link__line::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 3px);
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 11px solid var(--z-yellow);
}
.link__label { color: var(--z-silver); font-size: .72rem; }

/* ------------------------------------------------------------ CONTACTO -- */
.contact {
  position: relative; padding-block: clamp(var(--s-8), 10vw, var(--s-9));
  border-top: 1px solid var(--z-line); border-bottom: 1px solid var(--z-line);
  background: var(--z-anthracite);
  overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: min(38%, 520px);
  background: repeating-linear-gradient(to bottom, rgba(237,0,22,.5) 0 2px, transparent 2px 9px);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent);
          mask-image: linear-gradient(90deg, #000, transparent);
  opacity: .35; pointer-events: none;
}
.contact__inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.contact__copy .eyebrow { margin-bottom: var(--s-5); }
.contact__copy .h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3.1rem); }
.channels li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: 1rem 0; border-top: 1px solid var(--z-line); }
.channels li:last-child { border-bottom: 1px solid var(--z-line); }
.channels .mono { color: var(--z-dim); font-size: .7rem; }
.channel__v { font-size: 1.05rem; text-align: right; }
.channel__v.is-pending { color: var(--z-dim); font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }

/* --------------------------------------------------------- RESPONSIVE --- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-6); padding-top: var(--s-6); }
  .hero__visual { max-width: 640px; margin-inline: auto; width: 100%; }
  .plat, .cz, .contact__inner { grid-template-columns: 1fr; }
  .plat__body { padding-top: 0; }
  .relation { justify-self: start; }
  .contact__inner { align-items: start; }
}
@media (max-width: 860px) {
  .scopes { flex-direction: column; }
  .scope { min-height: 0; flex: none; }
  .scope__more { grid-template-rows: 1fr; opacity: 1; }
  .scope__t { padding-top: var(--s-5); margin-top: 0; }
  .scope { gap: var(--s-2); }
  .scope.is-open { flex-grow: 0; }
}
@media (max-width: 760px) {
  .strip { grid-template-columns: 1fr; }
  .strip > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: .85rem 0; border-left: 0; border-top: 1px solid var(--z-line); }
  .strip > div:first-child { border-top: 0; }
  .strip dt { margin-bottom: 0; }
  .prin__list { grid-template-columns: 1fr; }
  .principle { --pl: 0px; display: grid; grid-template-columns: 4.6rem 1fr; column-gap: var(--s-4); padding: var(--s-5) var(--s-2) var(--s-5) 0; border-left: 0; border-top: 1px solid var(--z-line); }
  .principle:first-child { border-top: 0; }
  .principle::before { display: none; }
  .principle__n { grid-row: 1 / span 2; margin: 0; font-size: 3rem; }
  .principle__n::after { margin-top: var(--s-3); }
  .principle__t { align-self: end; margin-bottom: var(--s-2); }
  .principle__d { grid-column: 2; }
}
@media (max-width: 640px) {
  .hero__logo { width: min(100%, 340px); }
  .hero__actions .btn { flex: 1 1 100%; }
  /* En pantallas chicas se recorta el dibujo al corte central y se ocultan las llamadas */
  .hero__visual { overflow: hidden; }
  .filter-svg { width: 178%; max-width: none; margin-left: -39%; }
  .filter-svg .callouts { display: none; }
}
@media (hover: none) { .panel::before { display: none; } }

/* flechas de flujo a través del medio filtrante */
.filter-svg .rad path { stroke: var(--z-yellow); stroke-width: 1.4; stroke-dasharray: 3 5; opacity: .85; }
.filter-svg .rad polyline { stroke: var(--z-yellow); stroke-width: 1.6; }
.filter-svg .rad { opacity: 0; animation: fade .6s var(--ease) forwards; animation-delay: var(--d); }

/* Contacto: margen de desplazamiento extra al llegar desde el menú móvil,
   para que el título quede holgadamente libre del header fijo. */
@media (max-width: 900px) {
  #contacto { scroll-margin-top: 24px; }
}
