:root {
  --bg: #0c1120;
  --bg-alt: #10182b;
  --card-bg: #141d33;
  --accent: #cda183;
  --accent-light: #e6c9b3;
  --text: #f3ece5;
  --muted: #a9a9c0;
  --border: rgba(205, 161, 131, 0.25);
  --whatsapp: #25d366;
  --radius: 16px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

/* ===== Intro animada (só aparece quando o JS liga .intro-on no <html>) ===== */
.intro { display: none; }
.intro-on body { overflow: hidden; }

.intro-on .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow: hidden;
  /* sem saída automática: a intro só sai no clique (.skip) */
}
.intro.skip { animation: intro-out 0.28s ease forwards; }

.intro-stage { position: absolute; inset: 0; }

/* tamanho e posição (--x, --y, --r, --sx, --sy) vêm do JS.
   O tamanho zero é proposital: se um item entrar na tela sem ter sido
   posicionado, ele fica invisível em vez de mostrar a foto em tamanho
   natural no meio da tela. */
.intro-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  animation: intro-fly 1.15s cubic-bezier(0.18, 0.82, 0.25, 1) forwards;
}

/* o wrapper posiciona (voo de entrada); a imagem flutua sem parar por dentro */
.intro-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
  animation: intro-float 5s ease-in-out infinite;
}

@keyframes intro-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(4px, -10px) rotate(1.4deg); }
  66%      { transform: translate(-5px, 6px) rotate(-1.2deg); }
}


@keyframes intro-fly {
  0% {
    opacity: 0;
    transform: translate(calc(var(--x) + var(--sx)), calc(var(--y) + var(--sy)))
               rotate(calc(var(--r) * 4)) scale(0.45);
  }
  45% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
  }
}

.intro-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  opacity: 0;
  animation: intro-logo-in 0.9s ease 0.55s forwards;
}
.intro-logo img { height: 15vmin; max-height: 104px; width: auto; margin-bottom: 14px; }
.intro-name {
  font-family: "Playfair Display", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(1rem, 3.4vmin, 1.6rem);
  color: var(--text);
}
.intro-sub {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: clamp(0.52rem, 1.5vmin, 0.72rem);
  color: var(--accent);
  margin-top: 6px;
}

@keyframes intro-logo-in {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.intro-hint {
  position: absolute;
  bottom: 6vh;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: intro-hint 0.7s ease 1.25s forwards;
}
@keyframes intro-hint { to { opacity: 1; } }

.hint-svg { width: 280px; max-width: 76vw; height: auto; overflow: visible; }

.hint-text {
  fill: var(--text);
  font-family: "Jost", sans-serif;
  font-size: 9.5px;
  letter-spacing: 2.1px;
  text-transform: uppercase;
}

/* a borda nasce do rastro: é desenhada durante a 1ª volta da estrela */
.hint-border {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.22;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-border 3.2s linear 2.6s forwards;
}
@keyframes draw-border { to { stroke-dashoffset: 0; } }

/* rastro da estrela caindo do céu */
.fall-trail {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
  /* o vão (700) precisa ser maior que o caminho (600): se 46+vão == 600,
     o deslocamento completa um ciclo e o rastro reaparece no ponto de partida */
  stroke-dasharray: 46 700;
  stroke-dashoffset: 46;
  animation: fall-trail 1.25s cubic-bezier(0.35, 0, 0.25, 1) 1.35s forwards;
}
@keyframes fall-trail {
  0%   { stroke-dashoffset: 46;   opacity: 0.55; }
  78%  { opacity: 0.55; }
  100% { stroke-dashoffset: -600; opacity: 0; }
}

.hint-trail {
  fill: none;
  stroke: var(--accent-light);
  stroke-linecap: round;
}
/* mesma cabeça (na posição da estrela), caudas cada vez mais longas e apagadas */
.hint-trail { opacity: 0; }
.hint-trail.t1 { stroke-width: 1.8; stroke-dasharray: 18 582; animation: trail1 3.2s linear 2.6s infinite; }
.hint-trail.t2 { stroke-width: 1.5; stroke-dasharray: 40 560; animation: trail2 3.2s linear 2.6s infinite; }
.hint-trail.t3 { stroke-width: 1.2; stroke-dasharray: 72 528; animation: trail3 3.2s linear 2.6s infinite; }

@keyframes trail1 { from { stroke-dashoffset: 18; opacity: 0.95; } to { stroke-dashoffset: -582; opacity: 0.95; } }
@keyframes trail2 { from { stroke-dashoffset: 40; opacity: 0.42; } to { stroke-dashoffset: -560; opacity: 0.42; } }
@keyframes trail3 { from { stroke-dashoffset: 72; opacity: 0.16; } to { stroke-dashoffset: -528; opacity: 0.16; } }

/* a estrela só existe a partir do momento em que começa a cair */
.hint-star {
  fill: var(--accent-light);
  opacity: 0;
  animation: star-appear 0.01s linear 1.35s forwards;
}
@keyframes star-appear { to { opacity: 1; } }

@keyframes intro-out {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); visibility: hidden; }
}

/* No celular vmin é a largura, o que espremeria tudo sobre a marca.
   Aqui o espalhamento vira vertical, que é onde sobra tela. */
@media (max-width: 600px) {
  .intro-hint { bottom: 5vh; }
  .intro-logo img { height: 19vw; }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Jost", "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 0 0 0.4em;
  color: var(--text);
  font-weight: 600;
}

p { margin: 0 0 1em; color: var(--muted); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.5em;
  font-weight: 500;
}

/* Top bar */
.topbar {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  color: #241a12;
  text-align: center;
  font-size: 0.82rem;
  padding: 8px 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 4vw;
  background: rgba(12, 17, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-symbol { height: 46px; width: auto; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}
.brand-sub {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.56rem;
  color: var(--accent);
  margin-top: 3px;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  flex-wrap: nowrap;
}
.nav a {
  font-size: 0.92rem;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav a:hover { opacity: 1; color: var(--accent-light); }

.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.icon-link { color: var(--accent-light); display: flex; }
.icon-link:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #201308;
}
.btn-primary:hover { background: var(--accent-light); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-light); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #06210f;
}
.btn-whatsapp:hover { opacity: 0.9; }

.btn-block { width: 100%; margin-top: 14px; }

/* Hero */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 70px 5vw 90px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
}
.hero-sub { max-width: 46ch; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.hero-gallery {
  position: relative;
  height: 380px;
}
.hero-gallery img {
  position: absolute;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0,0,0,0.45);
  border: 1px solid var(--border);
}
.hero-gallery .g1 { width: 58%; height: 62%; top: 0; left: 0; z-index: 2; }
.hero-gallery .g2 { width: 48%; height: 48%; bottom: 0; left: 18%; z-index: 3; }
.hero-gallery .g3 { width: 42%; height: 55%; top: 8%; right: 0; z-index: 1; }

/* Sections */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 70px 5vw;
}
.section.alt { background: var(--bg-alt); max-width: none; }
.section.alt > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow { display: block; }

/* Grid & cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

/* seções com 1 ou 2 produtos: centraliza em vez de esticar pela largura toda */
.grid.poucos {
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  justify-content: center;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,0.35); }

.card-img { aspect-ratio: 1 / 1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 {
  font-size: 1.08rem;
  line-height: 1.3;
  margin-bottom: 0.2em;
}
.card-tamanho { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6em; }
.card-preco {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  color: var(--accent-light);
  margin-bottom: 0;
  margin-top: auto;
}

/* Galeria de modelos (velas) */
.galeria-titulo {
  text-align: center;
  margin: 46px 0 16px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.galeria {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 780px;
  margin: 0 auto;
}
.galeria img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.galeria-nota {
  text-align: center;
  font-size: 0.86rem;
  margin: 16px 0 0;
}

@media (max-width: 620px) {
  .galeria { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* About */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.about-img img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.step {
  text-align: center;
  padding: 20px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.92rem; }

/* Footer */
footer {
  background: #080b16;
  border-top: 1px solid var(--border);
  padding: 56px 5vw 24px;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-symbol { height: 54px; width: auto; }
.footer-tag { font-size: 0.9rem; }
footer h4 {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.footer-link {
  display: block;
  font-size: 0.94rem;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 10px;
}
.footer-link:hover { opacity: 1; color: var(--accent-light); }

.pix-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  word-break: break-all;
}
.pix-copy:hover { border-color: var(--accent); }
.pix-copy.copied { border-color: var(--whatsapp); }
.copy-hint { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ===== Carrinho ===== */
.cart-link { position: relative; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #201308;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}

.btn-add.adicionado { background: var(--whatsapp); color: #06210f; }

.header-actions-solo { margin-left: auto; }

.pagina-carrinho {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 5vw 80px;
}
.pagina-carrinho h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.carrinho-vazio { text-align: center; padding: 30px 0 10px; }

.carrinho-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.ci-foto {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.ci-info h3 { font-size: 1.02rem; margin-bottom: 0.15em; }
.ci-tamanho { font-size: 0.84rem; margin-bottom: 0.2em; }
.ci-unitario { font-size: 0.84rem; color: var(--accent-light); margin: 0; }

.ci-controles {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.qtd {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.qtd-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}
.qtd-btn:hover { background: rgba(205, 161, 131, 0.15); color: var(--accent-light); }
.qtd-valor { min-width: 26px; text-align: center; font-size: 0.95rem; }

.ci-subtotal {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  color: var(--text);
}
.ci-remover {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0;
}
.ci-remover:hover { color: var(--accent-light); text-decoration: underline; }

.carrinho-resumo { margin-top: 32px; }
.resumo-linha {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
}
.resumo-total {
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
}
.resumo-total strong {
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
  color: var(--accent-light);
}

.pagamento {
  margin: 22px 0 26px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pagamento h4 {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 10px;
}
.pagamento-texto { font-size: 0.9rem; margin-bottom: 14px; }
.pagamento-texto strong { color: var(--text); }

.btn-finalizar { font-size: 1rem; padding: 15px 22px; }

.carrinho-aviso {
  font-size: 0.8rem;
  text-align: center;
  margin: 14px 0 0;
}

.btn-limpar {
  display: block;
  margin: 22px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.btn-limpar:hover { color: var(--accent-light); }

@media (max-width: 560px) {
  .carrinho-item {
    grid-template-columns: 72px 1fr;
    gap: 14px;
  }
  .ci-foto { width: 72px; height: 72px; }
  .ci-controles {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Floating WhatsApp button */
.fab-whatsapp {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #06210f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  z-index: 60;
  transition: transform 0.2s ease;
}
.fab-whatsapp:hover { transform: scale(1.08); }

/* Responsive */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-gallery { height: 300px; order: -1; }
  .about { grid-template-columns: 1fr; }
  .about-img { max-width: 320px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* com 6 itens o menu só cabe em uma linha acima de ~1050px */
@media (max-width: 1050px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 12px 5vw 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-toggle { display: flex; }
  .header-actions .btn-whatsapp span { display: none; }
  .btn-whatsapp { padding: 10px 14px; }
  .site-header { flex-wrap: wrap; }
  .brand-symbol { height: 38px; }
  .brand-name { font-size: 0.8rem; letter-spacing: 0.12em; }
  .brand-sub { font-size: 0.5rem; letter-spacing: 0.16em; }
}

@media (max-width: 480px) {
  .brand-text { display: none; }
  .brand-symbol { height: 42px; }
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .hero-gallery { height: 240px; }
  .topbar { font-size: 0.72rem; }
}
