/* =========================================================
   Tutu 3D Studio, tema de blocos 0.2.0
   Liga o visual da vitrine (vitrine.css) à marcação dos blocos do WordPress.
   Carregado no site e no editor.
   ========================================================= */

:root { --gutter: clamp(16px, 4vw, 32px); }

/* Sem espaço extra entre cabeçalho, seções e rodapé */
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group > * + * { margin-block-start: 0; }

/* ---------- Cabeçalho (parte "Cabeçalho") ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.site-header .topbar { position: relative; top: auto; }
.topbar > * { margin: 0 !important; }
.topbar .topbar__nav { display: none; margin-inline: auto !important; }
.topbar .topbar__nav .wp-block-navigation-item__content {
  display: block; padding: 10px 14px; border-radius: var(--radius-button);
  color: var(--text-muted); text-decoration: none; font-weight: 500;
  transition: color var(--dur-fast), background-color var(--dur-fast);
}
.topbar .topbar__nav .wp-block-navigation-item__content:hover,
.topbar .topbar__nav a[aria-current="true"] { color: var(--text-strong); background: var(--bg-raised); }
.topbar .tutu-bag { margin-left: auto !important; }
@media (min-width: 900px) {
  .topbar .topbar__nav { display: flex; }
  .topbar .tutu-bag { margin-left: 0 !important; }
}
.topbar__logo .tutu-logo__link { display: block; border-radius: var(--radius-sm); }

/* ---------- Bloco Tutu: Logo ---------- */
.wp-block-tutu-logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.topbar__logo.wp-block-tutu-logo svg { width: auto; height: 32px; }
.topbar.is-scrolled .topbar__logo.wp-block-tutu-logo svg { height: 26px; }
.footer__mono.wp-block-tutu-logo { width: 64px; }
.js .tutu-logo--animado .pc {
  opacity: 0; transform: translate(var(--x), var(--y));
  animation: piece .64s var(--ease-snap) forwards;
  animation-delay: calc(var(--i) * 85ms + 120ms);
}
.js .tutu-logo--animado .logo-sub,
.js .tutu-logo--animado .logo-cube { opacity: 0; animation: fade .45s var(--ease-out) forwards; animation-delay: .82s; }
.tutu-logo--animado .pc { transform-box: fill-box; }

/* ---------- Topo ---------- */
.hero > .hero__inner { width: 100%; }
.hero__inner > * { margin: 0 !important; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--plate-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--plate-line) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 42%, #000 35%, transparent 78%);
          mask-image: radial-gradient(ellipse 85% 70% at 50% 42%, #000 35%, transparent 78%);
}
.js .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  height: 2px; background: var(--color-cyan); opacity: 0; pointer-events: none;
  animation: nozzle 1.6s var(--ease-out) .9s forwards;
}
.hero__concept::before {
  content: ""; width: 14px; height: 20px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='447.6 706.9 84.9 121.9'%3E%3Cpath fill='%23a242fb' d='M490.8,749.5v-36.6h-24.1c-6.2,0-11.3,5-11.3,11.3v25.3h35.3Z'/%3E%3Cpath fill='%2329f7ef' d='M490.2,787.4h-36.6v24.1c0,6.2,5,11.3,11.3,11.3h25.3v-35.3Z'/%3E%3Cpath fill='%23d4fb45' d='M491.1,749.8v36.6h24.1c6.2,0,11.3-5,11.3-11.3v-25.3h-35.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hero__facts { list-style: none; }
.hero__facts li:nth-child(3n + 1) { --c: var(--color-cyan); }
.hero__facts li:nth-child(3n + 2) { --c: var(--color-purple); }
.hero__facts li:nth-child(3n + 3) { --c: var(--color-lime); }
.hero__ctas.wp-block-buttons { gap: 12px; }

/* Estilo de título "Impressão em camadas": o JS divide em palavras */
.is-style-tutu-print .print { display: inline-block; }
.js .is-style-tutu-print .print {
  clip-path: inset(100% 0 0 0);
  animation: print var(--dur-print) var(--ease-print) forwards;
  animation-delay: calc(var(--print-delay, .15s) + var(--i) * 180ms);
  animation-play-state: paused;
}
.js .is-style-tutu-print.is-in .print { animation-play-state: running; }
.hero .is-style-tutu-print { --print-delay: 1s; }
.is-style-tutu-print .dot { color: var(--color-lime); }

/* Entrada ao rolar para blocos comuns (classe adicional "tutu-reveal") */
.js .tutu-reveal {
  opacity: 0; transform: translateY(28px) scale(.97);
  transition: opacity .5s var(--ease-out), transform .64s var(--ease-snap);
}
.js .tutu-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Estilos de bloco registrados ---------- */
.is-style-tutu-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--font-mono) !important;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
}
.is-style-tutu-eyebrow::before { content: ""; width: 10px; height: 10px; background: currentColor; border-radius: 0 0 4px 0; }
.is-style-tutu-eyebrow:not(.has-text-color)::before { background: var(--color-lime); }
.is-style-tutu-lead { color: var(--text-muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 52ch; }
.wp-block-button.is-style-tutu-ghost .wp-block-button__link {
  background: rgba(255, 255, 255, .08); color: var(--text-strong); border-color: rgba(255, 255, 255, .6);
}
.wp-block-button.is-style-tutu-ghost .wp-block-button__link:hover { border-color: var(--color-cyan); color: var(--text-strong); background: rgba(41, 247, 239, .12); }
.wp-block-button.is-style-tutu-cyan .wp-block-button__link,
.wp-block-button.is-style-tutu-cyan .wp-block-button__link:hover { background: var(--color-cyan); border-color: var(--color-cyan); color: #000; }
.wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; gap: 10px; transition: transform var(--dur-fast) var(--ease-snap); }
.wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button__link:active { transform: translateY(1px) scale(.98); }
.is-style-tutu-surface { background: var(--bg-surface); border-block: 1px solid var(--border); }

/* ---------- Seções ---------- */
.section > .is-style-tutu-eyebrow + * { margin-block-start: 14px; }
.section > .wp-block-heading + .wp-block-tutu-nichos,
.section > .wp-block-heading + .wp-block-tutu-catalogo { margin-block-start: clamp(28px, 4vw, 44px); }
.section--catalogo { padding-top: 0; }
.natal .t3v-natal { margin-block-start: 8px; }
.t3v-natal .natal__deadline { margin-bottom: 8px; }

/* ---------- Perguntas (bloco Detalhes do WordPress) ---------- */
@media (min-width: 900px) {
  .faq__aside { position: sticky; top: calc(var(--bar-h-small) + 32px); align-self: flex-start; }
}
.faq__aside > * { margin-block: 0 0 16px; }
.wp-block-details.faq__item { border-bottom: 1px solid var(--border); margin: 0; }
.wp-block-details.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
  font: 600 clamp(17px, 2.4vw, 20px)/1.3 var(--font-display); color: var(--text-strong);
}
.wp-block-details.faq__item summary::-webkit-details-marker { display: none; }
.wp-block-details.faq__item summary::after {
  content: ""; flex: none; width: 32px; height: 32px;
  border-radius: var(--radius-button);
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    var(--bg-raised);
  transition: transform .4s var(--ease-snap), background-color var(--dur-fast);
}
.wp-block-details.faq__item[open] summary::after {
  transform: rotate(45deg);
  background:
    linear-gradient(#000, #000) center / 14px 2px no-repeat,
    linear-gradient(#000, #000) center / 2px 14px no-repeat,
    var(--color-lime);
}
.wp-block-details.faq__item > :not(summary) { margin: 0 48px 20px 0; color: var(--text-muted); }
@supports (interpolate-size: allow-keywords) {
  .wp-block-details.faq__item::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .38s var(--ease-out), content-visibility .38s allow-discrete;
  }
  .wp-block-details.faq__item[open]::details-content { block-size: auto; }
}

/* ---------- Rodapé (parte "Rodapé") ---------- */
.footer { padding-block: 56px calc(96px + env(safe-area-inset-bottom)); }
.footer h3 { font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 14px; }
.footer .wp-block-list { padding: 0; }
.footer a { color: var(--text); }
.footer__legal { margin-top: 40px !important; padding-top: 20px; border-top: 1px solid var(--border); }
.footer__legal p { margin: 0; font: 500 12px/1.5 var(--font-mono); color: var(--text-muted); }
@media (min-width: 900px) { .footer { padding-bottom: 56px; } }

/* ---------- Páginas simples ---------- */
.wp-block-post-content a { color: var(--color-cyan); }

/* ---------- Editor: tudo visível e sem animação ---------- */
.editor-styles-wrapper .hero { min-height: auto; }
.editor-styles-wrapper .tutu-reveal,
.editor-styles-wrapper [data-reveal] { opacity: 1 !important; transform: none !important; }
.editor-styles-wrapper .tools { position: static; }

@media (prefers-reduced-motion: reduce) {
  .js .tutu-reveal { opacity: 1; transform: none; }
  .js .is-style-tutu-print .print { clip-path: none; animation: none; }
  .js .hero::after { display: none; }
}

/* Rótulo e texto de apoio alinhados à esquerda do conteúdo (não centralizados) */
.is-style-tutu-eyebrow { display: flex; width: fit-content; }
.is-layout-constrained > .is-style-tutu-eyebrow,
.is-layout-constrained > .is-style-tutu-lead {
  margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1180px)) / 2)) !important;
  margin-right: auto !important;
}
