/* Nicks Doces e Bolos
   Cores tiradas do logo (rosa e dourado) e dos próprios bolos (framboesa do glitter, glacê branco).
   Ideia central: a borda de bico de confeitar (foto do topo e topo da seção de pedido)
   e o topo de acrílico dourado que mostra o nome digitado. */

@font-face { font-family: "Young Serif"; src: url("../fonts/young-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("../fonts/great-vibes.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --rosa: #FBE6E8;       /* chantilly rosa, fundo */
  --glace: #FFFDFC;      /* glacê branco */
  --framboesa: #C92F6B;  /* ações */
  --framboesa-escura: #A3204F;
  --dourado: #B3862B;    /* topo de acrílico */
  --cacau: #3A1F27;      /* texto */
  --cacau-suave: #6B4A53;
  --linha: #EBC9CF;

  --serif: "Young Serif", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --script: "Great Vibes", cursive;

  --cor-bolo: #F6CAD4;   /* muda com a cor escolhida no pedido */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* o topo é fixo: ao pular pra uma seção, deixa espaço pra ele não cobrir o título */
section[id] { scroll-margin-top: 5.5rem; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--cacau); background: var(--rosa); }
img, svg { display: block; max-width: 100%; }
a { color: var(--framboesa-escura); text-underline-offset: .18em; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--framboesa); outline-offset: 3px; border-radius: 4px; }

.pular { position: absolute; left: 1rem; top: -4rem; background: var(--cacau); color: var(--glace); padding: .6rem 1rem; border-radius: 8px; z-index: 50; }
.pular:focus { top: 1rem; }

/* Topo */
.topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem clamp(1rem, 4vw, 2.5rem); background: rgba(251, 230, 232, .92); backdrop-filter: blur(8px); }
.marca { display: flex; align-items: center; gap: .65rem; color: var(--cacau); text-decoration: none; font-family: var(--serif); font-size: 1.05rem; }
.marca img { display: block; }
.topo-acao { color: var(--framboesa-escura); font-weight: 600; text-decoration: none; padding: .5rem .9rem; border: 1.5px solid currentColor; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
.topo-acao:hover { background: var(--framboesa); border-color: var(--framboesa); color: var(--glace); }
/* Menu */
.menu { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 1.75rem); }
.menu a:not(.topo-acao) { color: var(--cacau); text-decoration: none; font-weight: 500; padding: .35rem 0; background: linear-gradient(var(--framboesa), var(--framboesa)) left bottom / 0 2px no-repeat; transition: background-size .25s ease; }
.menu a:not(.topo-acao):hover { background-size: 100% 2px; }
.menu-botao { display: none; }
@media (max-width: 759px) {
  .menu-botao { display: inline-flex; align-items: center; gap: .55rem; font: 600 .95rem/1 var(--sans); color: var(--cacau); background: none; border: 1.5px solid var(--linha); border-radius: 999px; padding: .6rem .95rem; cursor: pointer; }
  .menu-icone, .menu-icone::before, .menu-icone::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
  .menu-icone { position: relative; }
  .menu-icone::before, .menu-icone::after { content: ""; position: absolute; left: 0; }
  .menu-icone::before { top: -5px; } .menu-icone::after { top: 5px; }
  .menu-botao[aria-expanded="true"] .menu-icone { background: transparent; }
  .menu-botao[aria-expanded="true"] .menu-icone::before { top: 0; transform: rotate(45deg); }
  .menu-botao[aria-expanded="true"] .menu-icone::after { top: 0; transform: rotate(-45deg); }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: .25rem clamp(1rem, 4vw, 2.5rem) 1.25rem; background: var(--glace); box-shadow: 0 22px 30px -22px rgba(58, 31, 39, .35); }
  .menu.aberto { display: flex; }
  .menu a:not(.topo-acao) { padding: .9rem .1rem; border-bottom: 1px solid var(--linha); background: none; }
  .menu .topo-acao { margin-top: 1rem; text-align: center; padding: .85rem; }
}

/* Botões */
.btn { display: inline-block; font: 600 1.05rem/1 var(--sans); color: var(--glace); background: var(--framboesa); padding: 1.05rem 1.6rem; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--framboesa-escura); }
.btn:hover { background: var(--framboesa-escura); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--framboesa-escura); }
.link { font-weight: 600; }

/* Hero */
.hero { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; max-width: 1180px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 6rem); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); max-width: 15ch; }
.hero-texto > p { margin-top: 1.25rem; font-size: 1.15rem; max-width: 40ch; color: var(--cacau-suave); }
.hero-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }

.hero-bolo { position: relative; margin: 0; width: min(100%, 520px); justify-self: center; aspect-ratio: 1; }
.chantilly { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--glace); filter: drop-shadow(0 18px 24px rgba(163, 32, 79, .18)); }
.hero-bolo img { position: absolute; inset: 11%; width: 78%; height: 78%; object-fit: cover; border-radius: 50%; }
/* Bolo recortado (sem fundo): inteiro e centralizado, com a borda de chantilly aparecendo em volta como moldura */
.hero-bolo img.bolo-recorte { inset: 17%; width: 66%; height: 66%; object-fit: contain; object-position: center; border-radius: 0; filter: drop-shadow(0 12px 14px rgba(58, 31, 39, .25)); }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.05fr 1fr; }
}
@media (max-width: 859px) {
  .hero-bolo { order: -1; width: min(62%, 280px); }
}

/* Animações: todas no GSAP (js/main.js). Obs.: elemento animado pelo GSAP não pode ter
   "transition: transform" no CSS, senão a animação trava no meio. */

/* Preloader */
.preloader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: radial-gradient(80% 60% at 50% 42%, var(--glace), var(--rosa) 70%); }
.preloader-palco { display: grid; justify-items: center; gap: 22px; }
.preloader-logo { width: 120px; height: 120px; filter: drop-shadow(0 12px 16px rgba(163, 32, 79, .25)); }
.preloader-barra { width: 140px; height: 6px; border-radius: 99px; background: rgba(201, 47, 107, .15); overflow: hidden; }
.preloader-barra span { display: block; height: 100%; background: var(--framboesa); transform-origin: left; transform: scaleX(0); }
.carregado .preloader { display: none; }

/* Vitrine */
.bolos { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(4rem, 8vw, 7rem); }
.bolos h2, .duvidas h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.bolos-intro { margin-top: .6rem; color: var(--cacau-suave); max-width: 50ch; }
.vitrine { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: clamp(.75rem, 2vw, 1.25rem); grid-template-columns: repeat(2, 1fr); }
.vitrine li { margin: 0; }
.vitrine-foto { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 18px; overflow: hidden; }
.vitrine-foto img { transition: filter .3s ease; }
.vitrine-foto:hover img { filter: brightness(1.05) saturate(1.08); }

/* Foto ampliada */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 640px); width: 100%; overflow: visible; }
.lightbox::backdrop { background: rgba(58, 31, 39, .78); }
.lightbox img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 22px; }
.lightbox p { color: var(--glace); text-align: center; margin-top: .9rem; font-family: var(--serif); font-size: 1.2rem; }
.lightbox-fechar { position: absolute; top: -.9rem; right: -.6rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--glace); color: var(--cacau); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.vitrine img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: var(--linha); }
.vitrine span { display: block; margin-top: .5rem; font-size: .95rem; color: var(--cacau-suave); }
@media (min-width: 860px) {
  .vitrine { grid-template-columns: repeat(4, 1fr); }
  .vitrine .destaque { grid-column: span 2; grid-row: span 2; }
  .vitrine .destaque span { font-size: 1.05rem; }
}
.vitrine .convite { grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 18px; background: var(--glace); }
.convite p { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.25; max-width: 30ch; }
@media (min-width: 860px) { .vitrine .convite { grid-column: span 3; } }
.bolos-mais { margin-top: 1.75rem; }

/* Sobre */
.sobre { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(5rem, 9vw, 8rem); display: grid; gap: 2.5rem clamp(2rem, 6vw, 5rem); }
@media (min-width: 900px) { .sobre { grid-template-columns: 1.25fr 1fr; align-items: center; } }
.sobre h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.sobre-historia p { margin-top: 1.1rem; max-width: 50ch; font-size: 1.1rem; line-height: 1.7; color: var(--cacau-suave); }
.sobre-historia h2 + p { color: var(--cacau); font-size: 1.2rem; }
.sobre-historia .assinatura { margin-top: 1.6rem; font-family: var(--script); font-size: clamp(3.4rem, 8vw, 4.8rem); line-height: 1.1; padding: 0 .3em .1em .05em; color: #C99A34; background: linear-gradient(180deg, #FBE9A8 0%, #E2B850 38%, #A97C22 52%, #E7C160 70%, #F6DE8E 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1.5px 0 #7A5816) drop-shadow(0 5px 6px rgba(58, 31, 39, .2)); }
.sobre-faco { background: var(--glace); border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.4rem); }
.sobre-faco h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; margin: 0 0 .5rem; }
.sobre-faco ul { list-style: none; margin: 0; padding: 0; }
.sobre-faco li { padding: 1rem 0; border-top: 1.5px solid var(--linha); }
.sobre-faco li:first-child { border-top: 0; }
.sobre-faco strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--framboesa-escura); }
.sobre-faco span { display: block; margin-top: .2rem; color: var(--cacau-suave); font-size: .98rem; }
.sobre-faco .btn { margin-top: 1.25rem; }

/* Pedido: seção branca com a borda de bico de confeitar no topo */
.pedido { position: relative; background: var(--glace); padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem); }
.pedido::before { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; background-image: radial-gradient(circle at 15px 16px, var(--glace) 14.5px, transparent 15.5px); background-size: 30px 16px; background-repeat: repeat-x; }
.pedido-interno { max-width: 1180px; margin: 0 auto; display: grid; gap: 2rem clamp(2rem, 6vw, 5rem); }
.pedido-cabeca h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 16ch; }
.pedido-cabeca p { margin-top: .9rem; color: var(--cacau-suave); max-width: 46ch; }

@media (min-width: 960px) {
  .pedido-interno { grid-template-columns: 1fr 1.1fr; grid-template-areas: "cabeca form" "previa form"; grid-template-rows: min-content 1fr; align-items: start; }
  .pedido-cabeca { grid-area: cabeca; }
  .previa { grid-area: previa; position: sticky; top: 6rem; }
  .form { grid-area: form; }
}

/* Prévia: bolo desenhado + topo de acrílico com o nome digitado */
.previa { max-width: 420px; width: 100%; justify-self: center; container-type: inline-size; display: flex; flex-direction: column; align-items: center; padding-top: 5cqw; }
.previa-bolo { width: 100%; height: auto; }
.tabua { fill: #EDE3DC; }
.previa-bolo { filter: drop-shadow(0 10px 14px rgba(58, 31, 39, .14)); }
.massa { fill: var(--cor-bolo); stroke: rgba(58, 31, 39, .16); stroke-width: 1.5; transition: fill .35s ease; }
.massa-topo { fill: var(--cor-bolo); filter: brightness(1.06); stroke: rgba(58, 31, 39, .16); stroke-width: 1.5; transition: fill .35s ease; }
.bico circle { fill: var(--glace); stroke: rgba(58, 31, 39, .18); stroke-width: 1.2; }

.topper { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 92cqw; margin-bottom: -14cqw; }
.topper::before, .topper::after { content: ""; position: absolute; top: 100%; width: 3px; height: 12cqw; background: linear-gradient(var(--dourado), #8A6519); border-radius: 2px; }
.topper::before { left: 40%; }
.topper::after { right: 40%; }
.topper-nome, .topper-idade {
  font-family: var(--script); line-height: 1; text-align: center; white-space: nowrap; padding: 0 .12em;
  /* acrílico dourado espelhado, como os topos que ela usa */
  color: #C99A34;
  background: linear-gradient(180deg, #FBE9A8 0%, #E2B850 38%, #A97C22 52%, #E7C160 70%, #F6DE8E 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1.5px 0 #7A5816) drop-shadow(0 6px 8px rgba(58, 31, 39, .28));
}
.topper-nome { font-size: 15cqw; position: relative; z-index: 1; }
.topper-nome.vazio { opacity: .45; }
.topper-idade { font-size: 11cqw; }
.topper-idade:empty { display: none; }

/* Formulário */
.form { display: grid; gap: 1.6rem; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .6rem; padding: 0; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
input[type="date"], input[type="text"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--cacau); background: var(--glace); border: 1.5px solid var(--linha); border-radius: 12px; padding: .8rem .9rem; min-height: 3rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--framboesa); outline-offset: 1px; }
textarea { resize: vertical; }
.linha { display: grid; grid-template-columns: 1fr 7rem; gap: .75rem; }
.ajuda { font-size: .9rem; color: var(--cacau-suave); margin-top: .4rem; }
.erro { font-size: .92rem; color: #A3204F; font-weight: 600; margin-top: .4rem; }
[aria-invalid="true"] { border-color: #A3204F !important; }

.cores { display: flex; flex-wrap: wrap; gap: .5rem; }
.cor { position: relative; display: inline-flex; align-items: center; gap: .45rem; margin: 0; padding: .45rem .8rem .45rem .45rem; border: 1.5px solid var(--linha); border-radius: 999px; font-weight: 500; cursor: pointer; }
.cor input, .opcao input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.amostra { width: 1.5rem; height: 1.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(58, 31, 39, .15); }
.amostra.rosa { background: #F6CAD4; } .amostra.pink { background: #E04F8C; } .amostra.branco { background: #FFFDFC; }
.amostra.azul { background: #B9D7F0; } .amostra.verde { background: #BFDDB8; } .amostra.chocolate { background: #8A5A44; }
.cor:has(input:checked) { border-color: var(--framboesa); background: var(--rosa); }
.cor:has(input:focus-visible), .opcao:has(input:focus-visible) span { outline: 3px solid var(--framboesa); outline-offset: 2px; }

.opcoes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
@media (min-width: 560px) { .opcoes { grid-template-columns: repeat(4, 1fr); } }
.opcoes.opcoes-3 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .opcoes.opcoes-3 { grid-template-columns: repeat(3, 1fr); } }
.opcao { margin: 0; cursor: pointer; position: relative; }
.opcao span { display: block; height: 100%; padding: .75rem .8rem; border: 1.5px solid var(--linha); border-radius: 14px; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.opcao small { display: block; font-family: var(--sans); font-size: .82rem; color: var(--cacau-suave); margin-top: .15rem; }
.opcao input:checked + span { border-color: var(--framboesa); background: var(--rosa); }

.btn-enviar { width: 100%; padding: 1.2rem; font-size: 1.1rem; }
.privacidade { text-align: center; }

/* Dúvidas */
.duvidas { max-width: 760px; margin: 0 auto; padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem); }
.duvidas h2 { margin-bottom: 1.5rem; }
details { border-top: 1.5px solid var(--linha); }
details:last-of-type { border-bottom: 1.5px solid var(--linha); }
summary { list-style: none; cursor: pointer; padding: 1.1rem 2.2rem 1.1rem 0; position: relative; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-family: var(--serif); font-size: 1.6rem; color: var(--framboesa); transition: transform .2s ease; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 0 1.2rem; color: var(--cacau-suave); max-width: 60ch; }

/* Rodapé */
.rodape { text-align: center; padding: 3rem 1rem 6.5rem; background: var(--glace); }
.rodape img { margin: 0 auto .75rem; }
.rodape-nome { font-family: var(--serif); font-size: 1.3rem; }
.rodape p + p { margin-top: .35rem; }
.credito { font-size: .85rem; color: var(--cacau-suave); margin-top: 1.25rem !important; }

/* WhatsApp flutuante */
.whats { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #25D366; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.whats svg { width: 1.9rem; height: 1.9rem; fill: #fff; }

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