:root {
  color-scheme: light;

  /* Cores */
  --peach:      #F5AE92; /* fundo do topo e do CTA do rodapé */
  --peach-300:  #F8C4AD; /* luz no gradiente do topo */
  --peach-100:  #FDE6DA; /* bloco atrás da foto, tons suaves */
  --cream:      #FFF8F2; /* fundo da página */
  --white:      #FFFFFF; /* cards */
  --ink:        #2B1F22; /* texto, contornos, sombras sólidas, rodapé escuro */
  --ink-soft:   #6B5A5E; /* texto secundário: SÓ sobre cream/white/sky, nunca sobre peach */
  --sky:        #CFE6EA; /* faixa da vitrine */
  --rosa:       #F7C6C7; /* número 01, contas, placeholders */
  --lilas:      #DCCFF5; /* número 02, contas, névoa do topo */
  --azul:       #BFE0E6; /* número 03, contas, placeholders */
  --focus:      var(--ink); /* trocado para --cream no rodapé escuro */

  /* Tipografia */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", sans-serif;

  --fs-sm:      0.875rem;                                   /* 14px: eyebrow, botão do card, legal */
  --fs-base:    1rem;                                       /* 16px: corpo, botões */
  --fs-md:      1.25rem;                                    /* 20px: lead, h3 */
  --fs-lg:      1.75rem;                                    /* 28px: nome no rodapé */
  --fs-xl:      clamp(2rem, 1.4rem + 2.6vw, 3rem);          /* 32 → 48px: h2 */
  --fs-display: clamp(2.75rem, 1.6rem + 5.5vw, 5.5rem);     /* 44 → 88px: h1 */
  --fs-numero:  clamp(6rem, 4rem + 9vw, 11rem);             /* 96 → 176px: 01/02/03 */

  --lh-tight: 1.05;  /* display, números */
  --lh-head:  1.15;  /* h2, h3 */
  --lh-body:  1.6;   /* textos */

  /* Espaçamento (só estes valores) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Forma */
  --borda:      2px solid var(--ink);
  --raio-pilula: 999px;
  --raio-card:  20px;
  --raio-img:   12px;
  --raio-faixa: 32px;
  --sombra:     4px 4px 0 var(--ink);
  --sombra-hover: 6px 6px 0 var(--ink);

  /* Movimento */
  --ease-out:    cubic-bezier(.2, .7, .2, 1);
  --ease-quique: cubic-bezier(.34, 1.56, .64, 1);

  --container: 1120px;
}

/* ---------- Reset mínimo e base ---------- */
*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 var(--fs-base)/var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* festão não gera rolagem horizontal */
}

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: var(--fs-display); font-weight: 800; line-height: var(--lh-tight); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-xl); font-weight: 800; line-height: var(--lh-head); }
h3 { font-weight: 600; line-height: var(--lh-head); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

section {
  padding-block: var(--s-8);
  scroll-margin-top: var(--s-5);
}

.container {
  --pad: var(--s-4);
  width: min(100% - 2 * var(--pad), var(--container));
  margin-inline: auto;
}

.secao__cabecalho {
  max-width: 36rem;
  margin: 0 auto var(--s-7);
  text-align: center;
}
.secao__cabecalho .secao__sub { margin-top: var(--s-3); color: var(--ink-soft); }

@media (min-width: 768px) {
  .container { --pad: var(--s-5); }
}
@media (min-width: 1024px) {
  .container { --pad: var(--s-6); }
  section { padding-block: var(--s-9); }
}

/* ---------- Utilitários ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
  font: 600 var(--fs-sm)/var(--lh-body) var(--font-body);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.secao__cabecalho .eyebrow::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border: var(--borda);
  border-radius: 50%;
  background: var(--conta);
}

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 3px; }
.link:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: var(--s-3) var(--s-5);
  border: var(--borda);
  border-radius: var(--raio-pilula);
  font: 600 var(--fs-base)/1 var(--font-body);
  text-decoration: none;
  color: var(--ink);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.btn svg, .link svg { flex: none; width: 20px; height: 20px; }

.btn--principal { background: var(--cream); box-shadow: var(--sombra); }
.btn--principal:hover, .btn--principal:focus-visible { transform: translate(-2px, -2px); box-shadow: var(--sombra-hover); }
.btn--principal:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

.btn--ghost, .btn--mini { background: transparent; }
.btn--ghost:hover, .btn--ghost:focus-visible,
.btn--mini:hover, .btn--mini:focus-visible { background: var(--ink); color: var(--cream); }
.btn--ghost:active, .btn--mini:active { transform: translateY(1px); }

.btn--mini {
  width: 100%;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-sm);
}

.btn[aria-disabled="true"],
.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:active {
  opacity: .55;
  box-shadow: none;
  cursor: not-allowed;
  background: transparent;
  color: var(--ink);
  transform: none;
}

.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 10;
  background: var(--cream);
  box-shadow: var(--sombra);
}
.skip-link:not(:focus) { translate: 0 -200%; }

/* ---------- Topo ---------- */
.topo,
.rodape__cta,
.embreve {
  --contas: radial-gradient(circle at 1px 1px, rgb(43 31 34 / .10) 1.2px, transparent 1.6px) 0 0 / 22px 22px; /* grade de "contas" */
}
.topo {
  position: relative;
  z-index: 1; /* mantém o festão acima da seção seguinte */
  background:
    var(--contas),
    radial-gradient(60% 70% at 85% 15%, rgb(220 207 245 / .55), transparent 70%), /* névoa lilás atrás do varal */
    radial-gradient(50% 60% at 10% 0%, var(--peach-300), transparent 70%),        /* luz no canto */
    var(--peach);
}
/* Borda em festão: semicírculos pêssego "pendurados" sobre a próxima seção */
.topo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: radial-gradient(circle at 12px 0, var(--peach) 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  pointer-events: none;
}

.topo__barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--s-4);
}
.topo__barra .eyebrow { margin: 0; }
.topo__links { display: flex; align-items: center; gap: var(--s-5); }
.topo__item { display: none; }
.topo__link { display: inline-flex; align-items: center; min-height: 44px; font: 600 var(--fs-sm)/var(--lh-body) var(--font-body); text-decoration-color: transparent; }
.topo__link:hover, .topo__link:focus-visible { text-decoration-color: currentColor; }
.topo__ig {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: var(--borda);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.topo__ig:hover, .topo__ig:focus-visible { background: var(--ink); color: var(--cream); }
.topo__ig:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.topo__ig:active { transform: translateY(1px); }

.topo__hero { padding-block: var(--s-6) var(--s-7); }
.topo__texto { max-width: 34rem; }
.topo__texto .eyebrow { margin-bottom: var(--s-4); }
.lead { max-width: 28ch; margin-block: var(--s-4) var(--s-6); font-size: var(--fs-md); }
.botoes { display: flex; flex-direction: column; gap: var(--s-3); }

.varal { display: block; width: 220px; margin: var(--s-6) auto 0; overflow: visible; }
.fio {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation:
    cair 900ms var(--ease-quique) var(--d) both,
    balancar var(--dur) ease-in-out calc(var(--d) + 900ms) infinite;
}

@media (min-width: 768px) {
  .topo__item { display: block; }
  .botoes { flex-direction: row; flex-wrap: wrap; }
  .topo__hero {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: var(--s-6);
    align-items: center;
  }
  .varal { width: 100%; margin: 0; }
}
@media (min-width: 1024px) {
  .topo__hero {
    grid-template-columns: 1.15fr .85fr;
    min-height: min(80vh, 680px);
    padding-top: 0;
    padding-bottom: var(--s-8);
  }
  .varal { align-self: start; max-width: 400px; }
}

/* ---------- Vitrine ---------- */
.vitrine {
  --conta: var(--azul);
  position: relative;
  isolation: isolate;
  background: var(--sky);
}
.vitrine::before { /* fio pontilhado decorativo */
  content: "";
  position: absolute;
  top: var(--s-5); left: 0; right: 0;
  height: var(--s-5);
  z-index: -1;
  background-image: radial-gradient(circle, rgb(43 31 34 / .08) 1.5px, transparent 2px);
  background-size: 16px 16px;
}

.vitrine__grade {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.vitrine__vazia { display: none; text-align: center; font-size: var(--fs-md); }
.vitrine__grade:not(:has(li)) + .vitrine__vazia { display: block; }
.vitrine__perso { margin-top: var(--s-6); text-align: center; }

.charm {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  height: 100%;
  padding: var(--s-3);
  background: var(--white);
  border: var(--borda);
  border-radius: var(--raio-card);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.charm__foto {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--raio-img);
  overflow: hidden;
  background: var(--rosa);
}
li:nth-child(4n+2) .charm__foto { background: var(--lilas); }
li:nth-child(4n+3) .charm__foto { background: var(--azul); }
li:nth-child(4n+4) .charm__foto { background: var(--peach-100); }
.charm__foto img {
  font: 600 var(--fs-sm)/1.3 var(--font-body); /* aparência do alt se a imagem quebrar */
  color: var(--ink);
  text-align: center;
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale 300ms var(--ease-out);
}
.charm__nome { font-size: var(--fs-base); }
.charm .btn--mini { margin-top: auto; } /* o gap do card já dá o espaço de --s-2 */

.charm:not(.is-esgotado):hover,
.charm:not(.is-esgotado):focus-within {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: var(--sombra-hover);
}
li:nth-child(even) > .charm:not(.is-esgotado):hover,
li:nth-child(even) > .charm:not(.is-esgotado):focus-within { transform: translateY(-4px) rotate(1deg); }
.charm:not(.is-esgotado):hover img,
.charm:not(.is-esgotado):focus-within img { scale: 1.04; }

.is-esgotado .charm__foto img { filter: grayscale(.7); opacity: .7; }
.charm__selo {
  position: absolute;
  top: var(--s-2); left: var(--s-2);
  z-index: 1;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--raio-pilula);
  background: var(--ink);
  color: var(--cream);
  font: 600 var(--fs-sm)/var(--lh-body) var(--font-body);
}

@media (min-width: 768px) {
  .vitrine { margin-inline: var(--s-5); border-radius: var(--raio-faixa); }
  .vitrine__grade { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
  .charm { padding: var(--s-4); }
  .charm__nome { font-size: var(--fs-md); }
}
@media (min-width: 1024px) {
  .vitrine { margin-inline: var(--s-6); }
  .vitrine__grade { gap: var(--s-6); }
}

/* ---------- Como comprar ---------- */
.como { --conta: var(--lilas); }
.passos { display: grid; gap: var(--s-6); }
.passo {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: calc(var(--fs-numero) * .9);
}
.passo__numero {
  grid-area: 1 / 1;
  font: 800 var(--fs-numero)/var(--lh-tight) var(--font-display);
  letter-spacing: -0.04em;
  user-select: none;
}
.passo--1 .passo__numero { color: var(--rosa); }
.passo--2 .passo__numero { color: var(--lilas); }
.passo--3 .passo__numero { color: var(--azul); }
.passo__texto {
  grid-area: 1 / 1 / 2 / 3;
  position: relative;
  max-width: 22rem;
  padding-left: calc(var(--fs-numero) * .45);
}
.passo__texto h3 { margin-bottom: var(--s-2); font-size: var(--fs-md); }
.passo__texto p { color: var(--ink); }
.como__cta { margin-top: var(--s-7); text-align: center; }

@media (min-width: 768px) and (max-width: 1023px) {
  .passos { gap: var(--s-5); }
  .passo--2 { margin-left: 20%; }
  .passo--3 { margin-left: 40%; }
}
@media (min-width: 1024px) {
  .passos { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
}

/* ---------- Rodapé ---------- */
.rodape { text-align: center; }
.rodape__cta,
.rodape__info { padding: var(--s-8) var(--s-4); }
.rodape__cta { background: var(--contas), var(--peach); }
.rodape__cta p { margin-block: var(--s-3) var(--s-5); font-size: var(--fs-md); }

.rodape__info { --focus: var(--cream); background: var(--ink); color: var(--cream); }
.rodape__nome { font: 800 var(--fs-lg)/var(--lh-head) var(--font-display); }
.rodape__desc { color: var(--peach); }
.rodape__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-5); margin-block: var(--s-4); }
.rodape__links .link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; }
.rodape__legal { font-size: var(--fs-sm); color: var(--peach-100); }

@media (min-width: 768px) {
  .rodape { display: grid; grid-template-columns: 1fr 1fr; text-align: left; }
  .rodape__cta, .rodape__info { padding: var(--s-8) var(--s-6); }
  .rodape__links { justify-content: flex-start; }
}

/* ---------- Pre-lander (pre-lander/index.html) ---------- */
/* Topo: usa .topo, .topo__hero, .topo__texto e .varal da landing, com 3 ajustes */
.embreve .lead { margin-bottom: 0; } /* não há botões abaixo do lead */

/* Post: coluna de leitura */
.embreve__post {
  max-width: 65ch;
  padding-block: var(--s-8);
  text-wrap: pretty;
}
.embreve__post > * + * { margin-top: var(--s-4); }
.embreve__post > :is(.embreve__contas, .embreve__fotos, .embreve__destaque) { margin-block: var(--s-7); }

.embreve__contas { /* três contas num fio */
  width: 64px;
  height: 16px;
  margin-inline: auto;
  border: 0;
  background:
    radial-gradient(circle, var(--rosa) 5px, var(--ink) 5px, var(--ink) 7px, transparent 7.5px) 0 50% / 16px 16px no-repeat,
    radial-gradient(circle, var(--lilas) 5px, var(--ink) 5px, var(--ink) 7px, transparent 7.5px) 50% 50% / 16px 16px no-repeat,
    radial-gradient(circle, var(--azul) 5px, var(--ink) 5px, var(--ink) 7px, transparent 7.5px) 100% 50% / 16px 16px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 50% 50% / calc(100% - 16px) 2px no-repeat; /* o fio, escondido atrás das contas nas pontas */
}

.embreve__fotos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  max-width: 30rem;
  margin-inline: auto;
}
.embreve__foto { /* polaroide colada torta */
  margin: 0;
  padding: var(--s-2) var(--s-2) var(--s-3);
  background: var(--white);
  border: var(--borda);
  border-radius: var(--raio-img);
  box-shadow: var(--sombra);
  rotate: -2deg;
}
.embreve__fotos li:nth-child(2) .embreve__foto { rotate: 2deg; margin-top: var(--s-5); }
.embreve__foto img {
  width: 100%;
  aspect-ratio: 3 / 4; /* fotos em pé */
  object-fit: cover;
  background: var(--rosa); /* aparece enquanto carrega */
  font: 600 var(--fs-sm)/1.3 var(--font-body); /* aparência do alt se a imagem quebrar, igual à vitrine */
  color: var(--ink);
  text-align: center;
}
.embreve__fotos li:nth-child(2) img { background: var(--azul); }
.embreve__foto figcaption {
  margin-top: var(--s-2);
  font: 600 var(--fs-sm)/var(--lh-head) var(--font-body);
  text-align: center;
}

.embreve__destaque { /* bilhete com a crença */
  padding: var(--s-4);
  background: var(--peach-100);
  border: var(--borda);
  border-radius: var(--raio-card);
  box-shadow: var(--sombra);
  font: 600 var(--fs-md)/var(--lh-head) var(--font-display);
  text-wrap: balance;
  rotate: -1deg;
}
.embreve__assinatura { font: 600 var(--fs-md)/var(--lh-head) var(--font-display); }

/* Fim: bloco "em breve" */
.embreve__fim {
  position: relative;
  text-align: center;
  background:
    var(--contas), /* herdada de body.embreve */
    radial-gradient(60% 70% at 50% 0%, rgb(220 207 245 / .55), transparent 70%), /* névoa lilás no alto */
    var(--peach);
}
.embreve__fim::before { /* festão cream pendurado sobre o pêssego */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: radial-gradient(circle at 12px 0, var(--cream) 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  pointer-events: none;
}
.embreve__nome {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.embreve__selo { /* etiqueta "em breve" colada torta abaixo do nome */
  display: block;
  width: fit-content;
  margin: var(--s-3) auto 0;
  padding: var(--s-2) var(--s-4);
  border: var(--borda);
  border-radius: var(--raio-pilula);
  background: var(--cream);
  box-shadow: var(--sombra);
  font: 600 var(--fs-md)/1 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  rotate: -4deg;
}
.embreve__nota {
  max-width: 28ch;
  margin: var(--s-5) auto 0;
  font: 600 var(--fs-md)/var(--lh-head) var(--font-display);
}

.embreve__rodape { /* tira escura do fim */
  position: relative;
  padding: var(--s-6) var(--s-4) var(--s-5);
  background: var(--ink);
  color: var(--peach-100);
  font-size: var(--fs-sm);
  text-align: center;
}
.embreve__rodape::before { /* festão pêssego pendurado sobre a tira escura */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: radial-gradient(circle at 12px 0, var(--peach) 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  pointer-events: none;
}

@media (max-width: 767px) {
  .embreve .varal { width: 160px; } /* só no mobile: a partir de 768 vale o .varal da landing */
}
@media (min-width: 768px) {
  .embreve__post { font-size: var(--fs-md); }
  .embreve__post > * + * { margin-top: var(--s-5); }
  .embreve__fotos { gap: var(--s-5); }
  .embreve__destaque { padding: var(--s-5) var(--s-6); font-size: var(--fs-lg); }
  .embreve__assinatura { font-size: var(--fs-lg); }
  .embreve__selo { font-size: var(--fs-lg); }
}
@media (min-width: 1024px) {
  .embreve .topo__hero { min-height: 0; padding-top: var(--s-8); } /* sem a barra da landing, o topo fica do tamanho do conteúdo */
  .embreve__post { padding-block: var(--s-9); }
}

/* ---------- Animações ---------- */
@keyframes subir   { from { opacity: 0; translate: 0 16px; } }
@keyframes carimbar { from { opacity: 0; scale: 1.6; } }
@keyframes cair    { from { translate: 0 -280px; } }
@keyframes balancar {
  0%, 100% { rotate: 0deg; }
  25%      { rotate: 3deg; }
  75%      { rotate: -3deg; }
}

.topo__texto .eyebrow { animation: subir 600ms var(--ease-out) 100ms both; }
.topo__texto h1       { animation: subir 600ms var(--ease-out) 200ms both; }
.topo__texto .lead    { animation: subir 600ms var(--ease-out) 300ms both; }
.topo__texto .botoes  { animation: subir 600ms var(--ease-out) 400ms both; }

/* Selo carimbado quando entra na tela. Sem suporte, ele fica parado no lugar */
@supports (animation-timeline: view()) {
  .embreve__selo {
    animation: carimbar 1ms var(--ease-quique) both; /* 1ms: o Firefox exige uma duração; quem manda é a rolagem */
    animation-timeline: view();
    animation-range: entry 25% entry 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  /* hovers mudam só cor e sombra */
  .btn:hover, .btn:focus-visible, .btn:active,
  .charm:hover, .charm:focus-within,
  .charm:hover img, .charm:focus-within img,
  li:nth-child(even) > .charm:hover, li:nth-child(even) > .charm:focus-within {
    transform: none !important;
    rotate: none !important;
    scale: none !important;
  }
}
