/* ==========================================================================
   Mentoria RQE+ · protótipo (primeira tela + jornada)
   Temas: [data-theme="claro" | "escuro"]  Fontes: [data-font="editorial" | "grotesca"]
   ========================================================================== */

/* ---------- Tokens de marca (extraídos dos arquivos em insumos/) ---------- */
:root {
  --navy: #0F344D;
  --navy-deep: #17303E;
  --navy-ink: #0B2536;
  --blue-mid: #2E638D;
  --sky: #7FC3D6;
  --mist: #9CBCC8;
  --yellow: #F7DF1C;
  --cream: #F5F3EE;
  --white: #FFFFFF;

  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Fontes dos títulos (alternáveis no protótipo) ---------- */
[data-font="editorial"] {
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --display-weight: 400;
  --display-tracking: -0.012em;
  --display-leading: 1.02;
  --h1-size: clamp(2.9rem, 1.6rem + 4.4vw, 5.4rem);
  --h2-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.8rem);
  --num-size: clamp(2.6rem, 2rem + 1.8vw, 3.6rem);
  --em-style: italic;
}
[data-font="grotesca"] {
  --font-display: "Schibsted Grotesk", "Arial Narrow", sans-serif;
  --display-weight: 700;
  --display-tracking: -0.035em;
  --display-leading: 1.0;
  --h1-size: clamp(2.4rem, 1.4rem + 3.1vw, 4.1rem);
  --h2-size: clamp(2rem, 1.3rem + 2.4vw, 3.3rem);
  --num-size: clamp(2.3rem, 1.8rem + 1.6vw, 3.1rem);
  --em-style: normal;
}

/* ---------- Temas ---------- */
[data-theme="claro"] {
  --bg: var(--cream);
  --text: var(--navy);
  --text-muted: rgba(15, 52, 77, .74);
  --text-faint: rgba(15, 52, 77, .56);
  --hairline: rgba(15, 52, 77, .16);
  --accent: var(--blue-mid);
  --btn-bg: var(--navy);
  --btn-text: var(--white);
  --btn-hover: var(--navy-ink);
  --focus: var(--navy);

  --j-bg: var(--navy);
  --j-text: var(--white);
  --j-muted: rgba(255, 255, 255, .74);
  --j-faint: rgba(255, 255, 255, .5);
  --j-hairline: rgba(255, 255, 255, .16);
  --j-accent: var(--sky);
  --j-btn-bg: var(--yellow);
  --j-btn-text: var(--navy);
  --j-btn-hover: #FFE94A;
}
[data-theme="escuro"] {
  --bg: var(--navy-deep);
  --text: var(--white);
  --text-muted: rgba(255, 255, 255, .78);
  --text-faint: rgba(255, 255, 255, .56);
  --hairline: rgba(255, 255, 255, .16);
  --accent: var(--sky);
  --btn-bg: var(--yellow);
  --btn-text: var(--navy);
  --btn-hover: #FFE94A;
  --focus: var(--yellow);

  --j-bg: #102735;
  --j-text: var(--white);
  --j-muted: rgba(255, 255, 255, .74);
  --j-faint: rgba(255, 255, 255, .5);
  --j-hairline: rgba(255, 255, 255, .14);
  --j-accent: var(--sky);
  --j-btn-bg: var(--yellow);
  --j-btn-text: var(--navy);
  --j-btn-hover: #FFE94A;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--navy); color: var(--white);
  padding: 10px 14px; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.icon--sm { width: 1em; height: 1em; }

/* Etiqueta com traço, estilo editorial */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: currentColor; flex: none;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--radius);
  font: 600 .98rem/1 var(--font-body); letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.btn--primary { background: var(--btn-bg); color: var(--btn-text); }
.btn--primary:hover { background: var(--btn-hover); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(11, 37, 54, .55); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  min-height: 40px; padding: 0 16px; font-size: .9rem;
  border: 1px solid var(--hairline); color: var(--text);
}
.btn--ghost:hover { border-color: currentColor; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 4px;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  color: var(--text);
  background: linear-gradient(currentColor, currentColor) 4px calc(100% - 10px) / calc(100% - 8px) 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.link-arrow:hover { background-size: 0 1px; }
.link-arrow .icon { transition: transform .3s var(--ease); }
.link-arrow:hover .icon { transform: translateY(3px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  padding-block: clamp(18px, 2.6vw, 32px);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; }
.brand__logo { height: clamp(40px, 3.6vw, 50px); width: auto; }
[data-theme="claro"] .brand__logo--white,
[data-theme="escuro"] .brand__logo--navy { display: none; }
.site-header__nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.site-header__link {
  font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--text-muted);
  padding: 10px 2px; transition: color .2s var(--ease);
}
.site-header__link:hover { color: var(--text); }

/* ---------- Primeira tela ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(100svh, 940px);
  display: flex; flex-direction: column;
  padding-top: clamp(104px, 12vw, 150px);
  isolation: isolate;
}
.hero__grid {
  flex: 1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px); align-items: center;
}
.hero__content { grid-column: 1 / span 6; padding-block: clamp(24px, 3vw, 48px); }
.hero__title {
  margin-top: clamp(20px, 2.4vw, 30px);
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: var(--h1-size); line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.hero__title em { font-style: var(--em-style); color: var(--accent); }
.hero__lead {
  margin-top: clamp(20px, 2.2vw, 28px);
  max-width: 34em; color: var(--text-muted);
  font-size: clamp(1.02rem, .96rem + .25vw, 1.16rem); line-height: 1.62;
  text-wrap: pretty;
}
.hero__actions { margin-top: clamp(28px, 3vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.hero__media { position: relative; grid-column: 8 / span 5; align-self: center; }
.hero__frame { position: relative; isolation: isolate; }
.hero__photo { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; }
.hero__photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%;
  filter: saturate(.92) contrast(1.03);
}
/* Correção de cor suave em direção aos azuis da marca */
.hero__photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(46, 99, 141, .10) 0%, rgba(15, 52, 77, .28) 100%);
  mix-blend-mode: soft-light;
}
.hero__backdrop {
  position: absolute; z-index: -1;
  inset: clamp(20px, 2.4vw, 32px) calc(-1 * clamp(20px, 2.4vw, 32px)) calc(-1 * clamp(20px, 2.4vw, 32px)) clamp(20px, 2.4vw, 32px);
  background: var(--sky); border-radius: var(--radius);
}
.hero__caption {
  margin-top: clamp(32px, 3.4vw, 46px);
  font-size: .8rem; letter-spacing: .04em; color: var(--text-faint);
}

.hero__footer { padding-block: clamp(36px, 4vw, 56px) clamp(28px, 3vw, 40px); }
.proof {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
}
.proof__item { padding: clamp(18px, 2vw, 26px) clamp(16px, 2vw, 32px) 0 0; }
.proof__item + .proof__item { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--hairline); }
.proof__value {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: var(--num-size); line-height: 1; letter-spacing: var(--display-tracking);
  font-variant-numeric: lining-nums tabular-nums;
}
.proof__unit { font-size: .46em; letter-spacing: 0; color: var(--text-muted); margin-left: .08em; }
.proof__label { margin-top: 10px; max-width: 22em; font-size: .92rem; line-height: 1.45; color: var(--text-muted); }
.credential { margin-top: clamp(22px, 2.4vw, 30px); font-size: .78rem; letter-spacing: .03em; color: var(--text-faint); }

/* Tema escuro: foto sangrando à direita, dissolvendo no fundo */
[data-theme="escuro"] .hero {
  background:
    radial-gradient(110% 85% at 0% 0%, rgba(46, 99, 141, .95) 0%, rgba(46, 99, 141, 0) 58%),
    linear-gradient(160deg, #17303E 0%, #132F3F 55%, #144059 100%);
}
[data-theme="escuro"] .hero__media {
  position: absolute; z-index: -1; inset: 0 0 0 auto; width: 52%;
  grid-column: auto;
}
[data-theme="escuro"] .hero__backdrop { display: none; }
[data-theme="escuro"] .hero__frame { height: 100%; }
/* A máscara fica no contêiner para que foto e sombreamento dissolvam juntos */
[data-theme="escuro"] .hero__photo {
  height: 100%; aspect-ratio: auto; border-radius: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .6) 22%, #000 46%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .6) 22%, #000 46%);
}
[data-theme="escuro"] .hero__photo img { object-position: 46% 30%; }
[data-theme="escuro"] .hero__photo::after {
  background:
    linear-gradient(180deg, rgba(19, 47, 63, .82) 0%, rgba(19, 47, 63, 0) 20%),
    linear-gradient(0deg, rgba(19, 47, 63, .96) 0%, rgba(19, 47, 63, .7) 18%, rgba(19, 47, 63, 0) 42%);
  mix-blend-mode: normal;
}
[data-theme="escuro"] .hero__caption { position: absolute; right: var(--gutter); bottom: 24px; margin: 0; color: rgba(255, 255, 255, .6); }

/* ---------- Jornada ---------- */
.journey {
  background: var(--j-bg); color: var(--j-text);
  padding-block: clamp(88px, 10vw, 150px);
  --text-faint: var(--j-faint); --text-muted: var(--j-muted); --hairline: var(--j-hairline);
  --btn-bg: var(--j-btn-bg); --btn-text: var(--j-btn-text); --btn-hover: var(--j-btn-hover);
  --focus: var(--yellow);
}
.journey__header { max-width: 860px; }
.journey__title {
  margin-top: 22px;
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: var(--h2-size); line-height: 1.06; letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.journey__title em { font-style: var(--em-style); color: var(--j-accent); }
.journey__intro { margin-top: 22px; max-width: 36em; color: var(--j-muted); font-size: 1.08rem; }

.journey__timeline { position: relative; margin-top: clamp(56px, 6vw, 88px); }
.journey__steps {
  position: relative;
  display: grid; grid-template-columns: 1.15fr .9fr 1.15fr 1.15fr .75fr;
  column-gap: clamp(18px, 2.4vw, 40px);
}

/* Trilho horizontal que se desenha ao rolar */
.journey__rail {
  position: absolute; left: 0; right: 0; top: 46px; height: 1px;
  background: var(--j-hairline);
}
.journey__rail-fill {
  position: absolute; inset: 0; right: 15%;
  background: var(--yellow);
  transform-origin: left center;
}
.journey__rail::after { /* trecho final pontilhado: fora do escopo */
  content: ""; position: absolute; top: 0; right: 0; width: 15%; height: 1px;
  background: repeating-linear-gradient(90deg, var(--j-faint) 0 4px, transparent 4px 9px);
}

.step { position: relative; padding-top: 0; }
.step__when {
  height: 30px; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--j-faint);
}
.step__node {
  position: absolute; top: 41px; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--yellow); box-shadow: 0 0 0 5px var(--j-bg);
}
.step__num {
  margin-top: 46px;
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: clamp(2.6rem, 2rem + 1.6vw, 3.5rem); line-height: 1; letter-spacing: var(--display-tracking);
  color: var(--j-accent); font-variant-numeric: lining-nums;
}
[data-font="grotesca"] .step__num { font-weight: 500; }
.step__title {
  margin-top: 18px;
  font-family: var(--font-body); font-weight: 600; font-size: 1.24rem; line-height: 1.25; letter-spacing: -0.01em;
}
.step__kicker { margin-top: 8px; color: var(--j-muted); font-size: .98rem; line-height: 1.5; }
.step__list { margin-top: 18px; border-top: 1px solid var(--j-hairline); }
.step__list li {
  position: relative; padding: 11px 0 11px 18px;
  border-bottom: 1px solid var(--j-hairline);
  font-size: .94rem; line-height: 1.45; color: var(--j-muted);
}
.step__list li::before {
  content: ""; position: absolute; left: 0; top: 1.15em; width: 7px; height: 1px; background: var(--j-accent);
}

.step--milestone .step__node { background: var(--j-bg); box-shadow: inset 0 0 0 2px var(--yellow), 0 0 0 5px var(--j-bg); }
.step--milestone .step__title { margin-top: 46px; font-size: 1.08rem; }
.step--milestone .step__kicker { font-size: .92rem; }

.step--out { opacity: .55; }
.step--out .step__node { background: var(--j-bg); box-shadow: inset 0 0 0 1px var(--j-faint), 0 0 0 5px var(--j-bg); }
.step--out .step__title { margin-top: 46px; font-size: 1.08rem; }
.step--out .step__kicker { font-size: .9rem; }

.journey__band {
  margin-top: clamp(36px, 4vw, 52px);
  width: 85%; /* cobre as etapas 01 a 03; a prova prática fica de fora */
  display: flex; align-items: center; gap: 16px;
  font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--yellow);
}
.journey__band::before, .journey__band::after { content: ""; height: 1px; background: rgba(247, 223, 28, .45); flex: 1; }
.journey__band::before { flex: 0 0 28px; }

.journey__footer {
  margin-top: clamp(56px, 6vw, 84px); padding-top: clamp(32px, 3vw, 44px);
  border-top: 1px solid var(--j-hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap;
}
.journey__note { max-width: 40em; color: var(--j-muted); font-size: 1.04rem; }

/* ---------- Animações de entrada (só com JS e sem redução de movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .hero [data-reveal]:nth-child(2) { transition-delay: .08s; }
  .js .hero [data-reveal]:nth-child(3) { transition-delay: .16s; }
  .js .hero [data-reveal]:nth-child(4) { transition-delay: .24s; }
  .js .hero__media[data-reveal] { transition-delay: .12s; transform: translateY(10px) scale(.985); }
  /* No tema escuro a foto sangra até a borda: só esmaece, sem escalar */
  .js[data-theme="escuro"] .hero__media[data-reveal] { transform: none; transition-duration: 1.4s; }

  .js .journey__rail-fill { transform: scaleX(0); transition: transform 1.6s var(--ease) .1s; }
  .js .journey__timeline.is-in .journey__rail-fill { transform: scaleX(1); }
  .js .step { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(.25s + var(--i) * .22s); }
  .js .journey__timeline.is-in .step { opacity: 1; transform: none; }
  .js .journey__timeline.is-in .step--out { opacity: .55; }
  .js .journey__band { opacity: 0; transition: opacity .8s var(--ease) 1.4s; }
  .js .journey__timeline.is-in .journey__band { opacity: 1; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1023px) {
  .hero { min-height: auto; padding-top: 100px; }
  .hero__grid { grid-template-columns: 1fr; row-gap: 48px; }
  .hero__content, .hero__media { grid-column: 1 / -1; }
  .hero__media { max-width: 520px; margin-right: clamp(20px, 4vw, 32px); }
  [data-theme="escuro"] .hero__media { position: relative; inset: auto; width: auto; max-width: none; margin: 0 calc(-1 * var(--gutter)); z-index: 0; }
  [data-theme="escuro"] .hero__photo { height: auto; aspect-ratio: 4 / 4.4; }
  [data-theme="escuro"] .hero__photo img { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%); }
  [data-theme="escuro"] .hero__photo::after { background: linear-gradient(0deg, rgba(19, 47, 63, .9) 0%, rgba(19, 47, 63, 0) 40%); }
  [data-theme="escuro"] .hero__caption { left: var(--gutter); right: auto; }

  .journey__steps { grid-template-columns: 1fr; row-gap: 44px; padding-left: 34px; }
  .journey__rail { top: 6px; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .journey__rail-fill { inset: 0; bottom: 12%; transform-origin: center top; }
  .journey__rail::after { top: auto; bottom: 0; right: auto; left: 0; width: 1px; height: 12%; background: repeating-linear-gradient(180deg, var(--j-faint) 0 4px, transparent 4px 9px); }
  .step__node { top: 4px; left: -34px; }
  .step__when { height: auto; }
  .step__num { margin-top: 14px; }
  .step--milestone .step__title, .step--out .step__title { margin-top: 12px; }
  .journey__band { display: none; }
  @media (prefers-reduced-motion: no-preference) {
    .js .journey__rail-fill { transform: scaleY(0); }
    .js .journey__timeline.is-in .journey__rail-fill { transform: scaleY(1); }
  }
}

@media (max-width: 640px) {
  .site-header__link { display: none; }
  .proof { grid-template-columns: 1fr; }
  .proof__item, .proof__item + .proof__item { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--hairline); }
  .hero__actions .btn { width: 100%; }
  .journey__footer .btn { width: 100%; }
}

/* ---------- Controle do protótipo (não faz parte do site) ---------- */
.proto {
  position: fixed; left: 16px; bottom: 16px; z-index: 300;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 999px;
  background: rgba(20, 20, 22, .82); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 500 12px/1 system-ui, sans-serif;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.proto__label { padding-left: 6px; opacity: .6; text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; }
.proto__group { display: flex; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 2px; }
.proto button {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; padding: 8px 12px; border-radius: 999px; opacity: .7;
}
.proto button[aria-pressed="true"] { background: #fff; color: #111; opacity: 1; }
@media (max-width: 640px) { .proto { left: 8px; right: 8px; bottom: 8px; justify-content: center; border-radius: 14px; } }
