/* ============================================================
   João Souza · portfólio
   Direção: editorial ousado · creme / preto / vermelho-sinal
   Ref. de estilo: rickallan.work (Anton + cream + red)
   ============================================================ */

:root {
  --paper:  #fff2da;  /* creme quente (fundo)      */
  --paper2: #ffe8b8;  /* creme mais fundo          */
  --ink:    #212121;  /* quase-preto (texto)       */
  --red:    #d00000;  /* vermelho-sinal (acento)   */
  --muted:  #6b6258;  /* marrom-cinza pra apoio     */

  --fdisp: "Saira Condensed", "Arial Narrow", sans-serif;
  --fbody: "Inter", system-ui, sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--fbody);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; color: var(--red); }

.disp { font-family: var(--fdisp); text-transform: uppercase; }

/* peso padrão dos títulos (Saira Condensed tem vários pesos) */
.loader__name, .loader__pct, .nav__brand, .hero__title, .hero__scroll,
.marquee__track span, .sec-head__title, .sec-head__count, .witem__idx,
.witem__name, .stat__n, .xlist li, .about__lead, .contact__label,
.contact__mail { font-weight: 800; }

/* ── Preloader ───────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--red);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
  overflow: hidden;
  transition: transform 0.9s cubic-bezier(.76,0,.24,1);
}
.loader--done { transform: translateY(-101%); }
.loader__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.loader__row--top { opacity: 0.75; }
.loader__mid {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.loader__word {
  display: inline-block;
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 11vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  will-change: transform, opacity;
}
.loader__name {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem);
  line-height: 1;
}
.loader__pct {
  font-family: var(--fdisp);
  font-weight: 800;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.loader__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: rgba(255, 242, 218, 0.25);
}
.loader__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--paper);
  transition: width 0.12s linear;
}

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.nav__brand {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: none;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.nav__brand span { color: var(--red); }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__links a {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1.5px; background: var(--ink);
  transition: width .3s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  background: var(--red);
  color: var(--paper) !important;
  padding: 0.5rem 1rem;
  border-radius: 100px;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--ink); }
.nav__lang {
  font-size: 0.78rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  padding: 0.35rem 0.7rem;
  transition: background .2s ease, color .2s ease;
}
.nav__lang::after { display: none; }
.nav__lang:hover { background: var(--ink); color: var(--paper); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: 8rem var(--pad) 3rem;
  max-width: var(--maxw);
  margin-inline: auto;
}
.hero__text { display: flex; flex-direction: column; justify-content: center; }
.hero__media {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  border: 2px solid var(--ink);
  overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--paper2) 0 14px, var(--paper) 14px 28px);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  transition-delay: .35s;
}
.hero.is-ready .hero__media { opacity: 1; transform: none; }
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  opacity: 0;
  filter: grayscale(1) contrast(1.05);
  transition: opacity .09s linear, filter .5s ease;
}
.hero__media img.is-active,
.hero__media img:only-child { opacity: 1; }
.hero__media:hover img.is-active { filter: none; }
.hero__media--empty { display: grid; place-items: center; }
.hero__ph {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px dashed var(--ink);
  padding: 0.6rem 1rem;
}
.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin: 0 0 2rem;
}
.hero__title {
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: clamp(2.4rem, 5.6vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  margin: 0;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.hero__foot p { max-width: 40ch; color: var(--muted); margin: 0; font-size: 1rem; }
.hero__scroll {
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--red);
}

/* ── Marquee ─────────────────────────────────────────── */
.marquee {
  border-block: 2px solid var(--ink);
  overflow: hidden;
  background: var(--red);
  color: var(--paper);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.4;
  white-space: nowrap;
  padding-right: 0.4em;
}
.marquee__track b { color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Section head ────────────────────────────────────── */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.sec-head__title {
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: 0.01em;
  margin: 0;
}
.sec-head__count {
  font-family: var(--fdisp);
  font-size: 1.1rem;
  color: var(--red);
}

/* ── Selected work ───────────────────────────────────── */
.work {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad) clamp(2rem, 5vw, 4rem);
}
.pgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.ptile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 360px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  transition: background .4s ease, color .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
.ptile--dark { background: var(--ink); color: var(--paper); }
.ptile:hover { background: var(--red); color: var(--paper); transform: translateY(-6px); }
.ptile__num {
  font-family: var(--fdisp);
  font-weight: 800;
  font-size: 1rem;
  color: var(--red);
  transition: color .4s ease;
}
.ptile:hover .ptile__num { color: var(--paper); }
.ptile__body { display: flex; flex-direction: column; gap: 1rem; }
.ptile__name {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin: 0;
}
.ptile__desc {
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
  max-width: 46ch;
  color: color-mix(in srgb, currentColor 70%, transparent);
}
.ptile__tags {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* tile destaque em largura total */
.ptile--wide { grid-column: 1 / -1; }
@media (min-width: 901px) {
  .ptile--wide {
    flex-direction: row;
    align-items: flex-end;
    gap: clamp(2rem, 6vw, 6rem);
    min-height: 300px;
  }
  .ptile--wide .ptile__num { align-self: flex-start; }
  .ptile--wide .ptile__body { flex: 1; gap: 1.2rem; }
  .ptile--wide .ptile__name { font-size: clamp(2.4rem, 5vw, 4.4rem); }
  .ptile--wide .ptile__desc { font-size: 1.05rem; max-width: 50ch; }
  .ptile--wide .ptile__tags { white-space: nowrap; }
}

/* ── Stats ───────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--ink);
  color: var(--paper);
  border-block: 2px solid var(--ink);
}
.stat {
  padding: clamp(2rem, 5vw, 4rem) var(--pad);
  border-right: 1px solid rgba(255,242,218,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stat:last-child { border-right: none; }
.stat__n {
  font-family: var(--fdisp);
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.9;
  color: var(--red);
}
.stat__l {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ── Expertise ───────────────────────────────────────── */
.expertise {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
}
.services { margin-top: 1rem; border-top: 2px solid var(--ink); }
.srv { border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.srv summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: clamp(0.8rem, 2vw, 1.4rem) 0;
  transition: padding-left .4s cubic-bezier(.16,1,.3,1), color .3s ease;
}
.srv summary::-webkit-details-marker { display: none; }
.srv:hover summary,
.srv[open] summary { color: var(--red); }
.srv:hover summary { padding-left: 0.8rem; }
.srv__n {
  font-family: var(--fbody);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--red);
}
.srv__name {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 5vw, 4rem);
  line-height: 1.1;
}
.srv__tri {
  margin-left: auto;
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid currentColor;
  transition: transform .35s ease;
}
.srv[open] .srv__tri { transform: rotate(180deg); }
.srv__detail {
  margin: 0;
  padding: 0 0 1.6rem 2.6rem;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

/* ── Trajetória ──────────────────────────────────────── */
.xp {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
}
.xp-list { border-top: 2px solid var(--ink); margin-top: 1rem; }
.xpitem {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
}
.xpitem__head {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: baseline;
}
.xpitem__year {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
}
.xpitem__role h3 {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  line-height: 1.02;
  margin: 0 0 0.3rem;
}
.xpitem__org { margin: 0; color: var(--muted); font-size: 0.95rem; }
.xpitem__pts {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  grid-column: 2;
  margin-left: calc(12rem + clamp(1rem, 4vw, 3rem));
  max-width: 70ch;
}
.xpitem__pts li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.96rem;
  line-height: 1.5;
}
.xpitem__pts li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}
.xpitem__pts strong { color: var(--ink); font-weight: 700; }

/* ── About ───────────────────────────────────────────── */
.about {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
}
.about__label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  margin: 0 0 1.5rem;
}
.about__lead {
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 clamp(2.5rem, 6vw, 5rem);
  max-width: 22ch;
  font-size: clamp(1.8rem, 4.6vw, 4rem);
}
.about__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 2px solid var(--ink);
  padding-top: 2rem;
}
.about__meta span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.about__meta p { margin: 0; font-weight: 500; }

/* ── Social ──────────────────────────────────────────── */
.social {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
}
.social__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.scard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 280px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 2px solid var(--ink);
  background: var(--paper);
  transition: background .35s ease, color .35s ease, transform .35s cubic-bezier(.16,1,.3,1);
}
.scard:hover { background: var(--red); color: var(--paper); transform: translateY(-6px); }
.scard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.scard__plat {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.9;
}
.scard__arrow {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.scard:hover .scard__arrow { transform: translate(6px, -6px); }
.scard__handle {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  color: var(--red);
  transition: color .35s ease;
}
.scard:hover .scard__handle { color: var(--paper); }
.scard__cta {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color .35s ease;
}
.scard:hover .scard__cta { color: var(--paper); }

/* ── Embeds (posts) ──────────────────────────────────── */
.embeds__label {
  font-family: var(--fdisp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  color: var(--red);
  margin: clamp(2.5rem, 5vw, 4rem) 0 1.2rem;
}
.embeds {
  display: grid;
  gap: 1.2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.embeds--li { grid-template-columns: 1fr 1fr; }
.embeds--ig { grid-template-columns: repeat(4, 1fr); }
.embed {
  display: flex;
  justify-content: center;
}
/* LinkedIn: iframe responsivo com altura fixa */
.embed--li {
  border: 2px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
}
.embed--li iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
}
/* Instagram: encolhe pra caber na fila de 4, sem distorcer */
.embed--ig { width: 100%; }
.embed--ig .instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ── Contact ─────────────────────────────────────────── */
.contact {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(5rem, 12vw, 11rem) var(--pad);
}
.contact__label {
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  color: var(--red);
  margin: 0 0 1.5rem;
}
.contact__mail {
  display: inline-block;
  font-family: var(--fdisp);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 6.5vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  word-break: break-word;
  transition: color .3s ease;
}
.contact__mail:hover { color: var(--red); }
.contact__links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact__links a { opacity: 0.8; transition: opacity .2s, color .2s; }
.contact__links a:hover { opacity: 1; color: var(--red); }

/* ── Footer ──────────────────────────────────────────── */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem var(--pad);
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(255,242,218,0.18);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.foot a:hover { color: var(--red); }

/* ── Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ── Grão / film grain (textura sobre o site todo) ─── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='240'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.82'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: 0.7;
  mix-blend-mode: soft-light;
}
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: grain 0.6s steps(1) infinite; }
}
@keyframes grain {
  0%   { background-position: 0 0; }
  12%  { background-position: -6% -12%; }
  24%  { background-position: -14% 6%; }
  36%  { background-position: 8% -18%; }
  48%  { background-position: -8% 14%; }
  60%  { background-position: 16% 4%; }
  72%  { background-position: -12% -8%; }
  84%  { background-position: 6% 16%; }
  100% { background-position: 0 0; }
}

/* ── Animações criativas ─────────────────────────────── */

/* Barra de progresso de scroll */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--red);
  z-index: 1100;
  pointer-events: none;
}

/* Cursor personalizado (anel) */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 16px; height: 16px;
  border: 2px solid var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1200;
  opacity: 0;
  transition: width .28s ease, height .28s ease, background-color .28s ease, opacity .28s ease;
}
.cursor.is-active { opacity: 1; }
.cursor.is-hover {
  width: 52px; height: 52px;
  background: color-mix(in srgb, var(--red) 16%, transparent);
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Imagem do case preenchendo o card no hover */
.ptile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 0;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.06);
  transition: opacity .45s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.ptile:hover .ptile__bg { opacity: 1; transform: scale(1); }
.ptile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(18, 10, 8, 0.35), rgba(18, 10, 8, 0.72));
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
.ptile:hover::before { opacity: 1; }
/* conteúdo sempre acima da imagem/scrim */
.ptile__num, .ptile__body, .ptile__tags { position: relative; z-index: 2; }
.ptile::after { z-index: 2; }

/* Botões magnéticos */
.magnetic { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }

/* Seta que aparece no hover dos projetos */
.ptile::after {
  content: "↗";
  position: absolute;
  top: clamp(1.4rem, 3vw, 2.4rem);
  right: clamp(1.4rem, 3vw, 2.4rem);
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0;
  transform: translate(-8px, 8px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}
.ptile:hover::after { opacity: 1; transform: none; }

/* Seta do hero pulando */
.hero__scroll .bob { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero__scroll .bob { animation: bob 1.6s ease-in-out infinite; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* texto que sobe linha por linha após o loader */
.hero__title .line > span,
.hero .line {
  transform: translateY(110%);
  transition: transform .9s cubic-bezier(.16,1,.3,1);
}
.hero.is-ready .line,
.hero.is-ready .line > span { transform: none; }
.hero.is-ready .hero__title .line:nth-child(2) > span { transition-delay: .07s; }
.hero.is-ready .hero__title .line:nth-child(3) > span { transition-delay: .14s; }
.hero.is-ready .hero__title .line:nth-child(4) > span { transition-delay: .21s; }
.hero.is-ready .hero__foot .line { transition-delay: .3s; }

/* ── Responsivo ──────────────────────────────────────── */
@media (max-width: 900px) {
  .nav__links { gap: 0.8rem; }
  .nav__links a:not(.nav__cta):not(.nav__lang) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 7rem; gap: 2rem; }
  .hero__media { aspect-ratio: 4 / 3; }
  .pgrid { grid-template-columns: 1fr; }
  .ptile { min-height: 300px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .about__meta { grid-template-columns: repeat(2, 1fr); }
  .social__grid { grid-template-columns: 1fr; }
  .embeds--li { grid-template-columns: 1fr; }
  .embeds--ig { grid-template-columns: repeat(2, 1fr); }
  .xpitem__head { grid-template-columns: 1fr; gap: 0.4rem; }
  .xpitem__pts { margin-left: 0; grid-column: auto; }
}
@media (max-width: 600px) {
  .hero__title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .hero { padding-top: 6rem; }
  .nav { padding: 0.9rem 1.1rem; }
  .nav__brand { font-size: 1.15rem; }
  .nav__cta { padding: 0.45rem 0.8rem; font-size: 0.74rem; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(255,242,218,0.18); }
  .about__meta { grid-template-columns: 1fr; }
  .contact__links { flex-direction: column; gap: 1rem; }
  .embeds--ig { grid-template-columns: 1fr; }
}

/* ── Acessibilidade ──────────────────────────────────── */
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero .line, .hero__title .line > span { transform: none; }
  .loader { display: none; }
  body.is-loading { overflow: auto; height: auto; }
}
