/* ═══════════════════════════════════════════════════════════
   PAGE: HOME (index.html)
   ─────────────────────────────────────────────────────────
   Mosaico 2x2 que preenche a primeira tela com 4 tiles
   (Frontend, Tatuagem, Aquarela, Filme). Cada tile tem
   sua cor (--acc), ícone animado e CTA de "Explorar".
   No centro dos 4, um selo flutua sobre a junção.

   Embaixo: seção "Sobre" e footer "Vamos criar juntos".
═══════════════════════════════════════════════════════════ */

/* ───── MOSAIC ───── */
.mosaic {
  position: relative;
  height: 100vh;
  min-height: 600px;
  padding: 74px 14px 14px;   /* JS ajusta paddingTop = nav.h + 14 */
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  isolation: isolate;
  filter: grayscale(0) brightness(1);
  transition:
    filter .5s ease,
    transform .5s cubic-bezier(.2, .7, .2, 1),
    box-shadow .5s ease,
    border-color .5s ease;
}

/* Wash colorido — base do tile, sem hover */
.tile .wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .78;
  transition: opacity .5s ease;
  background:
    radial-gradient(120% 90% at 80% 0%, var(--acc) 0%, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--acc) 22%, transparent), transparent 70%);
}

html[data-theme="light"] .tile .wash { opacity: .5; }

.tile .bloom {
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--acc);
  filter: blur(70px);
  opacity: .5;
  z-index: 0;
  top: -12%;
  right: -8%;
  transition: opacity .5s ease, transform .6s ease;
}

html[data-theme="dark"]  .tile .bloom { mix-blend-mode: screen; }
html[data-theme="light"] .tile .bloom { mix-blend-mode: multiply; }

/* HOVER SPOTLIGHT: tile sob o mouse fica vivo, irmãos dimmam */
.mosaic.tile-hovered .tile {
  filter: grayscale(.55) brightness(.66);
  opacity: .8;
}

.mosaic .tile:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--acc) 60%, var(--line));
  box-shadow: 0 30px 70px -40px var(--acc);
}

.tile:hover .wash { opacity: 1; }

.tile:hover .bloom {
  opacity: .6;
  transform: translate(-6%, 8%) scale(1.1);
}

/* ───── ÍCONE NO CANTO SUPERIOR DIREITO ───── */
.tile .ic {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 30px;
  height: 30px;
  z-index: 3;
  color: var(--fg);
  opacity: 1;
  transition: color .5s ease;
  transform-origin: center;
}

/* Animações específicas por especialidade — só rodam em hover */
.tile:hover .ic-code   { animation: codeType .9s ease-in-out infinite; }
.tile:hover .ic-needle { animation: needleJab .26s ease-in-out infinite; }
.tile:hover .ic-drop   { animation: dropBob 1.9s ease-in-out infinite; }
.tile:hover .ic-film .reelA { animation: reelSpin 2.4s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .tile:hover .ic-code,
  .tile:hover .ic-needle,
  .tile:hover .ic-drop,
  .tile:hover .ic-film .reelA { animation: none; }
}

/* Frontend — chevrons comprimindo como código compilando */
@keyframes codeType {
  0%, 100% { transform: scaleX(1.12) scaleY(1.05); }
  50%      { transform: scaleX(.74)  scaleY(1.05); }
}

/* Tatuagem — agulha batendo */
@keyframes needleJab {
  0%, 100% { transform: translateY(0)   rotate(0); }
  50%      { transform: translateY(-3px) rotate(-5deg); }
}

/* Aquarela — gota balançando */
@keyframes dropBob {
  0%, 100% { transform: translateY(-1px) rotate(-5deg) scale(1.02); }
  50%      { transform: translateY(3px)  rotate(5deg)  scale(1.08); }
}

/* Filme — bobinas girando */
@keyframes reelSpin { to { transform: rotate(360deg); } }

/* ───── CONTEÚDO DO TILE ───── */
.tile .content {
  position: relative;
  z-index: 3;
  padding: 30px 30px 32px;
}

.tile .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.tile h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.01em;
  font-size: clamp(34px, 4.4vw, 60px);
}

.tile h3 .it {
  font-style: italic;
  font-weight: 400;
}

.tile .desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--dim);
  max-width: 380px;
  margin-top: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height .5s ease,
    opacity .45s ease,
    margin-top .5s ease;
}

.tile:hover .desc {
  max-height: 120px;
  opacity: 1;
}

.tile .cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--acc);
  opacity: 0;
  transform: translateY(8px);
  transition: .45s ease .05s;
}

.tile:hover .cta {
  opacity: 1;
  transform: none;
}

.tile .cta .ar { transition: transform .3s ease; }
.tile:hover .cta .ar { transform: translateX(5px); }

/* ───── SELO CENTRAL FLUTUANTE ───── */
.seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
  text-align: center;
}

.seal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.005em;
  font-size: clamp(18px, 2.1vw, 30px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  flex-wrap: nowrap;
  white-space: nowrap;
  color: var(--fg);
  text-shadow: 0 4px 26px rgba(0, 0, 0, .6);
}

html[data-theme="light"] .seal h2 {
  text-shadow: 0 4px 26px rgba(244, 240, 231, .9);
}

.seal h2 .it {
  font-style: italic;
  font-weight: 500;
  color: var(--c-front);
}

.seal h2 .deco {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  stroke-width: 1.6;
  position: relative;
  top: .02em;
}

.seal h2 .deco.brush  { color: var(--c-aqua); }
.seal h2 .deco.device { color: var(--c-front); }

/* ───── ABOUT ───── */
.about {
  max-width: 1100px;
  margin: 0 auto;
  padding: 180px 60px;
  display: grid;
  grid-template-columns: 1.6fr .6fr;
  gap: 60px;
  align-items: center;
}

.about .lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 40px;
}

.about h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.01em;
}

.about h2 .l2 {
  display: inline-block;
  font-size: .72em;
}

.about h2 .it { font-style: italic; }
.about h2 .line1 { white-space: nowrap; }

.about p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--dim);
  margin-top: 44px;
  max-width: 440px;
}

.about .stats {
  display: flex;
  gap: 40px;
  margin-top: 68px;
}

.about .stat .n {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
}

.about .stat .c {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 4px;
}

.about .visual {
  position: relative;
  width: 100%;
  max-width: 300px;
  justify-self: center;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg2);
}

.about .visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ───── CARD TRANSITION OVERLAY
   Quando o usuário clica num tile, um overlay full-screen
   anima um arco circular ao redor do ícone enquanto a
   próxima página carrega. */
#ov {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ov-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  transition: opacity .28s ease;
}

#ov.go .ov-bg { opacity: 1; }

.ov-stage {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ov-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ov-ring svg { width: 100%; height: 100%; }

.ov-track {
  fill: none;
  stroke: var(--ov-c, var(--c-front));
  opacity: .12;
  stroke-width: 1.5;
}

.ov-arc {
  fill: none;
  stroke: var(--ov-c, var(--c-front));
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transition: none;
}

#ov.go .ov-arc {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .82s cubic-bezier(.4, 0, .4, 1) .18s;
}

.ov-ic {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ov-c, var(--c-front));
  transform: scale(0) rotate(-60deg);
  opacity: 0;
  transition:
    transform .42s cubic-bezier(.34, 1.56, .64, 1) .06s,
    opacity .3s ease .06s;
}

#ov.go .ov-ic {
  transform: scale(1) rotate(0);
  opacity: 1;
}

.ov-ic svg { width: 100%; height: 100%; }

#ov.go .ov-ic.t-code   svg          { animation: codeType  .9s  ease-in-out infinite .5s; }
#ov.go .ov-ic.t-needle svg          { animation: needleJab .26s ease-in-out infinite .5s; }
#ov.go .ov-ic.t-drop   svg          { animation: dropBob   1.9s ease-in-out infinite .5s; }
#ov.go .ov-ic.t-film   .reelA       { animation: reelSpin  2.4s linear      infinite .5s; }

/* ───── Mobile ───── */
@media (max-width: 860px) {
  .mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    height: auto;
    min-height: 0;
    padding: 80px 14px 14px;
  }
  .tile {
    min-height: 30vh;
    filter: grayscale(.2) brightness(.92);
  }
  .mosaic:hover .tile { filter: grayscale(.2) brightness(.92); opacity: 1; }
  .tile .desc { max-height: 120px; opacity: 1; }
  .tile .cta  { opacity: 1; transform: none; }
  .seal { display: none; }

  .about {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 100px 30px;
  }
  .about h2 .line1 { white-space: normal; }
}
