/* ==========================================================================
   DTI Barcelona · Landing (index.php)
   Tokens, base, botones y .ph están en header.css (común a todas las páginas).
   ========================================================================== */

/* HERO */
.hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.hero__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero__title { flex: 1 1 620px; min-width: 0; }
.hero__title h1 { font-size: clamp(56px, 9.2vw, 140px); }
.hero__aside { flex: 1 1 340px; max-width: 420px; }
.hero__aside p { margin: 0 0 28px; color: var(--muted); font-size: 18px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { margin-top: clamp(40px, 5vw, 64px); }
.hero__media .ph { aspect-ratio: 2.2 / 1; border-radius: 22px; }

/* PROMESAS */
.promises { padding: 56px 0; }
.promises__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.promise { display: flex; gap: 16px; align-items: center; padding: 28px 20px; }
.promise svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--yellow); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.promise .d { font-size: 26px; }

/* MARQUEE */
.marquee { background: var(--yellow); color: var(--bg); overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: 8px -20px 0; }
.marquee__track { display: flex; gap: 56px; white-space: nowrap; width: max-content; font-size: clamp(32px, 4vw, 52px); animation: marq 32s linear infinite; }
@keyframes marq { to { transform: translateX(-50%); } }

/* TECNOLOGÍAS */
.techs { padding: clamp(72px, 9vw, 128px) 0; }
.techs__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .techs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .techs__grid { grid-template-columns: 1fr; } }
.tech-card { display: flex; flex-direction: column; color: inherit; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tech-card:hover { color: inherit; }
.tech-card__media { aspect-ratio: 4 / 3; border-radius: 0; }
.tech-card__media--empty { display: flex; align-items: center; justify-content: center; background: #1f1f1f; border-bottom: 1px dashed #3a3a3a; color: var(--muted-3); font-size: 14px; letter-spacing: .08em; }
.tech-card__body { padding: 24px; }
.tech-card__name { font-size: 40px; color: var(--yellow); }
.tech-card__body p { margin: 10px 0 18px; color: var(--muted); font-size: 15px; }
.tech-card__more { font-weight: 700; font-size: 14px; color: var(--cream); }

/* DTI */
.dti { padding: clamp(72px, 9vw, 128px) 0; }
.dti__grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); }
.dti__text { flex: 1 1 380px; min-width: 0; }
.dti__title { font-size: clamp(48px, 6.4vw, 92px); }
.dti__text > p { margin: 0 0 32px; }
.dti__gallery { flex: 1.3 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dti__wide { grid-column: span 2; }
.dti__wide .ph { aspect-ratio: 2.36 / 1; }
.dti__square { aspect-ratio: 1 / 1; }

/* MACRO */
.macro { background: var(--bg); padding: clamp(72px, 9vw, 128px) 0; }
.macro__grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: center; }
.macro__media { flex: 1.4 1 560px; min-width: 0; position: relative; }
.macro__media .ph { aspect-ratio: 1.75 / 1; border-radius: 22px; }
.macro__badge { position: absolute; top: 18px; left: 18px; background: var(--yellow); color: var(--bg); font-family: var(--display); font-size: 18px; letter-spacing: .06em; padding: 8px 16px; border-radius: 999px; }
.macro__text { flex: 1 1 340px; min-width: 0; }
.macro__title { font-size: clamp(44px, 5.4vw, 76px); }
.macro__text p { color: var(--muted); margin: 24px 0 32px; }
.macro__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.macro__thumbs .ph { aspect-ratio: 1 / 1; }

/* COLECCIÓN */
.collection { padding: clamp(72px, 9vw, 128px) 0; }
.collection .sec-head { margin-bottom: 44px; }
.collection__more { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--yellow); text-decoration: none; }
.collection__more:hover { color: var(--olive); }
.collection__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.collection__grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 20px; }

/* 3DTI */
.tdti { background: var(--bg); padding: clamp(72px, 9vw, 128px) 0; }
.tdti__grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: center; }
.tdti__text { flex: 1 1 420px; min-width: 0; }
.tdti__title { font-size: clamp(48px, 6.4vw, 92px); }
.tdti__text > p { color: var(--muted); margin: 28px 0 36px; }
.layers { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-2); }
.layers li { display: flex; gap: 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.layers__n { font-size: 22px; color: var(--yellow); width: 28px; }
.layers__note { color: var(--muted-2); }
.tdti__visual { flex: 1 1 460px; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.tdti__layers { grid-column: span 2; background: var(--sand); border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tdti__layers img { width: 100%; height: auto; display: block; }
.tdti__stack { grid-column: span 3; display: flex; flex-direction: column; gap: 14px; }
.tdti__stack .ph { aspect-ratio: 4 / 3; flex: 1; }
.tdti__examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 56px; }
.tdti__wide { aspect-ratio: 16 / 10; }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ==========================================================================
   Animaciones premium de la landing
   (el sistema data-reveal común está en header.css / header.js)
   ========================================================================== */

/* Titular del hero: cada línea sube desde una máscara */
.hero__h1 .line { display: block; overflow: hidden; padding: .12em 0 .04em; margin-top: -.12em; }
.hero__h1 .line > span { display: inline-block; }
.js .hero__h1 .line > span { transform: translateY(105%); transition: transform 1.1s cubic-bezier(.19, 1, .22, 1); }
.js .hero__h1 .line:nth-child(2) > span { transition-delay: .1s; }
.js .hero__h1 .line:nth-child(3) > span { transition-delay: .2s; }
.js .hero.is-ready .hero__h1 .line > span { transform: none; }
.js .hero__eyebrow { opacity: 0; transform: translateY(12px); transition: opacity .8s ease, transform .8s ease; }
.js .hero.is-ready .hero__eyebrow { opacity: 1; transform: none; }
.hero__eyebrow::before { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 194, 0, .55); } 50% { box-shadow: 0 0 0 7px rgba(255, 194, 0, 0); } }

/* Parallax de la foto del hero (usa "translate" para no chocar con el zoom del revelado) */
[data-parallax] img { translate: 0 var(--py, 0px); will-change: translate; }

/* Iconos de las promesas: el trazo se dibuja al aparecer */
.promise svg * { stroke-dasharray: 80; stroke-dashoffset: 0; }
.js .promise[data-reveal] svg * { stroke-dashoffset: 80; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0ms) + .25s); }
.js .promise.is-in svg * { stroke-dashoffset: 0; }

/* Tarjetas de tecnología: elevación, brillo amarillo e inclinación 3D (index.js) */
.techs__grid { perspective: 1200px; }
.tech-card { transition: border-color .35s ease, box-shadow .35s ease, transform .25s ease-out; transform-style: preserve-3d; }

.tech-card:hover { border-color: rgba(255, 194, 0, .55); box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 194, 0, .25); }
.tech-card__more { display: inline-flex; gap: 6px; transition: color .25s ease, gap .25s ease; }
.tech-card:hover .tech-card__more { color: var(--yellow); gap: 12px; }

/* Insignia MACRO ZOOM */
.macro__badge { animation: badgeFloat 3.6s ease-in-out infinite; }
@keyframes badgeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Botones magnéticos (index.js) */
.btn { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .js .hero__h1 .line > span, .js .hero__eyebrow { transform: none; opacity: 1; transition: none; }
  .hero__eyebrow::before, .macro__badge { animation: none; }
  [data-parallax] img { translate: none; }
  .js .promise[data-reveal] svg * { stroke-dashoffset: 0; transition: none; }
}

.dti__more { margin-top: 32px; }
.tdti__more { margin-top: 32px; }
