/* Ideas: hero con fotos apiladas, filtros por tecnología y uso, cuadrícula de ideas y guía rápida */

/* HERO */
.ihero { background: var(--bg); color: var(--cream); padding: clamp(48px, 7vw, 96px) 0 0; position: relative; overflow: hidden; }
.ihero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; background: radial-gradient(closest-side, rgba(255, 194, 0, .14), transparent 70%); pointer-events: none; }
.ihero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; }
.ihero__title { font-size: clamp(54px, 8vw, 120px); margin-bottom: 28px; }
.ihero__title .line { display: block; overflow: hidden; padding: .12em 0 .04em; margin-top: -.12em; }
.ihero__title .line > span { display: inline-block; }
.ihero__lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--muted); max-width: 560px; margin: 0 0 32px; }
.ihero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.btn--ghost { border: 1.5px solid rgba(244, 238, 228, .35); color: var(--cream); }
.btn--ghost:hover { border-color: var(--yellow); color: var(--yellow); }

.ihero__stack { position: relative; aspect-ratio: 1 / 1.05; }
.ihero__card { position: absolute; border-radius: 22px; object-fit: cover; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); transition: transform 1.2s cubic-bezier(.19, 1, .22, 1), opacity 1s ease; }
.ihero__card--1 { width: 62%; height: 78%; left: 4%; top: 6%; rotate: -4deg; }
.ihero__card--2 { width: 30%; height: 62%; right: 6%; top: 0; rotate: 5deg; background: var(--sand); object-fit: contain; }
.ihero__card--3 { width: 50%; height: auto; right: 0; bottom: 0; object-fit: contain; box-shadow: none; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6)); }
.js .ihero__title .line > span { transform: translateY(105%); transition: transform 1.1s cubic-bezier(.19, 1, .22, 1); }
.js .ihero__title .line:nth-child(2) > span { transition-delay: .1s; }
.js .ihero__title .line:nth-child(3) > span { transition-delay: .2s; }
.js .ihero__card { opacity: 0; transform: translateY(60px) scale(.94); }
.js .ihero__card--2 { transition-delay: .15s; }
.js .ihero__card--3 { transition-delay: .3s; }
.js .ihero.is-ready .ihero__title .line > span { transform: none; }
.js .ihero.is-ready .ihero__card { opacity: 1; transform: translate3d(0, var(--py, 0px), 0); }

.ihero__techs { list-style: none; margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); position: relative; }
.ihero__techs li + li { border-left: 1px solid var(--line); }
.ihero__techs a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 26px clamp(12px, 2vw, 28px); color: var(--cream); text-decoration: none; transition: background .3s ease, color .3s ease; }
.ihero__techs b { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.4vw, 34px); text-transform: uppercase; }
.ihero__techs span { font-size: 13px; color: var(--muted-2); white-space: nowrap; }
.ihero__techs a:hover { background: var(--yellow); color: var(--bg); }
.ihero__techs a:hover span { color: var(--bg); }

/* IDEAS */
.ideas { padding: clamp(72px, 9vw, 120px) 0; }
.ideas__intro, .pick__intro { max-width: 380px; margin: 0; font-size: 16px; line-height: 1.6; }
.ideas__intro { color: #4A433A; }

.filters { position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 14px 18px; margin-bottom: 32px; background: rgba(242, 234, 223, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(20, 20, 20, .1); border-radius: 20px; }
.filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters__label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6B6255; margin-right: 4px; }
.chip { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1.5px solid rgba(20, 20, 20, .18); background: transparent; color: var(--ink); cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease; }
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.filters__count { margin: 0 0 0 auto; font-size: 14px; color: #6B6255; white-space: nowrap; }
.filters__count b { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--ink); margin-right: 4px; display: inline-block; }
.filters__count b.bump { animation: bump .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes bump { 40% { transform: scale(1.35); color: var(--gold); } }

.ideas__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: 22px; }
.idea { display: flex; flex-direction: column; background: #FBF7F1; border-radius: 22px; overflow: hidden; border: 1px solid rgba(20, 20, 20, .08); transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease, opacity .3s ease; }
.idea:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(20, 20, 20, .14); }
.idea[hidden] { display: none; }
.idea--wide { grid-column: span 2; }
.idea--tall { grid-row: span 2; }
.idea__media { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-2); }
.idea--wide .idea__media { aspect-ratio: 16 / 7.4; }
.idea--tall .idea__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 340px; }
.idea__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.idea:hover .idea__media img { transform: scale(1.06); }
.tag.idea__tech { left: 14px; top: 14px; bottom: auto; display: inline-flex; align-items: center; gap: 8px; }
.idea__tech::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.idea__tech--3dti::before { background: #7FB2FF; }
.idea__tech--uvdtf::before { background: #B78CFF; }
.idea__tech--stamping::before { background: linear-gradient(135deg, #F6E27A, #B88700); }
.idea__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.idea__uses { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.idea__uses li { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--olive); background: rgba(107, 90, 31, .1); padding: 4px 9px; border-radius: 999px; }
.idea__title { font-family: var(--serif); font-weight: 600; font-size: clamp(21px, 1.8vw, 25px); line-height: 1.2; margin: 4px 0 0; color: var(--ink); }
.idea__text { margin: 0; font-size: 15px; line-height: 1.55; color: #4A433A; }
.idea__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 6px; }
.idea__ask { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--yellow); padding-bottom: 2px; }
.idea__ask svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s ease; }
.idea__ask:hover svg { transform: translateX(4px); }
.idea__more { font-size: 13px; color: #6B6255; text-decoration: none; }
.idea__more:hover { color: var(--ink); text-decoration: underline; }

/* Filtrado: salida y entrada */
.idea.is-leaving { opacity: 0; transform: scale(.96); pointer-events: none; }
.idea.is-entering { animation: ideaIn .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--i, 0ms); }
@keyframes ideaIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.ideas__empty { text-align: center; font-size: 18px; padding: 48px 0; }
.ideas__empty a { color: var(--ink); font-weight: 700; }

/* QUÉ TÉCNICA ELEGIR */
.pick { background: var(--bg); color: var(--cream); padding: clamp(72px, 9vw, 120px) 0; }
.pick__intro { color: var(--muted); }
.pick__list { list-style: none; margin: 0; padding: 0; counter-reset: pick; border-top: 1px solid var(--line); }
.pick__item { counter-increment: pick; display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.pick__item::before { content: "0" counter(pick); font-family: var(--display); font-size: 28px; color: var(--muted-3); }
.pick__q { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; }
.pick__a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--cream); text-decoration: none; transition: background .3s ease, color .3s ease, border-color .3s ease; }
.pick__a b { font-family: var(--display); font-weight: 400; font-size: 30px; text-transform: uppercase; }
.pick__a span { font-size: 14px; color: var(--muted-2); text-align: right; }
.pick__a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--bg); }
.pick__a:hover span { color: var(--bg); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .ideas__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ihero__grid { grid-template-columns: 1fr; }
  .ihero__stack { max-width: 460px; width: 100%; margin: 0 auto; }
  .ihero__techs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ihero__techs li:nth-child(3) { border-left: 0; }
  .ihero__techs li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pick__item { grid-template-columns: 44px minmax(0, 1fr); }
  .pick__a { grid-column: 2; }
}
@media (max-width: 640px) {
  .ideas__grid { grid-template-columns: 1fr; }
  .idea--wide { grid-column: auto; }
  .idea--tall { grid-row: auto; }
  .idea--wide .idea__media, .idea--tall .idea__media { aspect-ratio: 4 / 3; flex: none; min-height: 0; }
  .filters { position: static; padding: 14px; }
  .filters__row { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .filters__row::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .filters__count { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .js .ihero__title .line > span, .js .ihero__card { transform: none; opacity: 1; transition: none; }
  .idea, .idea__media img { transition: none; }
  .idea.is-entering { animation: none; }
}
