@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1a110c;
  --cream: #f0e4d0;
  --copper: #c07a45;
  --muted: rgba(240, 228, 208, 0.74);
  --line: rgba(240, 228, 208, 0.16);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 80px);
  --topbar: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

/* Lenis (rolagem suave): regras recomendadas pela biblioteca */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 80px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  line-height: 1.25;
  text-align: center;
  border-radius: 999px;
  background: var(--copper);
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--copper);
  transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--cream); border-color: var(--cream); }
.btn--big { min-height: 56px; padding: 0 36px; font-size: 1.0625rem; }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--line); }
.btn--ghost:hover { background: var(--cream); color: var(--bg); }

/* ---------- cabeçalho ---------- */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: center;          /* celular: logo centralizada */
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(26, 17, 12, 0.92);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.375rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand__mark { flex: none; color: var(--copper); }
.top__nav { display: none; gap: 28px; }
.top__nav a { text-decoration: none; color: var(--muted); font-size: .9375rem; }
.top__nav a:hover { color: var(--cream); }

@media (min-width: 769px) {
  .top { justify-content: space-between; background: transparent; border-bottom-color: transparent; transition: all .3s ease; }
  .top__nav { display: flex; }
  .top.is-pill {
    top: 12px;
    left: 50%;
    right: auto;
    width: min(760px, calc(100% - 32px));
    transform: translateX(-50%);
    height: 56px;
    padding: 0 12px 0 24px;
    border-radius: 999px;
    background: rgba(26, 17, 12, 0.82);
    border-color: var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

/* ---------- cena: modo padrão (sem JS, celular, movimento reduzido) ---------- */
.scene { padding-top: var(--topbar); }
.steps { display: block; }
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 36px var(--gutter) 28px;
  max-width: 720px;
  margin: 0 auto;
}
.step .still { order: -1; width: 100%; height: auto; aspect-ratio: 1; }
.step--1 { padding-top: 28px; }
.step--1 .still { order: 5; margin-top: 8px; }
.step__text {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 6.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.step--1 .step__text { font-family: var(--sans); font-weight: 400; font-size: 1.125rem; line-height: 1.5; color: var(--muted); max-width: 26ch; }
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 14.5vw, 5.5rem);
  line-height: .9;
  letter-spacing: -0.03em;
}
.stage__canvas, .cue, .stage__glow { display: none; }

/* ---------- cena: modo cinematográfico (desktop, JS, movimento permitido) ---------- */
.cine .scene { height: 620vh; padding-top: 0; }
.cine .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.cine .stage__canvas {
  display: block;
  position: absolute;
  top: 50%; left: 50%;
  width: min(100svh, 72vw);
  height: min(100svh, 72vw);
  transform: translate(calc(-50% + var(--cx, 0px)), -50%) scale(var(--z, 1));
  background: var(--bg) url("../assets/frames/f000.webp?v=12") center / cover no-repeat;
}
.cine .stage__glow {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(55vmax 48vmax at var(--gx, 50%) 52%, rgba(192, 122, 69, 0.14), transparent 62%);
}
.cine .steps { position: absolute; inset: 0; pointer-events: none; }
.cine .step {
  position: absolute;
  top: 50%;
  max-width: none;
  margin: 0;
  padding: 0;
  width: min(36vw, 640px);
  opacity: var(--o, 0);
  transform: translateY(calc(-50% + var(--y, 0px)));
  will-change: opacity, transform;
}
.cine .step--left { left: var(--gutter); }
.cine .step--right { right: var(--gutter); }
.cine .step .still { display: none; }
/* hero no desktop: título no centro, sobre o grão; a frase fica embaixo, acima da pílula, fora do grão */
.cine .step--1 { top: 0; bottom: 0; left: 0; right: 0; width: auto; transform: none; opacity: var(--o, 1); }
.cine .step--1 .hero-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: max-content;
  text-align: center;
  font-size: clamp(3.6rem, min(9.5vw, 16svh), 9.5rem);
  text-shadow: 0 4px 44px rgba(26, 17, 12, 0.5);
}
.cine .step--1 .step__text {
  position: absolute;
  left: 50%;
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 60px + clamp(24px, 5svh, 44px));
  transform: translateX(-50%);
  width: max-content;
  max-width: 24ch;
  margin: 0;
  text-align: center;
  font-size: 1.25rem;
  text-shadow: 0 2px 22px rgba(26, 17, 12, 0.75);
}
.cine .step__text { font-size: clamp(2.4rem, 4.6vw, 4.75rem); line-height: 1.05; }
.cine .step--1 .step__text { font-size: 1.25rem; line-height: 1.4; }
.cine .cue { display: none; }

/* celular: mesmo palco fixo, em coluna. Título e botão no alto na etapa 1; o texto das outras fica embaixo do quadro */
@media (max-width: 768px) {
  .cine .scene { height: 520vh; }
  .cine .stage__canvas {
    top: 0;
    left: 50%;
    width: min(100vw, 54svh);          /* provisório; o JS calcula o tamanho real e a posição (--k, --ty) */
    height: min(100vw, 54svh);
    transform: translate(-50%, var(--ty, 24svh)) scale(calc(var(--k, 1) * var(--z, 1)));
    background-image: url("../assets/frames-m/f000.webp?v=12");
    /* esmaece o alto e o pé do quadro: o pó e o vapor não acabam em linha reta no meio da tela */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
  }
  .cine .step {
    top: auto;
    bottom: calc(96px + env(safe-area-inset-bottom));   /* acima da pílula fixa */
    left: 0; right: 0;
    width: auto;
    padding: 0 var(--gutter);
    transform: translateY(var(--y, 0px));
  }
  .cine .step--left, .cine .step--right { left: 0; right: 0; }
  .cine .step--1 { top: calc(var(--topbar) + 22px); bottom: auto; left: 0; right: 0; width: auto; transform: translateY(var(--y, 0px)); }
  .cine .step { align-items: center; text-align: center; }
  .cine .step--1 .hero-title, .cine .step--1 .step__text { position: static; transform: none; width: auto; }
  .cine .step--1 .step__text { max-width: 22ch; margin: 0 auto; font-size: 1.0625rem; }
  .cine .step__text { font-size: clamp(1.6rem, 7.4vw, 2.2rem); }
  .cine .step--1 .hero-title { font-size: clamp(2.6rem, 14.5vw, 4.4rem); }
  .cine .step--1 .step__text { font-size: 1.0625rem; }
  .cine .cue, .cine .stage__glow { display: none; }
  .cine .step { width: auto; }
}

/* ---------- título do hero em duas palavras (saem para os lados ao rolar) ---------- */
.hero-title .hl { display: block; white-space: nowrap; }

/* ---------- chamada fixa (única conversão) ---------- */
.pill {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(26, 17, 12, 0.55);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: opacity .3s ease, transform .3s ease;
}
.pill__label {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  transition: background-color .2s;
}
.pill__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--copper); color: var(--bg); }
.pill:hover .pill__label { background: #fff; }
.pill.is-off { opacity: 0; pointer-events: none; transform: translate(-50%, 18px); }

/* ---------- blocos depois da cena ---------- */
.block { padding: clamp(72px, 12vw, 160px) var(--gutter); max-width: 1180px; margin: 0 auto; }
.eyebrow { margin: 0 0 12px; color: var(--copper); font-size: .875rem; letter-spacing: .04em; }
.block__title {
  margin: 0 0 clamp(32px, 5vw, 56px);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.menu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.menu li {
  display: grid;
  gap: 4px 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.menu h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.625rem; line-height: 1.2; }
.menu p { margin: 0; color: var(--muted); }
@media (min-width: 769px) {
  .menu li { grid-template-columns: 1fr 1.4fr; align-items: baseline; }
}

.info { margin: 0 0 40px; display: grid; gap: 24px; }
.info div { border-top: 1px solid var(--line); padding-top: 16px; }
.info dt { color: var(--copper); font-size: .875rem; letter-spacing: .04em; margin-bottom: 4px; }
.info dd { margin: 0; font-size: 1.25rem; }
.tag { display: inline-block; margin-left: 8px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .8125rem; vertical-align: middle; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.note { margin: 20px 0 0; color: var(--muted); font-size: .875rem; }

.foot { text-align: center; padding: 40px var(--gutter) 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.foot p { margin: 0 auto; max-width: 1180px; }
.foot__brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; }
.foot__brand .brand__mark { color: var(--copper); }
.foot__name { font-family: var(--serif); font-size: 1.75rem; line-height: 1; color: var(--cream); letter-spacing: -0.01em; }
.foot__tag { font-size: .8125rem; color: var(--muted); }

/* ---------- seletor de idioma (bandeiras) ---------- */
.flag { display: block; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(240, 228, 208, 0.22); }
.lang__list { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lang__item { display: block; border-radius: 50%; opacity: .7; transition: opacity .2s; text-decoration: none; }
.lang__item:hover, .lang__item:focus-visible { opacity: 1; }
.lang__item[aria-current="page"] { opacity: 1; }
.lang__item[aria-current="page"] .flag { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--copper); }
.lang__item span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang__toggle { display: none; }

@media (max-width: 768px) {
  .lang { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); }
  .js .lang__toggle { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px; padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer; }
  .js .lang__list {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    right: -6px;
    flex-direction: column;
    gap: 2px;
    min-width: 190px;
    padding: 8px;
    background: rgba(26, 17, 12, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .js .lang.is-open .lang__list { display: flex; }
  .js .lang__item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; opacity: 1; color: var(--cream); }
  .js .lang__item span { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 1rem; }
  .js .lang__item[aria-current="page"] { background: rgba(240, 228, 208, 0.1); }
  .js .lang__item[aria-current="page"] .flag { box-shadow: 0 0 0 1px rgba(240, 228, 208, 0.22); }
  /* sem JavaScript: as bandeiras ficam numa barra logo abaixo do cabeçalho */
  html:not(.js) .lang { position: static; transform: none; }
  html:not(.js) .lang__list { position: absolute; left: 0; right: 0; top: 100%; justify-content: center; padding: 8px; background: rgba(26, 17, 12, 0.95); border-bottom: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .actions .btn { width: 100%; }
}

/* celular: todos os textos centralizados */
@media (max-width: 768px) {
  .block { text-align: center; }
  .menu li { justify-items: center; }
  .info div { text-align: center; }
  .tag { display: table; margin: 8px auto 0; }
  .actions { justify-content: center; }
  .note { text-align: center; }
  .step { align-items: center; text-align: center; }          /* modo sem cena fixa */
  .step--1 .step__text { margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
