/* ==========================================================================
   Página "link na bio" — Chef Rita Lonato
   Direção: "Caderno de Receitas". Cores e medidas vêm de tokens.css.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--text-base);
  line-height: var(--leading);
  font-kerning: normal;
  font-variant-numeric: lining-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Aquarela nos cantos: uma imagem só, espelhada no canto oposto */
body::before,
body::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(26rem, 85vw);
  aspect-ratio: 1;
  background: url("../assets/img/aquarela-canto.webp") no-repeat top left / contain;
  pointer-events: none;
}
body::before {
  top: 0;
  left: 0;
}
body::after {
  /* canto inferior direito, perto do rodapé */
  bottom: 0;
  right: 0;
  transform: scale(-1, -1);
  opacity: 0.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -4rem;
  z-index: 10;
  padding: var(--s-2) var(--s-4);
  background: var(--paper-card);
  border: 1px solid var(--gold);
}
.skip-link:focus {
  top: var(--s-4);
}

/* ---------- Coluna ---------- */

.page {
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin-inline: auto;
  padding: var(--s-5) var(--gutter) var(--s-7);
}

.section {
  margin-top: var(--s-7);
}

.section-title {
  margin: 0 0 var(--s-4);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  color: var(--gold-text);
  text-align: center;
  text-wrap: balance;
}

.lede {
  margin: 0 auto;
  max-width: 24rem;
  font-size: var(--text-sm);
  line-height: 1.4;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: pretty;
}

/* Divisor com ramo, como no rodapé das páginas do e-book */
.sprig {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-7) auto 0;
  max-width: 16rem;
  color: var(--gold);
}
.sprig::before,
.sprig::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-line);
}
.sprig svg {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

/* ---------- 1. Topo ---------- */

.profile {
  text-align: center;
}

.portrait {
  position: relative;
  width: 7rem;
  height: 7rem;
  margin: 0 auto var(--s-3);
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 210deg, var(--gold), var(--gold-light), var(--gold), #8e5e1a, var(--gold));
}
.portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle at 40% 30%, #fbeee6 0%, var(--rose) 100%);
  border: 3px solid var(--paper);
}

.profile-name {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.05;
  color: var(--gold-text);
  letter-spacing: 0.005em;
}

.profile-role {
  margin: var(--s-1) 0 var(--s-3);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ---------- 2. E-book em destaque ---------- */

.book-card {
  position: relative;
  margin-top: var(--s-5);
  padding: var(--s-5) var(--s-4) var(--s-5);
  background: var(--paper-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-card);
  /* segunda linha da moldura, como nas páginas do e-book */
  box-shadow: 0 0 0 5px var(--paper-card), 0 0 0 6px var(--gold-line), 0 18px 40px -24px rgba(74, 51, 38, 0.45);
  text-align: center;
}

/* cantos florais da moldura */
.book-card .corner {
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--gold);
}
.book-card .corner--tl { top: -4px; left: -4px; }
.book-card .corner--tr { top: -4px; right: -4px; transform: scaleX(-1); }
.book-card .corner--bl { bottom: -4px; left: -4px; transform: scaleY(-1); }
.book-card .corner--br { bottom: -4px; right: -4px; transform: scale(-1, -1); }

/* capa à esquerda, título à direita */
.book-head {
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: var(--s-4);
  align-items: center;
  text-align: left;
}

/* cartela "E-book digital" */
.cartouche {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0 0 var(--s-3);
  padding: 0.1rem var(--s-2);
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--gold-text);
}
.cartouche::before,
.cartouche::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* Capa em mockup: lombada, folhas e sombra quente */
.book {
  position: relative;
  margin-right: 6px; /* espaço para as folhas */
}
.book::after {
  /* folhas do miolo aparecendo à direita */
  content: "";
  position: absolute;
  inset: 4px -5px 4px auto;
  width: 8px;
  z-index: -1;
  border-radius: 0 2px 2px 0;
  background: repeating-linear-gradient(90deg, #f3e9dc 0 1px, #e5d6c2 1px 2px);
  box-shadow: var(--shadow-book);
}
.book img {
  position: relative;
  width: 100%;
  border-radius: 2px 4px 4px 2px;
  box-shadow: var(--shadow-book);
}
.book::before {
  /* brilho da lombada */
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 9%;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(90deg, rgba(74, 51, 38, 0.25), rgba(255, 255, 255, 0.35) 45%, rgba(74, 51, 38, 0.08));
  pointer-events: none;
}

.book-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-display);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold);
  /* dourado metálico, como na capa; cor sólida por baixo garante leitura */
  background: linear-gradient(175deg, #b8853f 10%, #8e5e1a 55%, #a8763e 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.book-subtitle {
  margin: var(--s-2) 0 0;
  font-style: italic;
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--ink-soft);
  text-wrap: balance;
}

.benefits {
  margin: var(--s-4) auto 0;
  padding: 0;
  max-width: 21rem;
  list-style: none;
  text-align: left;
}
.benefits li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.75rem;
  font-size: var(--text-sm);
  border-top: 1px solid rgba(168, 118, 62, 0.22);
  line-height: 1.35;
}
.benefits li:first-child {
  border-top: 0;
}
.benefits li::before {
  /* folhinha dourada */
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.8rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--gold);
  border-radius: 0 100% 0 100%;
}

.price {
  margin: var(--s-3) 0 var(--s-3);
  line-height: 1.1;
}
.price-old {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}
.price-old s {
  text-decoration-thickness: 1px;
}
.price-now {
  display: block;
  font-weight: 600;
  font-size: 2.5rem;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}
.price-note {
  display: block;
  margin-top: var(--s-1);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

/* ---------- Botões ----------
   O botão de compra leva a classe "hotmart-fb" (o widget depende dela).
   A classe "hotmart__button-checkout" foi retirada: no CSS da Hotmart ela
   só pinta o botão verde (com !important) e o widget não a usa.
   Mesmo assim os seletores abaixo usam a.btn-buy.hotmart-fb para ganhar
   de qualquer regra futura da Hotmart sobre .hotmart-fb. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-md);
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}

a.btn-buy.hotmart-fb,
.btn-primary {
  width: 100%;
  min-height: 3.5rem;
  border: 1px solid #6b431a;
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  color: var(--btn-text);
  box-shadow: var(--shadow-btn);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  text-shadow: none;
}
a.btn-buy.hotmart-fb:hover,
.btn-primary:hover {
  background: linear-gradient(180deg, #7f5122, #6b431a);
}
a.btn-buy.hotmart-fb:active,
.btn-primary:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 2px 6px -3px rgba(122, 79, 31, 0.6);
}
a.btn-buy.hotmart-fb:focus-visible,
.btn-primary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.secure {
  margin: var(--s-3) 0 0;
  text-wrap: balance;
  font-size: var(--text-xs);
  color: var(--ink-muted);
}
.secure svg {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.3rem;
  vertical-align: -0.1em;
  color: var(--gold-text);
}

/* Outros e-books (aparecem quando houver mais de um produto) */
.more-books {
  display: grid;
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.mini-book {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-4);
  background: var(--paper-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-card);
}
.mini-book img {
  border-radius: 2px;
  box-shadow: var(--shadow-book);
}
.mini-book h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.2;
  color: var(--gold-text);
}
.mini-book p {
  margin: var(--s-1) 0 var(--s-2);
  font-style: italic;
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--ink-soft);
}
.mini-book .price-now {
  font-size: 1.5rem;
}
.mini-book a.btn-buy.hotmart-fb {
  margin-top: var(--s-2);
  min-height: var(--tap);
  font-size: var(--text-md);
}

/* ---------- 3. Prévia (carrossel) ---------- */

.carousel {
  position: relative;
}
.carousel-track {
  position: relative; /* referência para a posição das páginas */
  display: flex;
  gap: var(--s-4);
  margin: 0 calc(var(--gutter) * -1);
  padding: var(--s-2) var(--gutter) var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
/* reserva a altura das páginas antes de elas serem montadas (evita pulo) */
.carousel-track:empty {
  min-height: calc(min(100vw - 2 * var(--gutter), var(--column)) * 0.78 * 1.415 + 3.3rem);
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.slide {
  flex: 0 0 78%;
  scroll-snap-align: center;
  margin: 0;
}
.slide button {
  position: relative; /* prende o texto escondido dentro do carrossel */
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-card);
}
.slide img {
  width: 100%;
  aspect-ratio: 595 / 842;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-book);
  background: var(--paper-deep);
}
.slide figcaption {
  margin-top: var(--s-3);
  font-style: italic;
  font-size: var(--text-sm);
  text-align: center;
  color: var(--ink-soft);
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-1);
}
.carousel-nav .arrow {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: var(--paper-card);
  color: var(--gold-text);
  cursor: pointer;
}
.carousel-nav .arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.carousel-nav .arrow svg {
  width: 1.1rem;
  height: 1.1rem;
}
.carousel-count {
  min-width: 4.5rem;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  font-variant-numeric: lining-nums tabular-nums;
}
.carousel-hint {
  margin: var(--s-2) 0 0;
  font-size: var(--text-xs);
  font-style: italic;
  text-align: center;
  color: var(--ink-muted);
}

/* Página ampliada */
.zoom {
  width: min(100vw - 1rem, 40rem);
  max-height: calc(100dvh - 1rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--paper);
  overflow: auto;
}
.zoom::backdrop {
  background: rgba(46, 31, 22, 0.78);
}
.zoom img {
  width: 100%;
}
.zoom-close {
  position: sticky;
  top: 0.5rem;
  float: right;
  margin: 0.5rem 0.5rem -3.25rem 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: var(--paper-card);
  color: var(--ink);
  cursor: pointer;
}
.zoom-close svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---------- 4. Receita grátis ---------- */

.gift {
  position: relative;
  padding: var(--s-6) var(--s-5);
  background: var(--rose-wash);
  border-radius: var(--radius-card);
  border: 1px solid rgba(201, 138, 144, 0.45);
}
.gift-head {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: var(--s-4);
  align-items: center;
  margin-bottom: var(--s-5);
}
.gift-head img {
  width: 5rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--paper-card);
  box-shadow: 0 0 0 1px var(--gold-line);
}
.gift .section-title {
  margin: 0;
  text-align: left;
  font-size: 1.625rem;
}
.gift-intro {
  margin: 0 0 var(--s-5);
  color: var(--ink);
}

.field {
  margin-bottom: var(--s-4);
}
.field label {
  display: block;
  margin-bottom: var(--s-1);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink);
}
.field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid #b89a7c;
  border-radius: 6px;
  background: var(--paper-card);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem; /* >= 16px evita zoom automático no iPhone */
  font-variant-numeric: lining-nums;
}
.field input::placeholder {
  color: #9a7f68;
}
.field input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
.field input[aria-invalid="true"] {
  border-color: var(--error);
  border-width: 2px;
}
.field-error {
  margin: var(--s-1) 0 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--error);
}
.field-error:empty {
  display: none;
}

/* campo armadilha para robôs: fora da tela, nunca visível */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  margin: var(--s-3) 0 0;
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--ink-soft);
}
.consent a {
  color: var(--gold-text);
  font-weight: 600;
  text-underline-offset: 2px;
}

.form-status {
  margin: var(--s-3) 0 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--error);
}
.form-status:empty {
  display: none;
}

.btn-primary[aria-busy="true"] {
  opacity: 0.75;
  cursor: progress;
}

.gift-done {
  text-align: center;
}
.gift-done h3 {
  margin: 0 0 var(--s-2);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  color: var(--gold-text);
}
.gift-done p {
  margin: 0 0 var(--s-5);
}
.gift-done:focus {
  outline: none;
}

/* ---------- 5. Links secundários ---------- */

.links {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.btn-ghost {
  width: 100%;
  border: 1px solid var(--gold-line);
  background: transparent;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 600;
}
.btn-ghost svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gold-text);
}
.btn-ghost:hover {
  background: rgba(255, 250, 243, 0.8);
}
.btn-ghost:active {
  transform: scale(0.99);
}

/* ---------- 6. Rodapé ---------- */

.site-footer {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--gold-line);
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--ink-muted);
  text-align: center;
}
.site-footer img {
  width: 4rem;
  margin: 0 auto var(--s-4);
  border-radius: 50%;
}
.site-footer p {
  margin: 0 0 var(--s-3);
}
.site-footer a {
  display: inline-block;
  padding-block: 0.6rem; /* alvo de toque */
  color: var(--ink-soft);
  font-weight: 600;
  text-underline-offset: 2px;
}
.notice {
  max-width: 26rem;
  margin-inline: auto;
  font-style: italic;
}

/* ---------- Página de privacidade ---------- */

.doc {
  font-size: var(--text-base);
}
.doc h1 {
  margin: var(--s-5) 0 var(--s-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--gold-text);
  text-align: center;
}
.doc .updated {
  margin: 0 0 var(--s-6);
  text-align: center;
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.doc h2 {
  margin: var(--s-6) 0 var(--s-2);
  font-weight: 600;
  font-size: var(--text-md);
  line-height: 1.2;
  color: var(--gold-text);
}
.doc p,
.doc li {
  max-width: 34em;
}
.doc ul {
  padding-left: 1.25rem;
}
.doc li {
  margin-bottom: var(--s-1);
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 600;
  color: var(--gold-text);
}

/* ---------- Movimento ----------
   Um único momento: a capa do e-book entra suavemente ao abrir a página.
   O resto só reage ao toque. */

@media (prefers-reduced-motion: no-preference) {
  .book img {
    animation: book-in 0.9s var(--ease) 0.1s both;
  }
  .book::after {
    animation: pages-in 0.9s var(--ease) 0.35s both;
  }
  .carousel-track {
    scroll-behavior: smooth;
  }
}
@keyframes book-in {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(-2deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pages-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Telas maiores ---------- */

@media (min-width: 40rem) {
  :root {
    --gutter: 1.5rem;
  }
  .page {
    padding-top: var(--s-8);
  }
  .slide {
    flex-basis: 62%;
  }
  .carousel-track:empty {
    min-height: calc(var(--column) * 0.62 * 1.415 + 3.3rem);
  }
  .book-card {
    padding-inline: var(--s-6);
  }
}
@media (min-width: 64rem) {
  body::before,
  body::after {
    width: 34rem;
  }
}
