/* Hipótese C · Cada fase — Dra. Jéssica Gonçalves */
:root {
  /* amanhecer */
  --ceu: #f4e9dc;
  --pessego: #f2cfb0;
  --lavanda: #c9c3cf;
  --pista: #b8725a;
  --pista-funda: #94543f;
  --linha: #fffaf3;
  --grafite: #1c1a1c;
  --grafite-2: #4a4248;
  --sol: #fff4e4;
  --ouro: #c9944f;

  --f-titulo: "Teko", "Arial Narrow", sans-serif;
  --f-texto: "Kanit", system-ui, sans-serif;

  --margem: clamp(20px, 5.6vw, 92px);
  --topo-h: 84px;
  --raio: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ceu);
  color: var(--grafite);
  font-family: var(--f-texto);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- topo ---------- */
.topo {
  position: absolute; z-index: 20; inset: 0 0 auto 0;
  height: var(--topo-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--margem);
}
.marca { text-decoration: none; display: grid; line-height: 1; }
.marca-nome {
  font-family: var(--f-titulo); font-weight: 500; font-size: 30px;
  letter-spacing: .01em; line-height: .9;
}
.marca-sub {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--grafite-2); font-weight: 400; margin-top: 4px;
}
.topo-nav { display: flex; align-items: center; gap: 22px; }
.topo-oab {
  font-family: var(--f-titulo); font-size: 20px; letter-spacing: .08em;
  font-weight: 500; color: var(--grafite-2); padding-top: 3px;
}
.topo-cta {
  font-size: 15px; font-weight: 400; text-decoration: none;
  padding: 9px 18px; border-radius: var(--raio);
  border: 1px solid color-mix(in oklab, var(--grafite) 30%, transparent);
  transition: background-color .3s, color .3s, border-color .3s;
}
.topo-cta:hover, .topo-cta:focus-visible { background: var(--grafite); color: var(--ceu); border-color: var(--grafite); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: max(100svh, 700px);
  height: min(100svh, 1040px);
  overflow: hidden;
  isolation: isolate;
}
@media (min-height: 1041px) { .hero { min-height: 1040px; } }

/* céu em malha */
.ceu {
  position: absolute; inset: 0; z-index: -3;
  background:
    linear-gradient(in oklab 180deg, #cdc6d3 0%, #e6dbd8 34%, #f6e6d6 58%, #f4d4b8 72%, #efc9ae 100%);
}
.ceu .m {
  position: absolute; border-radius: 50%;
  will-change: transform;
}
.ceu .m1 { /* resto da noite, alto à esquerda */
  width: 90vmax; height: 70vmax; left: -30vmax; top: -48vmax;
  background: radial-gradient(closest-side in oklab, #bdb6c8 0%, color-mix(in oklch, #bdb6c8 0%, transparent) 100%);
  opacity: .85;
  animation: deriva1 34s ease-in-out infinite alternate;
}
.ceu .m2 { /* lavanda à direita */
  width: 70vmax; height: 55vmax; right: -28vmax; top: -30vmax;
  background: radial-gradient(closest-side in oklab, #c9c3cf 0%, color-mix(in oklch, #c9c3cf 0%, transparent) 100%);
  opacity: .9;
  animation: deriva2 28s ease-in-out infinite alternate;
}
.ceu .m3 { /* pêssego do horizonte */
  width: 120vmax; height: 40vmax; left: -10vmax; top: calc(var(--hz, 66%) - 22vmax);
  background: radial-gradient(closest-side in oklab, #f2c6a2 0%, color-mix(in oklch, #f2cfb0 0%, transparent) 100%);
  opacity: .8;
  animation: deriva3 38s ease-in-out infinite alternate;
}
.ceu .m4 { /* luz morna atrás dela */
  width: 60vmax; height: 46vmax; right: -6vmax; top: calc(var(--hz, 66%) - 28vmax);
  background: radial-gradient(closest-side in oklab, #fbe3c8 0%, color-mix(in oklch, #fbe3c8 0%, transparent) 100%);
  animation: deriva2 24s ease-in-out infinite alternate-reverse;
}
.ceu .sol {
  position: absolute; width: 34vmax; height: 34vmax; border-radius: 50%;
  left: var(--sol-x, 66%); top: var(--hz, 66%);
  translate: -50% -50%;
  background: radial-gradient(closest-side in oklab, #fffaf1 0%, #fde9d2 26%, color-mix(in oklch, #f9dcc0 0%, transparent) 100%);
  animation: respira 18s ease-in-out infinite alternate;
}
@keyframes deriva1 { to { transform: translate(8vmax, 5vmax) scale(1.08); } }
@keyframes deriva2 { to { transform: translate(-7vmax, 4vmax) scale(1.06); } }
@keyframes deriva3 { to { transform: translate(6vmax, -1.5vmax) scale(1.1); } }
@keyframes respira { from { opacity: .82; scale: .94; } to { opacity: 1; scale: 1.05; } }

.pista {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  display: block;
}

.grao {
  position: absolute; inset: -50%; z-index: 5; pointer-events: none;
  opacity: .055; mix-blend-mode: multiply;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* retrato */
.retrato {
  position: absolute; z-index: 2; margin: 0;
  right: max(2vw, calc(50vw - 690px));
  bottom: 0;
  height: min(94%, 980px);
  aspect-ratio: 1036 / 1795;
  pointer-events: none;
}
.retrato img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom;
  filter: drop-shadow(-18px 0 40px color-mix(in oklch, #fbe0c2 70%, transparent));
  /* as mangas encostam na borda da foto original: só elas se desfazem */
  -webkit-mask-image: linear-gradient(#000 0 52%, transparent 60%), linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(#000 0 52%, transparent 60%), linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
}
/* luz terracota que sobe da pista e esquenta a barra do blazer */
.retrato::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgb(196 120 92 / .55), rgb(214 150 118 / .18) 22%, transparent 42%);
  mix-blend-mode: soft-light;
  -webkit-mask: url("../img/hero-retrato.webp") bottom / contain no-repeat,
                linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask: url("../img/hero-retrato.webp") bottom / contain no-repeat intersect,
                linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
}
@media (max-width: 760px) {
  .retrato::after {
    -webkit-mask: url("../img/hero-retrato.webp") bottom / contain no-repeat;
            mask: url("../img/hero-retrato.webp") bottom / contain no-repeat;
  }
}
/* sombra de contato sobre a pista */
.retrato::before {
  content: ""; position: absolute; z-index: -1;
  left: -12%; right: -18%; bottom: -6%; height: 22%;
  background: radial-gradient(closest-side in oklab, rgb(80 36 26 / .5), rgb(80 36 26 / 0));
}

/* texto */
.texto {
  position: absolute; z-index: 4;
  left: var(--margem);
  top: calc(var(--topo-h) + clamp(24px, 5.4vh, 76px));
  width: min(60vw, 860px);
}
.kicker {
  margin: 0 0 18px;
  font-size: 13px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: var(--grafite-2);
  display: flex; align-items: center; gap: 14px;
}
.kicker::before { content: ""; width: 34px; height: 2px; background: var(--pista); border-radius: 2px; }

.titulo {
  margin: 0;
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: clamp(56px, 6.4vw, 108px);
  line-height: .86;
  letter-spacing: -.005em;
  color: var(--grafite);
}
.titulo .linha { display: block; overflow: hidden; padding-top: .14em; margin-top: -.14em; }
.titulo .linha > span { display: inline-block; }
.titulo .l2 > span { color: var(--pista-funda); }

.apoio {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--grafite);
}
.acoes { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border-radius: var(--raio);
  font-size: 17px; font-weight: 400; text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background-color .3s, box-shadow .35s;
}
.btn svg { width: 21px; height: 21px; fill: currentColor; }
.btn-principal {
  background: var(--grafite); color: #fbf3ea;
  box-shadow: 0 10px 30px -12px rgb(28 26 28 / .55);
}
.btn-principal:hover, .btn-principal:focus-visible { transform: translateY(-2px); background: #2c272b; box-shadow: 0 16px 36px -14px rgb(28 26 28 / .6); }
.btn-sec {
  color: var(--grafite);
  border: 1px solid color-mix(in oklab, var(--grafite) 28%, transparent);
  background: color-mix(in oklab, #fff 28%, transparent);
  backdrop-filter: blur(6px);
}
.btn-sec:hover, .btn-sec:focus-visible { background: color-mix(in oklab, #fff 55%, transparent); }
.btn:focus-visible, .topo-cta:focus-visible { outline: 2px solid var(--pista-funda); outline-offset: 3px; }

.provas {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 0;
  font-size: 14.5px; font-weight: 400; color: var(--grafite-2);
}
.provas li { display: flex; align-items: center; }
.provas li + li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--pista); margin: 0 14px;
}
.provas b { font-family: var(--f-titulo); font-weight: 600; font-size: 19px; letter-spacing: .06em; color: var(--grafite); line-height: 1; padding-top: 3px; }

/* fases sobre a pista (posicionadas pelo JS) */
.fases { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.fase {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--f-titulo); text-transform: uppercase;
  white-space: nowrap; line-height: 1;
  transform-origin: 0 100%;
  opacity: 0;
  transition: opacity .9s ease;
}
.fase .n { font-size: 15px; font-weight: 500; letter-spacing: .08em; color: var(--pista-funda); }
.fase .t { font-size: 23px; font-weight: 500; letter-spacing: .07em; color: var(--grafite); }
.fase::after { /* haste até o chão */
  content: ""; position: absolute; left: 0; top: 100%;
  width: 1.5px; height: var(--haste, 34px);
  background: linear-gradient(var(--grafite-2), color-mix(in oklab, var(--grafite-2) 0%, transparent));
  opacity: .5;
}
.fases.on .fase { opacity: .55; }
.fases.on .fase.feita { opacity: .85; }
.fases.on .fase.agora { opacity: 1; }
.fase.agora .t { color: var(--grafite); }
.fase.agora .n { color: var(--pista); }
.fase .t, .fase .n { transition: color .9s; }

/* na pista em coluna (celular, tablet em pé) o rótulo fica sobre o terracota: vira placa */
.fases.coluna .fase {
  padding: 3px 7px 1px; border-radius: 3px;
  background: color-mix(in oklab, #f6ece1 86%, transparent);
  box-shadow: 0 4px 14px -8px rgb(80 36 26 / .5);
}
.fases.coluna .fase::after { left: 7px; }
.fases.on.coluna .fase { opacity: .78; }
.fases.on.coluna .fase.feita { opacity: .92; }
.fases.on.coluna .fase.agora { opacity: 1; }

.legenda {
  position: absolute; z-index: 3; left: 0; top: 0;
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 400;
  color: var(--grafite-2); white-space: nowrap;
  opacity: 0; transition: opacity 1s ease;
}
.legenda.on { opacity: .9; }

/* ---------- entrada ---------- */
.js .titulo .linha > span { transform: translateY(105%); }
.js [data-e] { opacity: 0; transform: translateY(14px); }
.js .retrato { opacity: 0; transform: translateY(26px); }
.js .ceu { opacity: 0; }
.js .topo { opacity: 0; }

.pronto .ceu { opacity: 1; transition: opacity 1.4s ease; }
.pronto .topo { opacity: 1; transition: opacity .9s ease .9s; }
.pronto .titulo .linha > span { transform: none; transition: transform 1.1s cubic-bezier(.16,.84,.2,1); }
.pronto .titulo .l1 > span { transition-delay: .25s; }
.pronto .titulo .l2 > span { transition-delay: .5s; }
.pronto [data-e] { opacity: 1; transform: none; transition: opacity .9s ease, transform 1s cubic-bezier(.16,.84,.2,1); }
.pronto [data-e="1"] { transition-delay: .1s; }
.pronto [data-e="2"] { transition-delay: .85s; }
.pronto [data-e="3"] { transition-delay: 1s; }
.pronto [data-e="4"] { transition-delay: 1.15s; }
.pronto .retrato { opacity: 1; transform: none; transition: opacity 1.3s ease .35s, transform 1.6s cubic-bezier(.16,.84,.2,1) .35s; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .texto { width: min(66vw, 680px); }
  .titulo { font-size: clamp(56px, 7.2vw, 96px); }
  .apoio { max-width: 36em; font-size: 17px; }
  .provas { font-size: 13.5px; }
  .retrato { height: min(80%, 900px); right: -2vw; }
}
@media (max-width: 1100px) and (min-width: 761px) and (orientation: portrait) {
  .texto { width: min(100% - 2 * var(--margem), 600px); }
  .apoio { max-width: 29em; }
  .titulo { font-size: clamp(64px, 11vw, 110px); }
  .provas { flex-direction: column; gap: 4px; }
  .provas li + li::before { margin: 0 10px 0 0; }
  .retrato { height: 60%; right: -4vw; }
}

/* ---------- celular ---------- */
@media (max-width: 760px) {
  :root { --topo-h: 68px; --palco: clamp(470px, 132vw, 600px); }
  .marca-nome { font-size: 25px; }
  .marca-sub { font-size: 10px; letter-spacing: .14em; }
  .topo-oab { display: none; }
  .topo-cta { font-size: 14px; padding: 8px 15px; }
  .hero { height: auto; min-height: 0; padding-bottom: var(--palco); }
  .texto { position: relative; left: auto; top: auto; width: auto; padding: calc(var(--topo-h) + 22px) var(--margem) 0; }
  .kicker { font-size: 11px; letter-spacing: .16em; gap: 10px; margin-bottom: 12px; }
  .kicker::before { width: 22px; }
  .titulo { font-size: clamp(42px, 13vw, 62px); line-height: .88; }
  .apoio { margin-top: 14px; font-size: 16.5px; line-height: 1.5; }
  .acoes { margin-top: 20px; flex-wrap: nowrap; gap: 10px; }
  .btn { min-height: 52px; padding: 0 18px; font-size: 16px; }
  .btn-principal { flex: 1 1 auto; justify-content: center; }
  .btn-sec { flex: 0 0 auto; padding: 0 16px; }
  .provas { font-size: 13px; margin-top: 16px; gap: 4px 0; }
  .provas li:nth-child(3) { flex-basis: 100%; }
  .provas li:nth-child(3)::before { display: none; }
  .provas li + li::before { margin: 0 10px; }
  .retrato { right: auto; left: 43%; height: calc(var(--palco) - 6px); }
  .retrato img { -webkit-mask-image: none; mask-image: none; }
  .fase .t { font-size: 19px; }
  .fase .n { font-size: 13px; }
  .legenda { font-size: 10px; letter-spacing: .16em; white-space: normal; width: 12em; line-height: 1.35; }
}

@media (max-width: 400px) { .btn .longo { display: none; } }
@media (max-width: 380px) { .kicker { font-size: 10px; letter-spacing: .1em; gap: 8px; } .kicker::before { width: 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
