/* ==========================================================================
   3DParnaíba — página inicial (e peças compartilhadas com o catálogo)
   ========================================================================== */

/* --------------------------------------------------------------- hero */
.hero { position: relative; padding-top: clamp(108px, 13vw, 156px); padding-bottom: clamp(48px, 6vw, 88px); min-height: 100svh; display: grid; align-items: center; overflow: clip; }
.hero-grid { display: grid; gap: clamp(40px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: clamp(20px, 2.6vw, 32px); justify-items: start; min-width: 0; }
.hero-copy .lead { max-width: 30em; }
.hero-stage { position: relative; width: min(100%, 540px); justify-self: center; }
.hero-stage .seal { right: -3%; top: 2%; }
.hero-stage .hud { position: absolute; z-index: 3; left: -3%; bottom: 3%; rotate: -3.5deg; }
.hero-stage .note { position: absolute; z-index: 3; left: 0; top: 3%; rotate: -7deg; }
/* hexágonos soltos da marca */
.hexdot { position: absolute; z-index: -1; aspect-ratio: 1; clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%); pointer-events: none; animation: floaty 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.9s); }
@keyframes floaty { 50% { transform: translateY(-16px) rotate(12deg); } }
.hero .hexdot:nth-of-type(1) { width: clamp(46px, 6vw, 86px); background: var(--orange); left: 44%; top: 15%; }
.hero .hexdot:nth-of-type(2) { width: clamp(26px, 3vw, 44px); background: var(--blue); left: 3%; bottom: 9%; }
.hero .hexdot:nth-of-type(3) { width: clamp(20px, 2.2vw, 34px); background: var(--ink); right: 5%; bottom: 6%; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .hero-stage { justify-self: end; }
}
@media (max-width: 959px) {
  .hero { min-height: 0; }
  .hero-stage { width: min(94%, 420px); margin-top: 8px; }
  .hero-copy .btn { flex: 1 1 auto; }
  .hero .hexdot:nth-of-type(1) { left: auto; right: 4%; top: 86px; }
}

/* --------------------------------------------------------------- sobre (bento) */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
  position: relative; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; container-type: inline-size;
  background: var(--surface); box-shadow: var(--shadow);
  padding: clamp(18px, 2vw, 28px); min-height: clamp(168px, 20vw, 262px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.tile-num { font: 800 clamp(2.3rem, 21cqi, 5.6rem)/.86 var(--f-display); letter-spacing: -.055em; white-space: nowrap; }
.tile-num small { font-size: .3em; letter-spacing: -.01em; margin-left: .2em; font-weight: 700; }
.tile-num .sfx { color: var(--blue); }
.tile-label { font-weight: 600; font-size: clamp(.95rem, .85rem + .4vw, 1.15rem); line-height: 1.25; }
.tile-top { display: flex; gap: 8px; flex-wrap: wrap; }
.tile--blue { background: var(--blue); color: #fff; }
.tile--blue .chip { border-color: rgba(255, 255, 255, .65); }
.tile--orange { background: var(--orange); color: var(--ink); }
.tile--ink { background: var(--ink); color: #F7F3EA; }
.tile--ink .tile-num .sfx { color: #FFA41F; }
.tile-layers { height: 46px; border-radius: 8px; background: repeating-linear-gradient(to bottom, rgba(20, 22, 28, .85) 0 1.5px, transparent 1.5px 4px); mask-image: linear-gradient(90deg, #000 40%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent); }
.tile-hex { width: 54px; aspect-ratio: 1; background: var(--orange); clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%); }
.tile--ink .tile-hex { background: var(--blue); }
.tile--video { grid-column: 1 / -1; padding: 0; min-height: 0; aspect-ratio: 16 / 11; }
.tile--video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile--video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 22, 28, .8), transparent 46%); pointer-events: none; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(16px, 2vw, 24px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px; color: #fff; }
.tile-cap strong { font: 700 clamp(1rem, .9rem + .5vw, 1.3rem)/1.15 var(--f-display); letter-spacing: -.03em; }
.tile-cap .chip { border: 0; background: var(--orange); color: var(--ink); }

@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(224px, auto); gap: 18px; }
  .tile--video { grid-column: span 5; grid-row: span 2; aspect-ratio: auto; }
  .tile:nth-child(2) { grid-column: span 4; }
  .tile:nth-child(3) { grid-column: span 3; }
  .tile:nth-child(4) { grid-column: span 3; }
  .tile:nth-child(5) { grid-column: span 4; }
}

/* --------------------------------------------------------------- seletor de duas posições */
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); position: relative; }
.t-dark .seg { border: 1px solid var(--line-2); }
.seg button { position: relative; z-index: 1; min-height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--muted); transition: color .3s; }
.seg button[aria-pressed="true"] { color: var(--seg-fg, var(--bg)); }
.seg::before { /* pílula deslizante */
  content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px;
  background: var(--seg-c, var(--text)); transition: transform .55s var(--ease-out), background .4s;
}
.seg[data-on="1"]::before { transform: translateX(100%); }

/* --------------------------------------------------------------- tecnologia */
.tech-grid { display: grid; gap: 18px; align-items: stretch; }
.tech-mid { display: grid; gap: 22px; justify-items: center; align-content: center; }
.tech-mid .hexstage { width: min(74%, 320px); --hex-2: var(--orange); }
.tech .seg { --seg-c: var(--blue); --seg-fg: #fff; }
.tech .seg[data-on="1"] { --seg-c: var(--orange); --seg-fg: var(--ink); }

.tc {
  position: relative; border-radius: var(--r-xl); padding: clamp(24px, 2.8vw, 40px); container-type: inline-size;
  background: var(--blue); color: #fff; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 20px; cursor: pointer;
  transition: opacity .5s, transform .7s var(--ease-out), box-shadow .6s;
}
.tc--o { background: var(--orange); color: var(--ink); }
.tc.is-on { box-shadow: 0 34px 60px -34px rgba(20, 22, 28, .6); }
.tc-sub { font: 600 .68rem/1.3 var(--f-mono); font-stretch: 87.5%; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.tc-name {
  font: 900 clamp(3rem, 20.5cqi, 6.2rem)/.84 var(--f-display); letter-spacing: -.06em; padding-bottom: .06em;
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: repeating-linear-gradient(to bottom, #fff 0 8px, rgba(255, 255, 255, .5) 8px 11px);
}
.tc--o .tc-name { background-image: repeating-linear-gradient(to bottom, var(--ink) 0 2.4px, rgba(20, 22, 28, .55) 2.4px 3.2px); }
.tc p { opacity: .92; }
.tc-list { display: grid; font-weight: 600; }
.tc-list li { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1.5px solid color-mix(in srgb, currentColor 28%, transparent); line-height: 1.35; }
.tc-list li::before { content: ""; flex: none; width: 9px; aspect-ratio: 1; background: currentColor; clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%); translate: 0 -1px; }
.tc-tag { margin-top: auto; align-self: flex-start; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; font-size: .95rem; rotate: -2deg; opacity: 1 !important; }
.tc--o .tc-tag { background: var(--ink); color: #fff; rotate: 2deg; }

@media (min-width: 700px) {
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-mid { grid-column: 1 / -1; grid-row: 1; padding-bottom: 14px; }
  .tech-mid .hexstage { width: min(40%, 320px); }
}
@media (min-width: 1100px) {
  .tech-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .74fr) minmax(0, 1fr); gap: 24px; }
  .tech-mid { grid-column: 2; grid-row: 1; position: sticky; top: 118px; align-self: start; padding: 26px 0 0; }
  .tech-mid .hexstage { width: 92%; }
  .tc:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .tc:nth-of-type(2) { grid-column: 3; grid-row: 1; }
  .tc:not(.is-on) { opacity: .6; transform: scale(.975); }
  .tc:not(.is-on):hover { opacity: .85; }
  .tc.is-on { transform: rotate(-.7deg); }
  .tc--o.is-on { transform: rotate(.7deg); }
}
@media (max-width: 699px) { /* no celular vira abas: só a tecnologia ativa aparece */
  .tc:not(.is-on) { display: none; }
  .tc { animation: tabin .6s var(--ease-out); }
}
@keyframes tabin { from { opacity: 0; transform: translateY(18px); } }

/* --------------------------------------------------------------- portfólio (bloco de tinta) */
.pf-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: clamp(28px, 4vw, 56px); }
.pf-head .sh-main { max-width: 760px; }
.pf-tools { display: grid; gap: 14px; justify-items: end; }
.pf-tools .note { color: var(--orange); rotate: -3deg; display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { .pf-tools .note { display: inline-flex; } }
.pf-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding-bottom: 44px; }
.pf {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 24px; overflow: hidden;
  background: var(--surface-2); text-align: left; isolation: isolate; color: #fff;
  transition: rotate .6s var(--ease-out);
}
.pf-track > .pf:nth-child(even) { top: 44px; }
.pf:hover { rotate: -1.2deg; }
.pf:nth-child(even):hover { rotate: 1.2deg; }
.pf img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* Lente: um círculo que só se move por transform (leve para a placa de vídeo).
   Sem hover, ela é uma camada do tamanho do cartão, invisível; o JS a transforma em círculo. */
.pf-lens { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .28s ease; will-change: transform, opacity; }
.pf.is-lens .pf-lens { opacity: 1; box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(0, 0, 0, .45); }
.is-scene .pf-lens { opacity: 1; transition: opacity .6s ease calc(var(--i, 0) * 50ms); }
.pf::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(20, 22, 28, .88), transparent 44%); pointer-events: none; }
.pf-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px; display: grid; gap: 5px; }
.pf-cap small { font: 600 .62rem/1 var(--f-mono); font-stretch: 80%; letter-spacing: .1em; color: #FFA41F; text-transform: uppercase; }
.pf-cap strong { font: 700 clamp(1.05rem, .9rem + .7vw, 1.45rem)/1.1 var(--f-display); letter-spacing: -.035em; }
.pf-open { position: absolute; z-index: 2; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); transition: background .3s, rotate .5s var(--ease-out); }
.pf-open svg { width: 17px; height: 17px; }
.pf:hover .pf-open { background: #FFA41F; rotate: 90deg; }
.pf-hint { display: none; }

@media (max-width: 899px) { /* carrossel deslizável */
  .pf-track {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(68vw, 300px); gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scroll-padding-inline: var(--gut); padding-bottom: 8px;
  }
  .pf-track::-webkit-scrollbar { display: none; }
  .pf { scroll-snap-align: start; }
  .pf-track > .pf:nth-child(even) { top: 0; }
  .pf-tools { justify-items: start; }
  .pf-hint { display: flex; align-items: center; gap: 14px; margin-top: 18px; font: 500 .62rem/1 var(--f-mono); font-stretch: 80%; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
  .pf-hint i { flex: 1; height: 3px; border-radius: 3px; background: var(--line-2); position: relative; overflow: hidden; }
  .pf-hint i::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--pp, .12)); background: var(--orange); }
}

.insta {
  margin-top: clamp(28px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: clamp(20px, 2.6vw, 32px); border-radius: var(--r-lg); background: var(--surface);
}
.insta p { flex: 1 1 320px; font-size: 1.15rem; line-height: 1.45; color: var(--muted); }
.insta strong { color: var(--text); }

/* --------------------------------------------------------------- ampliação (peça × cenário) */
.lb { padding: 0; border: 0; background: transparent; color: #F7F3EA; max-width: none; max-height: none; width: 100%; height: 100%; overflow: hidden; }
.lb::backdrop { background: rgba(20, 22, 28, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lb[open] { display: grid; place-items: center; animation: lbin .5s var(--ease-out); }
@keyframes lbin { from { opacity: 0; scale: .96; } }
.lb-in { width: min(100% - 28px, 1040px); display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.lb-top { width: 100%; max-width: calc((100svh - 190px) * 2 / 3); min-width: min(100%, 320px); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lb-title { display: grid; gap: 5px; min-width: 0; }
.lb-title small { font: 600 .64rem/1 var(--f-mono); font-stretch: 80%; letter-spacing: .12em; color: #FFA41F; text-transform: uppercase; }
.lb-title strong { font: 700 clamp(1.3rem, 1rem + 1.6vw, 2.1rem)/1 var(--f-display); letter-spacing: -.04em; }
.lb-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); transition: background .25s, rotate .4s var(--ease-out); }
.lb-btn:hover { background: #FFA41F; rotate: 8deg; }
.lb-btn svg { width: 19px; height: 19px; }
.cmp {
  --pos: 50%; position: relative; height: min(100svh - 190px, 900px); max-width: 100%; aspect-ratio: 2 / 3; border-radius: 24px; overflow: hidden;
  background: #282D39; touch-action: none;
}
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-select: none; }
.cmp-b { clip-path: inset(0 0 0 var(--pos)); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; translate: -1.5px 0; background: #fff; pointer-events: none; }
.cmp-line::after { content: ""; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 48px; height: 48px; border-radius: 50%; background: #FFA41F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314161C' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 0 0 4px #fff, 0 6px 22px rgba(0, 0, 0, .45); }
.cmp-tag { position: absolute; top: 12px; padding: 7px 11px; border-radius: 999px; background: #fff; color: var(--ink); font: 600 .6rem/1 var(--f-mono); font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.cmp-tag--a { left: 12px; rotate: -3deg; } .cmp-tag--b { right: 12px; rotate: 3deg; }
.cmp input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.cmp:has(input:focus-visible) { outline: 3px solid #FFA41F; outline-offset: 3px; }
.cmp.is-anim .cmp-b, .cmp.is-anim .cmp-line { transition: clip-path .9s var(--ease-out), left .9s var(--ease-out); }
.lb-nav { display: flex; align-items: center; gap: 16px; font: 500 .7rem/1 var(--f-mono); font-stretch: 80%; letter-spacing: .12em; color: #A9AEBA; }

/* --------------------------------------------------------------- catálogos */
.cats { display: grid; gap: 18px; }
.cat { position: relative; border-radius: var(--r-xl); padding: clamp(24px, 3vw, 44px); isolation: isolate; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.cat .h3 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem); }
.cat p { font-size: 1.08rem; line-height: 1.5; max-width: 34em; }
.cat-body { display: grid; gap: 16px; justify-items: start; margin-top: auto; }
.cat--key { background: var(--orange); color: var(--ink); }
.cat--key .pill { font: 600 .68rem/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 14px; rotate: -2deg; }
.cat--key .seal { right: -14px; top: -22px; width: clamp(84px, 9vw, 116px); }
.bubbles { display: flex; align-items: center; width: 88%; padding: 8px 0 8px 5%; }
.bubbles img { flex: 1 1 0; min-width: 0; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 14px 26px -12px rgba(20, 22, 28, .55); margin-left: -5%; transition: translate .7s var(--ease-out), rotate .7s var(--ease-out); animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.1s); }
.bubbles img:nth-child(3) { flex-grow: 1.2; z-index: 1; }
.cat--key:hover .bubbles img { translate: 0 calc((var(--i) - 2) * (var(--i) - 2) * -3px); rotate: calc((var(--i) - 2) * 5deg); }
@keyframes bob { 50% { transform: translateY(-9px); } }
.cat--edu { background: var(--surface); box-shadow: var(--shadow); }
.cat--edu img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 22px; rotate: -1.5deg; }
.cat--edu p { color: var(--muted); }
.dots4 { display: inline-flex; gap: 6px; }
.dots4 i { width: 14px; height: 14px; border-radius: 50%; }
.cat--all { background: var(--blue); color: #fff; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; overflow: clip; }
.cat--all > div { flex: 1 1 420px; display: grid; gap: 12px; max-width: 760px; }
.cat--all::before { content: ""; position: absolute; z-index: -1; inset: 0; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .09) 0 1.5px, transparent 1.5px 8px); mask-image: linear-gradient(100deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(100deg, transparent 40%, #000); }
@media (min-width: 900px) {
  .cats { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; }
  .cat--all { grid-column: 1 / -1; }
}
@media (max-width: 599px) { .cat--key .seal { right: -6px; top: -26px; width: 82px; } }
