/* ---------- Fontes ---------- */
@font-face {
  font-family: "PP Editorial New";
  src: url("assets/fonts/PPEditorialNew-Ultralight.woff2") format("woff2");
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Editorial New";
  src: url("assets/fonts/PPEditorialNew-UltralightItalic.woff2") format("woff2");
  font-weight: 200; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "PP Editorial New";
  src: url("assets/fonts/PPEditorialNew-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Editorial New";
  src: url("assets/fonts/PPEditorialNew-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f5f5;
  --navy: #0a1942;
  --ink: #131313;
  --blue: #144ae0;
  --blue-hover: #2a5cf0;
  --blue-label: #2b5bf0;
  --cream: #b5b0ac;
  --white: #fff;

  --serif: "PP Editorial New", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --max: 1160px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/*
 * Toda a composição foi desenhada num artboard de 432 unidades de largura
 * (a área útil do PDF). --u converte essas unidades para a largura real do
 * conteúdo, então tablet e desktop mantêm exatamente as proporções do layout.
 */
.page {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  container-type: inline-size;
}
.page > * { --u: calc(100cqi / 432); }

.display {
  font-family: var(--serif);
  font-weight: 200;
  text-transform: uppercase;
  line-height: 0.8;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(27 * var(--u));
  position: relative;
}
.hero__name {
  font-size: calc(48 * var(--u));
  margin-left: calc(-1 * var(--u));
  padding-bottom: calc(15 * var(--u));
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.hero__card {
  position: relative;
  aspect-ratio: 432 / 204;
  --card-r: calc(5 * var(--u));
  border-radius: var(--card-r);
  background:
    radial-gradient(120% 140% at 100% 0%, #0a1a48 0%, rgba(10, 26, 72, 0) 60%),
    linear-gradient(105deg, #131313 0%, #0d1530 45%, #0b173f 100%);
  box-shadow: inset 0 0 0 1px rgba(10, 25, 66, 0.9);
  z-index: 1;
  /* Máscara: corta a foto embaixo e nas laterais (inclusive enquanto ela sobe na entrada),
     mas deixa o topo livre para a cabeça passar por cima do nome. */
  clip-path: inset(-60% 0 0 0 round 0 0 var(--card-r) var(--card-r));
}

/* A foto sai pelo topo do card e passa por cima do nome */
.hero__photo {
  position: absolute;
  left: 2.78%;
  bottom: 0;
  width: 52.6%;
  height: auto;
  border-bottom-left-radius: inherit;
  pointer-events: none;
  user-select: none;
}

.hero__content {
  position: absolute;
  left: 56.9%;
  top: 19%;
  right: 4%;
  color: var(--white);
}

.hero__headline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: calc(14 * var(--u));
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.hero__headline em { font-style: italic; }
.hero__headline .i-reg { font-weight: 400; }
.hero__headline .i-light { font-weight: 200; }

.stats {
  display: flex;
  gap: calc(14 * var(--u));
  margin: calc(12 * var(--u)) 0 0 calc(4 * var(--u));
}
.stats__item {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}
.stats__value {
  margin: 0;
  font-family: var(--serif);
  font-weight: 200;
  font-size: calc(12 * var(--u));
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.stats__label {
  margin-top: calc(1.2 * var(--u));
  font-size: max(11px, calc(4.2 * var(--u)));
  font-weight: 400;
  color: var(--blue-label);
  white-space: nowrap;
}

/* ---------- Sobre ---------- */
.about {
  padding-top: calc(32 * var(--u));
}
.about__title {
  font-size: calc(48 * var(--u));
  margin-left: calc(-1.5 * var(--u));
}
.about__text {
  margin: calc(12 * var(--u)) 0 0;
  max-width: 81%;
  font-size: max(15px, calc(6.3 * var(--u)));
  line-height: 1.45;
  font-weight: 400;
  color: var(--navy);
  text-wrap: pretty;
}

/* ---------- Links (cards) ---------- */
.links {
  margin-top: calc(40 * var(--u));
  display: grid;
  grid-template-columns: 156fr 269fr;
  grid-template-rows: 141fr 140fr;
  gap: calc(7 * var(--u));
  aspect-ratio: 432 / 288;
}

.tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(5 * var(--u));
  background: var(--navy);
  display: flex;
  align-items: flex-end;
  padding: calc(10 * var(--u));
}
.tile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
/* Fundo claro para o azul do card não vazar na borda arredondada da foto */
.tile--escritorio { background: #ececec; }
.tile__bg { transform: scale(1.01); }

.tile--mentoria {
  grid-row: 1 / span 2;
  justify-content: center;
  padding-bottom: calc(10 * var(--u));
}

.mentoria {
  position: absolute;
  left: 0; right: 0;
  top: 37%;
  text-align: center;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 200;
}
.mentoria__soon,
.mentoria__title {
  margin: 0;
  font-size: calc(20 * var(--u));
  line-height: 0.95;
  font-weight: 200;
  letter-spacing: -0.02em;
}
.mentoria__title { text-transform: uppercase; }
.mentoria__sub {
  margin: calc(1.5 * var(--u)) 0 0;
  font-size: max(11px, calc(5.4 * var(--u)));
  letter-spacing: 0.01em;
}

/* ---------- Botão ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: max(40px, calc(15 * var(--u)));
  padding: 0 max(18px, calc(10 * var(--u)));
  border-radius: max(8px, calc(4 * var(--u)));
  background: var(--blue);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 700;
  font-size: max(13px, calc(5.2 * var(--u)));
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  /* O magnetismo (script.js) move o botão pela propriedade `translate`, separada do
     `transform: scale` do :active, para os dois efeitos somarem sem brigar.
     Sem transição de translate aqui: quem anima é a mola no JS. */
  transition: background-color 180ms ease, transform 160ms var(--ease-out);
  /* Camada própria na GPU: o botão é desenhado uma vez e só deslocado. Sem isso o
     navegador redesenha o texto a cada fração de pixel e as letras "tremem"
     dentro do botão enquanto ele se move. */
  will-change: translate, transform;
  backface-visibility: hidden;
}
.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--blue-hover); }
}

/* ---------- Rodapé ---------- */
.footer {
  padding: max(40px, calc(36 * var(--u))) 0 max(28px, calc(12 * var(--u)));
  text-align: center;
  color: var(--ink);
}
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.social__label {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.social__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social__list a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 180ms ease, transform 160ms var(--ease-out);
}
.social__list a:active { transform: scale(0.94); }
.social__list a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .social__list a:hover { background: rgba(10, 25, 66, 0.07); }
}
.social svg { width: 26px; height: 26px; fill: currentColor; }

.footer__legal {
  margin: max(36px, calc(18 * var(--u))) 0 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.footer__legal sup { font-size: 0.6em; }

/* ---------- Entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__name,
  .hero__card,
  .hero__photo,
  .hero__content {
    animation: rise 900ms var(--ease-out) both;
  }
  .hero__card { animation-delay: 80ms; }
  .hero__photo { animation-name: rise-photo; animation-delay: 160ms; animation-duration: 1100ms; }
  .hero__content { animation-delay: 260ms; }
}
/* ---------- Revelação ao rolar ----------
 * Só esconde quando o JS está ativo (classe .js no <html>); o script.js marca .is-in
 * uma vez quando o elemento entra na tela. Atraso individual via --d.
 */
.js [data-reveal] {
  transition:
    opacity 700ms var(--ease-out) var(--d, 0ms),
    transform 800ms var(--ease-out) var(--d, 0ms);
}
.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(20px);
}

/* Título com máscara: a palavra sobe de dentro da própria linha */
.js [data-reveal="mask"] {
  clip-path: inset(-25% -4% -6% -4%);
}
.js [data-reveal="mask"]:not(.is-in) {
  opacity: 1;
  transform: none;
}
.mask__line {
  display: inline-block;
  transition: transform 1000ms var(--ease-out);
}
.js [data-reveal="mask"]:not(.is-in) .mask__line {
  transform: translateY(105%);
}

/* "em BREVE MENTORIA": um reflexo de luz passa uma vez depois que o card entra */
.js .tile--mentoria .mentoria {
  background: linear-gradient(100deg, var(--cream) 42%, #fff 50%, var(--cream) 58%) 100% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  /* O fundo só pinta dentro da caixa; com line-height < 1 o topo das letras ficaria fora */
  padding-block: 14px;
  margin-top: -14px;
}
.js .tile--mentoria.is-in .mentoria {
  animation: sheen 1600ms cubic-bezier(0.45, 0, 0.25, 1) 700ms both;
}
@keyframes sheen {
  from { background-position: 100% 0; }
  to   { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transition: opacity 250ms ease; }
  .js [data-reveal]:not(.is-in),
  .js [data-reveal="mask"]:not(.is-in) .mask__line { transform: none; }
  .js [data-reveal="mask"]:not(.is-in) { opacity: 0; }
  .js .tile--mentoria.is-in .mentoria { animation: none; }
  /* Entrada do topo só com fade, sem deslocamento */
  .hero__name,
  .hero__card,
  .hero__content { animation: fade-in 500ms ease both; }
  .hero__card { animation-delay: 80ms; }
  .hero__content { animation-delay: 200ms; }
}
@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}
@keyframes rise-photo {
  from { opacity: 0; transform: translateY(24px); }
}

/* ---------- Mobile ---------- */
@media (max-width: 639px) {
  /* No celular o nome ocupa a largura inteira */
  .hero { padding-top: 28px; }
  .hero__name {
    font-size: calc(59 * var(--u));
    padding-bottom: calc(14 * var(--u));
  }

  .hero__card {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    --card-r: 14px;
    background:
      radial-gradient(120% 70% at 100% 100%, #0b1a4a 0%, rgba(11, 26, 74, 0) 70%),
      linear-gradient(170deg, #131313 0%, #0d1530 55%, #0b173f 100%);
  }
  /* Espaço reservado para a foto (proporção 947 × 986, parte dela acima do card) */
  .hero__card::before {
    content: "";
    display: block;
    height: calc(88cqi * 986 / 947 * 0.86);
  }
  .hero__photo {
    left: 50%;
    top: auto;
    bottom: auto;
    width: 88%;
    translate: -54% 0;
    margin-top: calc(-88cqi * 986 / 947 * 0.14);
    position: absolute;
    top: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
    border-radius: 0;
  }

  .hero__content {
    position: relative;
    inset: auto;
    padding: 4px 22px 28px;
    margin-top: -24px;
  }
  .hero__headline { font-size: 26px; line-height: 1.15; }
  .stats {
    justify-content: space-between;
    gap: 8px;
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .stats__value { font-size: 30px; }
  .stats__label { font-size: 12px; margin-top: 4px; }

  .about { padding-top: 56px; }
  .about__title { font-size: calc(61.5 * var(--u)); }
  .about__text { max-width: none; margin-top: 18px; font-size: 15.5px; line-height: 1.55; }

  .links {
    margin-top: 48px;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 10px;
    aspect-ratio: auto;
  }
  .tile { border-radius: 14px; padding: 18px; }
  .tile--mentoria { grid-row: auto; aspect-ratio: 4 / 4.6; padding-bottom: 22px; }
  .tile--escritorio,
  .tile--curso { aspect-ratio: 269 / 160; }
  .mentoria { top: 34%; }
  .mentoria__soon,
  .mentoria__title { font-size: calc(46 * var(--u)); }
  .mentoria__sub { font-size: 14px; margin-top: 6px; }

  .btn { min-height: 46px; font-size: 14px; border-radius: 10px; padding: 0 22px; }

  .footer { padding-top: 56px; }
  .social { flex-direction: column; gap: 10px; }
  .footer__legal { font-size: 11px; margin-top: 32px; }
}

/* Tablet: mantém a composição do PDF, só garante leitura confortável */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero__headline { font-size: max(19px, calc(14 * var(--u))); }
  .stats__value { font-size: max(18px, calc(12 * var(--u))); }
}
