/* ==========================================================================
   ESSENCIAL STUDIO — página pública de cristais
   ========================================================================== */

:root {
  --plum-900: #1e0b28;
  --plum-800: #2b0f38;
  --plum-700: #3a1650;
  --plum-600: #4a1a5c;
  --plum-500: #5f2a77;
  --gold: #c9a44c;
  --gold-2: #e3c37a;
  --gold-soft: #f2e3bd;
  --cream: #faf6f1;
  --paper: #fffdf9;
  --ink: #2a1f30;
  --muted: #6d5f74;
  --line: #e7dce9;
  --shadow: 0 18px 40px -26px rgba(58, 22, 80, .5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--cream);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--plum-800); line-height: 1.18; margin: 0 0 .4em; }
p { margin: 0 0 .9em; }
a { color: var(--plum-600); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--plum-800); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 30; }
.skip:focus { left: 0; }

/* topo */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(30, 11, 40, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(227, 195, 122, .25); color: #f7eefb;
}
.top-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark { color: var(--gold-2); font-size: 16px; }
.brand-name { display: block; font-family: Georgia, serif; font-size: 16px; letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.brand-sub { display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); opacity: .85; }
.top-nav { display: none; margin-left: auto; gap: 22px; }
.top-nav a { color: rgba(247, 238, 251, .8); text-decoration: none; font-size: 14px; }
.top-nav a:hover { color: #fff; }
.top .btn-wa { margin-left: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--plum-700);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--plum-500); }
.btn-primary { background: linear-gradient(140deg, var(--plum-700), var(--plum-500)); border-color: var(--plum-700); color: #fff; }
.btn-wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn-wa:hover { background: #187a42; border-color: #187a42; }
.btn-sm { min-height: 38px; padding: 8px 15px; font-size: 13.5px; }

/* hero */
.hero { padding: 54px 0 26px; }
.eyebrow { margin: 0 0 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--plum-500); font-weight: 700; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); max-width: 18ch; }
.lead { font-size: 17px; color: #43354b; max-width: 56ch; }

/* controles */
.controls {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin: 10px 0 22px; box-shadow: var(--shadow);
}
.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); font: inherit;
}
.input:focus { outline: none; border-color: var(--plum-500); box-shadow: 0 0 0 3px rgba(95, 42, 119, .14); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip {
  display: inline-flex; align-items: center; min-height: 30px;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 12px; color: #5b4a63; cursor: pointer;
}
.chip:hover { border-color: var(--plum-500); }
.chip.is-active { background: var(--plum-700); border-color: var(--plum-700); color: #fff; }
.count { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* grade */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; padding-bottom: 10px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.card.is-target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 76, .25), var(--shadow); }
.card .foto {
  display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; max-height: 190px;
  object-fit: cover; background: #f3eef5;
}
.foto-btn {
  display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0;
  background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden;
}
.foto-btn:focus-visible { outline: 3px solid var(--plum-500); outline-offset: 3px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-head h2 { font-size: 20px; margin: 0; }
.chip.ele { background: #f7f1f9; border-color: #e2d4ec; color: var(--plum-700); cursor: default; }
.mineral { font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; }
.card p { font-size: 14.5px; color: #4c3d55; }
.card details { margin-top: 4px; }
.card summary { cursor: pointer; font-size: 12.5px; color: var(--plum-600); }
.card details p { margin: 8px 0 0; font-size: 13px; color: #5b4a63; }
.vazio { color: var(--muted); font-size: 14px; }

/* nota */
.note {
  margin: 20px 0 48px; padding: 24px;
  background: #fffaf0; border: 1px solid var(--gold-soft); border-radius: 18px;
}
.note h2 { font-size: 22px; }
.note p { font-size: 14.5px; color: #4a3b52; }

/* imitações */
.fake { background: #fff; border-color: var(--line); }
.fake-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 18px 0 8px; }
.fake-grid article {
  background: #faf7fb; border: 1px solid #ece2f0; border-radius: 14px; padding: 16px;
}
.fake-grid h3 { font-size: 16px; margin: 0 0 6px; }
.fake-grid p { font-size: 13.5px; color: #4c3d55; margin: 0; }
.fake-title { font-size: 18px; margin: 22px 0 8px; }
.checks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 24px; font-size: 14px; color: #4a3b52; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #f3ead1; color: #8a6620; font-size: 10px;
  display: grid; place-items: center; font-weight: 700;
}
.fine { font-size: 12.5px; color: var(--muted); }

/* nomes populares / imitações com foto */
.nomes-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 14px 0 10px; }
.nome-card { margin: 0; background: #faf7fb; border: 1px solid #ece2f0; border-radius: 14px; overflow: hidden; scroll-margin-top: 92px; }
#imitacoes { scroll-margin-top: 84px; }
.nome-card img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; max-height: 170px; object-fit: cover; }
.nome-card .foto-btn { margin: 0; border-radius: 0; }
.nome-card figcaption { padding: 10px 12px; }
.nome-card strong { display: block; font-family: Georgia, serif; font-size: 15px; color: var(--plum-800); margin-bottom: 4px; }
.nome-card span { display: block; font-size: 12.5px; color: #4c3d55; }
.nome-card small { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); }

/* aviso de imitação dentro do card */
.aviso-imitacao {
  display: inline-block; margin: 2px 0 10px; padding: 4px 10px;
  border-radius: 999px; background: #fff3f3; border: 1px solid #e8b4b4;
  color: #8d243d; font-size: 12px; font-weight: 600; text-decoration: none;
}
.aviso-imitacao:hover { background: #fbe4e4; }

/* foto ampliada */
body.sem-rolagem { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; gap: 10px;
  padding: 24px; background: rgba(20, 8, 28, .92);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: 100%; }
.lightbox img {
  display: block; max-width: min(960px, 94vw); max-height: 80vh;
  width: auto; height: auto; border-radius: 14px;
  background: #fff; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
}
.lightbox figcaption { color: #f7eefb; font-size: 13.5px; text-align: center; }
.lightbox-close {
  position: absolute; top: 14px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(227, 195, 122, .45);
  background: rgba(30, 11, 40, .8); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(58, 22, 80, .95); }

/* rodapé */
.foot { border-top: 1px solid var(--line); padding: 24px 0 34px; color: var(--muted); font-size: 13px; }
.foot p { margin: 0 0 6px; }
.tiny { font-size: 12px; }

/* flutuante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 25;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1f8f4e; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(31, 143, 78, .7);
}
.wa-float:hover { background: #187a42; }

@media (min-width: 680px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .fake-grid { grid-template-columns: repeat(2, 1fr); }
  .nomes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .fake-grid { grid-template-columns: repeat(3, 1fr); }
  .nomes-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top-nav { display: flex; }
  .top .btn-wa { margin-left: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* voltar */
.top .btn-voltar { margin-left: auto; }
.top .btn-wa { margin-left: 8px; }
@media (min-width: 960px) {
  .top .btn-voltar { margin-left: 0; }
}
