/* ================================================================
   NATUREZA MUTANTE · mutant.css
   Camada de linguagem visual: metamorfose. Uma obra vira outra, a
   paleta atravessa a moldura como camuflagem, a geometria respira.
   Carregada por ultimo para refinar as folhas anteriores.
   ================================================================ */

@property --nm-ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --ease-mut: cubic-bezier(.65, .02, .18, 1);
  --mut-a: var(--aqua);
  --mut-b: var(--gold);
  --mut-c: var(--rust, #c8452f);
  --mut-d: var(--moss, #49573b);
}

@keyframes nm-layer {
  0%, 24%   { opacity: 1; transform: scale(1.02); }
  32%, 57%  { opacity: 0; transform: scale(1.11) translate3d(-1.4%, 0, 0); }
  65%, 92%  { opacity: 0; transform: scale(1.07) translate3d(1.4%, 0, 0); }
  100%      { opacity: 1; transform: scale(1.02); }
}
@keyframes nm-aura   { to { transform: rotate(1turn); } }
@keyframes nm-spin   { to { --nm-ang: 360deg; } }
@keyframes nm-grain {
  0%   { transform: translate3d(0, 0, 0); }
  25%  { transform: translate3d(-3%, 2%, 0); }
  50%  { transform: translate3d(2%, -3%, 0); }
  75%  { transform: translate3d(-2%, -2%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes nm-blob {
  0%, 100% { border-radius: 58% 42% 46% 54% / 52% 48% 52% 48%; }
  33%      { border-radius: 44% 56% 62% 38% / 38% 60% 40% 62%; }
  66%      { border-radius: 62% 38% 38% 62% / 58% 42% 58% 42%; }
}
@keyframes nm-rise {
  from { opacity: 0; transform: translate3d(0, 1.05em, 0); clip-path: inset(0 0 105% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 -14% 0); }
}
@keyframes nm-sheen {
  0%   { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}

/* ------------------------------------------------------------ hero vivo */
.hero__layers { position: absolute; inset: 0; z-index: -2; overflow: clip; }
.hero__layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 62% 50%);
  will-change: opacity, transform;
  animation: nm-layer var(--dur, 34s) var(--ease-mut) infinite;
  animation-delay: var(--d, 0s);
}
.hero__layer--base { opacity: 1; }

.hero__veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(3, 21, 14, .97) 0%, rgba(3, 21, 14, .84) 36%,
                    rgba(3, 21, 14, .30) 66%, rgba(3, 21, 14, .62) 100%),
    radial-gradient(120% 92% at 10% 18%, rgba(31, 122, 140, .40), transparent 62%);
}
.hero__aura {
  position: absolute; z-index: -1; pointer-events: none;
  right: -14vw; top: -24%; width: 62vw; aspect-ratio: 1;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(201, 162, 39, .34) 20%,
              transparent 34% 60%, rgba(31, 122, 140, .38) 72%, transparent 86% 100%);
  filter: blur(48px); opacity: .85;
  animation: nm-aura 44s linear infinite;
}
.hero__grain {
  position: absolute; inset: -12%; z-index: -1; pointer-events: none; opacity: .15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  animation: nm-grain 1.1s steps(3, end) infinite;
  mix-blend-mode: soft-light;
}

/* titulo revelado linha a linha, como algo que nasce */
.hero h1 .ln { display: block; animation: nm-rise .95s var(--ease-mut) both; }
.hero h1 .ln:nth-child(2) { animation-delay: .12s; }
.hero h1 .ln:nth-child(3) { animation-delay: .24s; }
.hero h1 em {
  background: linear-gradient(100deg, var(--gold-dp), var(--gold-lt) 32%, #fff8de 50%,
              var(--gold-lt) 68%, var(--gold-dp));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: nm-sheen 8s var(--ease-mut) infinite;
}

/* orbe: uma obra contida num organismo que respira */
.hero__orb { transition: transform .7s var(--ease-mut); }
.hero__orb img { animation: nm-blob 18s var(--ease-mut) infinite; }
.hero__orb::before { animation-duration: 30s; }
.hero__orb:hover { transform: translateY(-6px) scale(1.03); }

/* ------------------------------------------------- mutacao dos cartoes */
.work__frame, .gcard__img { isolation: isolate; }
.gcard__img { position: relative; }
.work__mut, .gcard__mut {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; z-index: 1; pointer-events: none;
  transform: scale(1.09);
  transition: opacity .8s var(--ease-mut), transform 1.1s var(--ease-mut),
              filter .8s var(--ease-mut);
}
.work:hover .work__mut, .work:focus-visible .work__mut,
.gcard:hover .gcard__mut, .gcard:focus-visible .gcard__mut {
  opacity: 1; transform: scale(1);
  filter: saturate(1.22) contrast(1.03);
}
/* moldura camaleonica: a paleta inteira atravessa a borda da obra */
.work__frame::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  opacity: 0; padding: 1.5px;
  background: conic-gradient(from var(--nm-ang), var(--mut-a), var(--mut-b), var(--mut-c),
              var(--mut-d), var(--mut-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: opacity .5s var(--ease-mut);
}
.work:hover .work__frame::after, .work:focus-visible .work__frame::after {
  opacity: .95; animation: nm-spin 5.5s linear infinite;
}
/* o anel de iris ganha ouro e um segundo giro */
.work:hover .work__ring, .work:focus-visible .work__ring {
  opacity: 1;
  border-color: color-mix(in oklab, var(--gold-lt) 82%, transparent);
  box-shadow: 0 0 0 1px rgba(3, 21, 14, .5), 0 0 28px color-mix(in oklab, var(--gold) 34%, transparent);
}
.gcard::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 32%,
              color-mix(in oklab, var(--gold) 24%, transparent) 48%, transparent 64%);
  transition: opacity .6s var(--ease-mut);
}
.gcard:hover::after { opacity: 1; }

/* ------------------------------------- faixa de metamorfose (filtro goo) */
.goo {
  position: relative; isolation: isolate; overflow: clip;
  padding-block: clamp(2.4rem, 6vw, 4.8rem);
  background: color-mix(in oklab, var(--abyss) 90%, #000);
  border-block: 1px solid var(--line-soft);
}
.goo__glow {
  position: absolute; left: 50%; top: 50%; z-index: 0; pointer-events: none;
  width: min(84vw, 940px); aspect-ratio: 2.4; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
              color-mix(in oklab, var(--gold) 26%, transparent), transparent 68%);
  filter: blur(34px); animation: nm-aura 46s linear infinite reverse;
}
.goo__def { position: absolute; width: 0; height: 0; overflow: hidden; }
.goo__row {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: clamp(.2rem, 1.4vw, 1.1rem);
  filter: url(#nm-goo);
}
.goo__cell {
  display: block; width: clamp(64px, 10.5vw, 126px); aspect-ratio: 1;
  overflow: hidden; background: #fff; border-radius: 50%;
  animation: nm-blob 14s var(--ease-mut) infinite;
  transition: transform .55s var(--ease-mut);
}
.goo__cell:nth-child(2n) { animation-duration: 17s; animation-delay: -4s; }
.goo__cell:nth-child(3n) { animation-duration: 12s; animation-delay: -8s; }
.goo__cell:hover { transform: scale(1.24); z-index: 2; }
.goo__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.goo__cap {
  position: relative; z-index: 1; margin-top: clamp(1.1rem, 3vw, 1.9rem);
  text-align: center; font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--fg-faint);
}

/* --------------------------------------------------- detalhes mutantes */
.marquee__item { display: block; text-decoration: none; background: var(--ink); }
/* botoes em ouro: a face metalica vem de cima, como folha aplicada */
.btn { position: relative; overflow: clip; }
.btn:not(.btn--ghost) {
  background-image: linear-gradient(178deg, rgba(255, 244, 205, .42), rgba(156, 111, 20, .22));
  box-shadow: inset 0 1px 0 rgba(255, 246, 214, .5);
}
.btn:not(.btn--ghost):hover {
  background-image: linear-gradient(178deg, rgba(255, 248, 222, .55), rgba(156, 111, 20, .12));
}
.btn--xl::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 246, 216, .34) 50%, transparent 64%);
  background-size: 260% 100%;
}
.btn--xl:hover::after { opacity: 1; animation: nm-sheen 1.1s var(--ease-mut); }
.nmmark--live { animation: nm-hue 18s linear infinite; }
@keyframes nm-hue { to { filter: hue-rotate(360deg); } }
.section--breath > .wrap::before {
  content: ""; position: absolute; left: 0; top: -2.6rem; width: 24%; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  animation: nm-breathe 6.5s var(--ease-mut) infinite;
}
.section--breath > .wrap { position: relative; }
@keyframes nm-breathe {
  0%, 100% { opacity: .3; transform: scaleX(.68); }
  50%      { opacity: 1; transform: scaleX(1); }
}

@media (max-width: 47.9rem) {
  .hero__aura { right: -34vw; width: 132vw; filter: blur(34px); }
  .goo__cell { width: clamp(56px, 20vw, 92px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__aura, .hero__grain, .hero__orb img, .hero__orb::before, .hero h1 .ln,
  .hero h1 em, .goo__cell, .goo__glow, .nmmark--live, .section--breath > .wrap::before,
  .btn--xl:hover::after, .work:hover .work__frame::after {
    animation: none !important;
  }
  .hero__layer { animation: none; opacity: 0; transform: none; }
  .hero__layer--base { opacity: 1; }
  .hero h1 .ln { clip-path: none; opacity: 1; transform: none; }
  .hero h1 em { color: var(--gold-lt); -webkit-text-fill-color: currentColor;
                background: none; }
  .work__mut, .gcard__mut { transition: opacity .05s linear; transform: none; }
  .goo__row { filter: none; }
  .goo__cell { background: transparent; border-radius: 50%; }
}

/* ------------------------------------------------- cabecalho respirando */
.site-head__in { gap: clamp(.85rem, 2.2vw, 1.75rem); }
.site-nav { gap: clamp(.7rem, 1.5vw, 1.45rem); }
.head__search, .free-pill, .head__auth .btn, .head__cta { white-space: nowrap; }
@media (max-width: 86rem) {
  .head__auth .faint { display: none; }   /* em telas medias sobra so 'entrar' */
  .site-nav a { font-size: .8rem; }
}
@media (max-width: 73rem) {
  .head__cta { display: none; }            /* a pill volta no menu de bolso */
}

/* ================================================ endurecimento de grade
   Trilha implicita de grid vale max-content: uma linha mono longa empurrava
   a pagina inteira para fora da janela (visto em 77 rotas a 375px). Estas
   regras travam a trilha no tamanho da janela e deixam o texto quebrar. */
.stack, .ticks li, .points > *, .nums .num, .credito, .notice, .wrap > *, .wrap--narrow > * { min-width: 0; }
.stack { grid-template-columns: minmax(0, 1fr); }
.mono, .meta, .notice, .codeblock p, .verse__seed-domain, .nm-site__domain, .seal-band__link {
  overflow-wrap: anywhere;
}
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 30rem; }

@media (max-width: 63.99rem) {
  .split, .ghead__grid, .closer__in, .foot__grid, .product, .bandit__in,
  .partner-pitch, .linkcards, .prcards, .fmts, .zooms, .nm-sites, .nm-partners {
    grid-template-columns: minmax(0, 1fr);
  }
  .split > *, .ghead__grid > *, .closer__in > *, .foot__grid > * { min-width: 0; }
  .verse__seed { align-items: flex-start; }
}

/* trilhas de coluna unica sem template declarados: piso 0 */
.tela, .tela__body, .tela-big__body, .tela-big__img, .calc__out, .product__cap,
.pricebox, .credito, .markfile__thumb, .steps, .ticks, .points, .faqs,
.linkcard, .num, .fmt, .prcard__body { grid-template-columns: minmax(0, 1fr); }
/* tabelas DPI: rolam dentro do proprio contenedor em vez de empurrar a pagina */
.calc__out > div, .table-scroll, .spec-table { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.calc__out > div > table, .table-scroll table { min-width: 30rem; }
/* pseudo-elementos decorativos (moldura camaleonica) podem passar 3 px da janela
   e abrir uma rolagem horizontal fantasma: clip nao cria contexto de rolagem,
   entao o cabecalho sticky continua funcionando. */
@supports (overflow-x: clip) { .page { overflow-x: clip; } }
