/* =============================================================
   Dra. Flavia Menezes · BUTT ERREJOTA®
   Página escura, fotografia em primeiro plano. As transformações
   vêm em chapas claras sobre o marrom da marca: o assunto é a
   foto, a tipografia só apresenta. Paleta e fontes do manual.
   ============================================================= */

/* ---------- 1. Fontes ---------- */
@font-face {
  font-family: 'Italiana';
  src: url('assets/fonts/italiana-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-latin.woff2') format('woff2-variations'),
       url('assets/fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Sistema visual ---------- */
:root {
  --cream:  #f9f4ee;
  --sand:   #daceb8;
  --bronze: #b79c81;
  --taupe:  #8f7d6f;
  --cocoa:  #4e4139;
  --deep:   #241c18;
  --ink:    #17110e;
  --white:  #ffffff;

  --text: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Italiana', 'Cormorant Garamond', Georgia, serif;

  --wrap: 1280px;
  --pad: clamp(20px, 4.6vw, 60px);
  /* Recuo das faixas que sangram a tela, alinhado com a coluna do .wrap.
     `--wrap` tem de continuar sendo um comprimento em qualquer largura: se
     virar porcentagem, ela colapsa para zero no calculo de largura minima e
     o `max()` passa a devolver meia tela de padding, empurrando o cabecalho
     e o hero para fora da viewport. */
  --edge: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));

  --line: rgba(249, 244, 238, .14);
  --line-2: rgba(249, 244, 238, .26);
  --dim: rgba(249, 244, 238, .68);
  --dim-2: rgba(249, 244, 238, .46);

  /* Sombra curta, raio negativo: no escuro, halo largo vira mancha. */
  --lift: 0 16px 32px -24px rgba(0, 0, 0, .9);
  --lift-2: 0 22px 44px -28px rgba(0, 0, 0, .95);
}

/* ---------- 3. Reset e base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.56;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.has-modal { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure, figcaption { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
sup { font-size: .48em; vertical-align: super; line-height: 0; letter-spacing: 0; }
::selection { background: var(--bronze); color: var(--ink); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-200%);
  padding: 12px 18px;
  background: var(--cream);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { transform: none; }

/* O hero nunca entra na animação de rolagem: ele é o primeiro quadro. */
html.js .reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity .7s ease, transform .8s cubic-bezier(.18, .72, .16, 1);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

.mono { width: auto; stroke: currentColor; }

/* ---------- 4. Botão ---------- */
.btn {
  --btn-bg: var(--cream);
  --btn-fg: var(--ink);
  --btn-hover-bg: var(--bronze);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 15px 24px;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.25;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--lift);
  transition: box-shadow .35s ease, transform .18s ease;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-hover-bg);
  transform: translateY(101%);
  transition: transform .42s cubic-bezier(.22, .68, .12, 1);
}
.btn > span { position: relative; }
.btn__arw { width: 26px; height: 8px; flex: none; transition: transform .42s cubic-bezier(.22, .68, .12, 1); }
.btn:hover { box-shadow: var(--lift-2); }
.btn:hover::before { transform: translateY(0); }
.btn:hover .btn__arw { transform: translateX(5px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn[hidden] { display: none; }

.btn--full { display: flex; width: 100%; }
.btn--full > span { flex: 1; text-align: left; }

/* Botão escuro, para uso sobre chapa clara. */
.card .btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  --btn-hover-bg: var(--cocoa);
}

/* =============================================================
   5. HERO · retrato à direita, manchete à esquerda, barra em cima
   ============================================================= */
.hero {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: clamp(700px, 88svh, 820px);
  min-height: 0;
  background: var(--ink);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px var(--edge);
  border-bottom: 1px solid var(--line);
}
.bar__brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.bar__brand .mono { height: 30px; color: var(--bronze); flex: none; }
.bar__txt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--cream);
}
.bar__txt i { font-style: normal; color: var(--bronze); padding-inline: 5px; }
.bar__cta {
  flex: none;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.bar__cta:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
@media (max-width: 1000px) { .bar__cta { display: none; } }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46%;
  align-items: stretch;
  min-height: 0;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(38px, 4vw, 64px) clamp(28px, 3.5vw, 56px) clamp(32px, 5vw, 64px) var(--edge);
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: .96;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--cream);
  text-wrap: balance;
}
.hero__sub {
  margin-top: clamp(18px, 2vw, 24px);
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--line);
  max-width: 56ch;
  font-size: 15.5px;
  color: var(--dim);
}
.hero__sub::before {
  content: 'PROTOCOLO EXCLUSIVO';
  display: block;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--bronze);
}
.hero__copy .btn { align-self: start; margin-top: clamp(22px, 2.4vw, 30px); }

/* O retrato é claro e o campo é escuro: a lâmina de gradiente na
   aresta esquerda costura os dois em vez de deixar um retângulo. */
.hero__figure {
  position: relative;
  overflow: hidden;
  min-height: 42svh;
}
.hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
}
.hero__figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(23, 17, 14, .55) 16%, rgba(23, 17, 14, 0) 46%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero { height: auto; min-height: 0; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  /* O retrato abre a pagina na proporcao original do arquivo (2:3):
     com a moldura no mesmo formato da foto, nada e recortado. */
  .hero__figure { order: -1; aspect-ratio: 2 / 3; min-height: 0; max-height: none; }
  .hero__figure img { object-fit: contain; object-position: 50% 50%; }
  .hero__figure::after {
    background: linear-gradient(180deg, rgba(23, 17, 14, .3) 0%, rgba(23, 17, 14, 0) 34%, var(--ink) 100%);
  }
  .hero__copy { padding: 22px var(--pad) 32px; }
}

/* Numa tela larga e baixa (tablet em pe) a foto inteira em 2:3 ocuparia
   mais que a viewport: trava a altura e a foto continua inteira, centrada. */
@media (min-width: 620px) and (max-width: 900px) {
  .hero__figure { aspect-ratio: auto; height: 66svh; }
}

/* =============================================================
   6. RESULTADOS · chapas claras sobre o marrom
   ============================================================= */
.proof {
  padding-block: clamp(42px, 5vw, 72px);
  background: var(--deep);
}

.proof__head {
  display: grid;
  gap: 10px;
  align-items: end;
}
@media (min-width: 940px) {
  .proof__head { grid-template-columns: minmax(0, 1fr) auto; gap: 28px; }
}
.proof__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(29px, 4.1vw, 52px);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--cream);
  text-wrap: balance;
}
.proof__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.proof__arrows { display: inline-flex; gap: 2px; color: var(--bronze); }
.proof__arrows svg { width: 15px; height: 15px; }

/* Trilho de bordo a bordo: o card vizinho cortado é o convite. */
.rail { margin-top: clamp(22px, 2.8vw, 34px); }
.rail__track {
  display: flex;
  gap: clamp(12px, 1.4vw, 20px);
  padding-inline: var(--edge);
  padding-block: 2px 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

.case {
  flex: 0 0 clamp(220px, 24vw, 320px);
  scroll-snap-align: start;
  background: var(--cream);
  box-shadow: var(--lift);
}
/* A chapa inteira aparece: `contain` sobre branco, nunca `cover`.
   Todas as chapas saem do mesmo tamanho, então não sobra borda. */
.case__fig {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--white);
}
.case__fig img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
.case__zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: rgba(23, 17, 14, .58);
  color: var(--cream);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.case__zoom svg { width: 16px; height: 16px; }
.case:hover .case__zoom, .case:focus-within .case__zoom { opacity: 1; transform: none; }

/* Tarja de identificação, no pé da chapa. */
.case__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 11px 16px 13px;
  border-top: 2px solid var(--bronze);
  background: var(--cream);
}
.case__n {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  color: var(--bronze);
  flex: none;
}
.case__cap {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--cocoa);
}

/* Setas e marcas centralizadas, como um par. As setas nunca encolhem: quem
   cede espaco e o trilho de marcas, que tem base de 30px e um piso de 14px.
   Assim a linha se ajusta sozinha em qualquer largura, sem media query. */
.rail__ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 14px);
  margin-top: clamp(14px, 1.8vw, 22px);
}
.rail__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.rail__arrow:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.rail__arrow svg { width: 18px; height: 18px; }
/* A largura pedida e a da serie inteira (30px por marca). Quando a tela nao
   comporta, o proprio flex encolhe a faixa e as marcas se dividem por igual:
   funciona com oito ou com vinte e duas, sem media query e sem transbordar.
   `--n` vem do app.js, que sabe quantas chapas existem. */
.rail__ticks {
  --tick-gap: clamp(3px, .8vw, 7px);
  display: flex;
  align-items: center;
  gap: var(--tick-gap);
  flex: 0 1 auto;
  min-width: 0;
  width: calc(var(--n, 8) * 30px + (var(--n, 8) - 1) * var(--tick-gap));
}
/* O filete continua com 2px: a altura de 44px e so area de toque. */
.rail__tick {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.rail__tick::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: var(--line-2);
  transition: background .35s ease, transform .35s ease;
}
.rail__tick.is-on::before { background: var(--bronze); transform: scaleY(2); }

.proof__cta { margin-top: clamp(20px, 2.5vw, 32px); text-align: center; }

/* =============================================================
   7. FORMULÁRIO · foto de um lado, chapa de papel do outro
   ============================================================= */
.lead { background: var(--ink); }
.lead__grid {
  display: grid;
  grid-template-columns: 44% minmax(0, 1fr);
  align-items: stretch;
  height: clamp(640px, 72svh, 700px);
  min-height: 0;
}
.lead__figure { position: relative; min-height: 0; overflow: hidden; }
.lead__figure img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.lead__figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 17, 14, .42) 0%, rgba(23, 17, 14, 0) 40%, rgba(23, 17, 14, .5) 100%);
  pointer-events: none;
}

.lead__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 1.5vw, 20px);
  padding: clamp(24px, 3vw, 42px) var(--edge) clamp(24px, 3vw, 42px) clamp(24px, 3vw, 44px);
  background: var(--cream);
  color: var(--cocoa);
}
.lead__copy::before {
  content: 'AGENDAMENTO';
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--bronze);
}
.lead__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 43px);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}
.lead__sub {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(78, 65, 57, .2);
  max-width: 48ch;
  font-size: 15.5px;
  color: rgba(78, 65, 57, .92);
}

.card { max-width: 560px; }

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 8px;
}
.field:last-of-type { margin-bottom: 0; }
.field label {
  grid-row: 1;
  grid-column: 1;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cocoa);
}
.field input,
.field select {
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(78, 65, 57, .24);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color .25s ease, box-shadow .25s ease;
  appearance: none;
  -webkit-appearance: none;
}
.field input::placeholder { color: rgba(78, 65, 57, .48); }
.field input:focus,
.field select:focus {
  outline: 0;
  border-color: var(--cocoa);
  box-shadow: inset 0 0 0 1px var(--cocoa);
}
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: inset 0 0 0 60px var(--white);
}
.field--select select { padding-right: 46px; cursor: pointer; }
.field--select select:invalid { color: rgba(78, 65, 57, .48); }
.field__chev {
  grid-row: 2;
  grid-column: 1;
  align-self: center;
  justify-self: end;
  margin-right: 16px;
  width: 18px;
  height: 18px;
  color: var(--cocoa);
  pointer-events: none;
}
.field__msg {
  grid-row: 3;
  grid-column: 1;
  display: none;
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a13c2c;
}
.field.is-error input,
.field.is-error select { border-color: #a13c2c; box-shadow: inset 0 0 0 1px #a13c2c; }
.field.is-error .field__msg { display: block; }

.card .btn { margin-top: 14px; }
.card__safe {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--taupe);
}
.card__safe svg { width: 15px; height: 15px; flex: none; color: var(--bronze); }

/* Campo anti-robô: fora da tela, nunca display:none (robô pula campo oculto). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Falha no envio: as duas saídas do motor, no tom do recado de campo. */
.card__fail {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #a13c2c;
}
.card__fail button {
  padding: 0;
  margin-left: 6px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.card__fail [hidden] { display: none; }


@media (max-width: 940px) {
  /* No mobile a foto deixa de ser um bloco proprio acima do formulario:
     vira o fundo da secao, esmaecida sobre o ink, e o form flutua por cima. */
  .lead { position: relative; overflow: hidden; }
  .lead__grid { display: block; height: auto; min-height: 0; }

  .lead__figure {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    max-height: none;
    pointer-events: none;
  }
  /* A opacidade fica na imagem, e nao na figure: a figure carrega o .reveal,
     que reescreve opacity ao entrar na tela e apagaria este valor. */
  .lead__figure img { min-height: 0; object-fit: cover; object-position: 50% 30%; opacity: .34; }
  .lead__figure::after {
    background: linear-gradient(180deg, rgba(23, 17, 14, .3) 0%, rgba(23, 17, 14, 0) 26%, rgba(23, 17, 14, .55) 72%, var(--ink) 100%);
  }
  /* Fundo nao desliza: sem a animacao de entrada nesta faixa. */
  html.js .lead__figure.reveal { opacity: 1; transform: none; transition: none; }

  .lead__panel {
    position: relative;
    z-index: 1;
    background: transparent;
    padding: clamp(30px, 7vw, 44px) var(--pad) clamp(34px, 8vw, 48px);
    color: var(--dim);
  }
  .lead__title { color: var(--cream); }
  .lead__sub { border-top-color: var(--line); color: var(--dim); }

  /* A chapa de papel do formulario e o que fica por cima da foto. */
  .card {
    max-width: none;
    padding: clamp(20px, 5.4vw, 28px);
    background: var(--cream);
    box-shadow: var(--lift-2);
  }
}

/* =============================================================
   8. RODAPÉ
   ============================================================= */
.foot {
  padding-block: clamp(18px, 2vw, 26px);
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.foot__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand links"
    "legal dev";
  align-items: center;
  justify-items: start;
  gap: 4px clamp(24px, 3vw, 48px);
  text-align: left;
}
.foot__brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}
.foot__brand .mono { height: 28px; color: var(--bronze); }
.foot__line {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream);
}
.foot__line i { font-style: normal; color: var(--bronze); padding-inline: 5px; }
.foot__links { grid-area: links; justify-self: end; display: flex; align-items: center; gap: 10px; }
.foot__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: none;
  font-size: 11px;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-2);
  cursor: pointer;
  transition: color .25s ease;
}
.foot__link:hover { color: var(--bronze); }
.foot__dot { width: 3px; height: 3px; background: var(--bronze); }
.foot__legal, .foot__dev { font-size: 10.5px; color: var(--dim-2); }
.foot__legal { grid-area: legal; }
.foot__dev { grid-area: dev; justify-self: end; text-align: right; }
.foot__dev a {
  display: inline-block;
  padding-block: 3px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(183, 156, 129, .55);
}
.foot__dev a:hover { color: var(--bronze); }

/* =============================================================
   9. POP-UPS
   ============================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(15, 11, 9, .86);
}
.modal.is-open { display: grid; }

.modal__close {
  position: absolute;
  top: clamp(12px, 2.6vw, 26px);
  right: clamp(12px, 2.6vw, 26px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-2);
  background: rgba(15, 11, 9, .6);
  color: var(--cream);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.modal__close:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.modal__close svg { width: 18px; height: 18px; }
.modal__close--card {
  border-color: rgba(78, 65, 57, .2);
  background: transparent;
  color: var(--cocoa);
}
.modal__close--card:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(84svh, 760px);
  overflow-y: auto;
  padding: clamp(28px, 4vw, 52px);
  background: var(--cream);
  color: var(--cocoa);
  border-top: 3px solid var(--bronze);
  box-shadow: var(--lift-2);
}
.modal__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.05;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  padding-right: 56px;
}
.modal__body {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(78, 65, 57, .2);
  font-size: 14.5px;
}
.modal__body p + p { margin-top: 14px; }
.modal__body strong { color: var(--ink); font-weight: 700; }
.modal__body a { color: var(--cocoa); text-underline-offset: 3px; }

/* Galeria em tela cheia */
.modal--lightbox { padding: clamp(12px, 3vw, 34px); }
.lb__stage {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  width: min(1040px, 100%);
}
.lb__nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line-2);
  background: rgba(15, 11, 9, .55);
  color: var(--cream);
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.lb__nav:hover { background: var(--cream); color: var(--ink); }
.lb__nav svg { width: 18px; height: 18px; }
.lb__figure {
  justify-self: center;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}
.lb__figure img {
  width: auto;
  max-width: 100%;
  max-height: 74svh;
  object-fit: contain;
  background: var(--white);
}
.lb__cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream);
}
.lb__count { font-family: var(--display); font-size: 18px; letter-spacing: .08em; color: var(--bronze); }

@media (max-width: 700px) {
  .lb__stage { grid-template-columns: minmax(0, 1fr); }
  .lb__nav { position: absolute; bottom: -6px; z-index: 2; }
  .lb__nav--prev { left: 0; }
  .lb__nav--next { right: 0; }
  .lb__cap { justify-content: center; padding-inline: 58px; }
}

/* =============================================================
   10. PÁGINA DE OBRIGADO · mesma folha, mesmas peças
   ============================================================= */
html.thanks-root,
html.thanks-root body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.thanks-page {
  position: fixed;
  inset: 0;
  margin: 0;
}

.thanks {
  display: grid;
  grid-template-columns: 44% minmax(0, 1fr);
  align-items: stretch;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: var(--ink);
}
.thanks__figure { position: relative; min-height: 0; overflow: hidden; }
.thanks__figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.thanks__figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 17, 14, .4) 0%, rgba(23, 17, 14, 0) 42%, rgba(23, 17, 14, .5) 100%);
}
.thanks__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3vw, 42px) var(--edge) clamp(24px, 3vw, 42px) clamp(24px, 3vw, 44px);
  background: var(--cream);
  color: var(--cocoa);
}
.thanks__card { max-width: 520px; }
.thanks .mono { height: 30px; color: var(--bronze); }
.thanks__title {
  margin-top: 16px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 43px);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
}
.thanks__sub {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(78, 65, 57, .2);
  max-width: 46ch;
  font-size: 15.5px;
}
.thanks .btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  --btn-hover-bg: var(--cocoa);
  margin-top: 18px;
  justify-content: flex-start;
  gap: 14px;
}
.thanks .btn svg { width: 19px; height: 19px; flex: none; }
.thanks__back { margin-top: 12px; }
.thanks__back a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe);
  text-decoration: none;
  transition: color .25s ease;
}
.thanks__back a:hover { color: var(--cocoa); }
.thanks__back svg { width: 14px; height: 14px; }

@media (min-width: 941px) {
  html.thanks-root,
  html.thanks-root body,
  body.thanks-page,
  .thanks {
    height: 100vh;
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
  }
  .thanks__figure,
  .thanks__panel {
    height: 100%;
    min-height: 0;
  }
  .thanks__panel { padding-block: clamp(24px, 3vh, 36px); }
}

@media (max-width: 940px) {
  .thanks { grid-template-columns: minmax(0, 1fr); grid-template-rows: clamp(140px, 28svh, 240px) minmax(0, 1fr); height: 100%; min-height: 0; }
  .thanks__figure { width: 100%; height: 100%; aspect-ratio: auto; max-height: none; }
  .thanks__panel { min-height: 0; padding: clamp(18px, 4vw, 28px) var(--pad); }
  .thanks__card { max-width: none; }
}

@media (max-width: 940px) and (max-height: 640px) and (orientation: landscape) {
  .thanks {
    grid-template-columns: 38% minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .thanks__panel { padding: 16px clamp(20px, 4vw, 36px); }
  .thanks .mono { height: 24px; }
  .thanks__title { margin-top: 8px; font-size: 28px; }
  .thanks__sub { margin-top: 8px; padding-top: 8px; font-size: 13px; }
  .thanks .btn { min-height: 46px; margin-top: 10px; padding: 11px 16px; }
  .thanks__back { margin-top: 6px; }
}

/* =============================================================
   11. Ajustes finos por largura
   ============================================================= */
@media (max-width: 760px) {
  .foot__in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "links" "legal" "dev";
    justify-items: center;
    gap: 2px;
    text-align: center;
  }
  .foot__brand { justify-content: center; flex-wrap: wrap; }
  .foot__links, .foot__dev { justify-self: center; text-align: center; }
}

@media (max-width: 620px) {
  .btn { gap: 14px; min-height: 52px; padding: 14px 18px; font-size: 11px; letter-spacing: .12em; }
  .thanks .mono { height: 26px; }
  .thanks__title { margin-top: 10px; font-size: clamp(26px, 8vw, 34px); }
  .thanks__sub { margin-top: 8px; padding-top: 8px; font-size: 14px; }
  .thanks .btn { margin-top: 12px; }
  .thanks__back { margin-top: 8px; }
  .case__bar { padding: 10px 13px 12px; gap: 10px; }
  .foot__links { flex-wrap: wrap; justify-content: center; }
}
