/* ============================================================================
   MAPA DE CRIATIVOS PARA META ADS — ESTILO
   Direção: premium/editorial, fundo escuro, tipografia forte, muito espaço.
   Cada nível recebe sua cor via --level-color, setada em runtime pelo app.js.
   ============================================================================ */

:root {
  --bg: #0b0b0d;
  --bg-raised: #131316;
  --bg-card: #17171b;
  --bg-card-hover: #1c1c21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f1ee;
  --text-dim: #a7a6a2;
  --text-faint: #6f6e6b;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --level-color: #22d3ee;
  --level-soft: rgba(34, 211, 238, 0.14);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--level-color); color: #0b0b0d; }

/* ---------------------------------------------------------------------- */
/* TOPBAR + LEVEL NAV                                                      */
/* ---------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 14px;
}

.brand { display: flex; align-items: baseline; gap: 10px; }

.brand__mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text);
}

.brand__text {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand__text em { color: var(--text-dim); font-style: normal; }

.topbar__actions { display: flex; gap: 8px; align-items: center; }

.level__edit {
  display: inline-block;
  margin: -6px 0 22px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.level__edit:hover { color: var(--level-color); border-color: var(--level-color); }

.intro-toggle {
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.intro-toggle:hover { border-color: var(--level-color); color: var(--text); }

.intro-panel {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}

.intro-panel__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 28px 32px;
}

.intro-panel p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
}

.intro-panel p:last-child { margin-bottom: 0; }

.intro-panel strong { color: var(--text); font-weight: 600; }

.levelnav {
  overflow-x: auto;
  scrollbar-width: none;
}

.levelnav::-webkit-scrollbar { display: none; }

.levelnav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 0 20px;
}

.levelnav__tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 13px 16px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.levelnav__tab:hover { color: var(--text); }

.levelnav__tab .num {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  opacity: 0.6;
}

.levelnav__tab.is-active {
  color: var(--tab-color, var(--text));
  border-bottom-color: var(--tab-color, var(--level-color));
}

.levelnav__tab.is-active .num { opacity: 1; color: var(--tab-color, var(--level-color)); }

/* ---------------------------------------------------------------------- */
/* LEVEL HERO                                                              */
/* ---------------------------------------------------------------------- */

.level {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px 96px;
}

.level__hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border);
}

.level__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.level__number {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--level-color);
  border: 1px solid var(--level-color);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.level__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.level__title {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--text);
}

.level__brief {
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 500;
  font-style: italic;
  color: var(--level-color);
  max-width: 720px;
  margin: 0 0 28px;
  line-height: 1.4;
}

.level__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 30px;
  max-width: 920px;
}

.level__meta-block .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--level-color);
  margin-bottom: 8px;
}

.level__meta-block p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
}

.level__explicacao {
  max-width: 760px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.75;
}

.level__explicacao p { margin: 0; }

/* ---------------------------------------------------------------------- */
/* SUMÁRIO DE FORMATOS                                                     */
/* ---------------------------------------------------------------------- */

.summary {
  padding: 48px 0 8px;
}

.summary__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.summary__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.summary__item {
  background: var(--bg);
  padding: 26px 24px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  border: none;
  color: inherit;
  font-family: inherit;
}

.summary__item:hover { background: var(--bg-card); }

.summary__item .idx {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--level-color);
  font-weight: 600;
}

.summary__item .name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.summary__item .desc {
  font-size: 13.5px;
  color: var(--text-faint);
  line-height: 1.55;
}

.summary__item .arrow {
  margin-top: auto;
  color: var(--text-faint);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s, color 0.2s;
}

.summary__item:hover .arrow { gap: 10px; color: var(--level-color); }

/* ---------------------------------------------------------------------- */
/* FORMAT SECTIONS                                                         */
/* ---------------------------------------------------------------------- */

.format {
  padding: 72px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 128px;
}

.format__head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.format__title-col .idx {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--level-color);
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.format__title-col h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

.format__body p.resumo {
  font-size: 18px;
  color: var(--text);
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 20px;
  max-width: 680px;
}

.format__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.format__field .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.format__field p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}

.format__field ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.7;
}

.format__field ol li { margin-bottom: 8px; }
.format__field ol li:last-child { margin-bottom: 0; }
.format__field ol li::marker { color: var(--level-color); font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* GALERIA DE VÍDEOS                                                       */
/* ---------------------------------------------------------------------- */

.gallery__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 40px 0 18px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.vcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.vcard:hover { border-color: var(--border-strong); }

.vcard__thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background:
    radial-gradient(120% 90% at 20% 0%, var(--level-soft), transparent 60%),
    linear-gradient(160deg, #1a1a1e 0%, #101012 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.vcard__thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
}

.vcard__play {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  backdrop-filter: blur(6px);
}

.vcard__thumb img,
.vcard__thumb video,
.vcard__thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vcard__thumb img { object-fit: cover; }
.vcard__thumb video { object-fit: contain; background: #000; }
.vcard__thumb.has-thumb::before { display: none; }
.vcard__thumb.is-playing::before { display: none; }

.vcard__play.is-live {
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
}

.vcard__play.is-live:hover {
  transform: scale(1.08);
  border-color: var(--level-color);
  color: var(--level-color);
  background: rgba(0, 0, 0, 0.5);
}

.vcard__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--level-color);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--level-color);
  padding: 4px 8px;
  border-radius: 4px;
}

.vcard__index {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--text-faint);
}

.vcard__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.vcard__meta { display: flex; flex-direction: column; gap: 2px; }

.vcard__marca { font-size: 14.5px; font-weight: 600; color: var(--text); }

.vcard__produto { font-size: 13px; color: var(--text-faint); }

.vcard__observar {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.vcard__observar .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--level-color);
  margin-bottom: 6px;
}

.vcard__observar p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ---------------------------------------------------------------------- */
/* FOOTER + SCROLL TOP                                                     */
/* ---------------------------------------------------------------------- */

.sitefooter {
  border-top: 1px solid var(--border);
  padding: 28px 28px 40px;
}

.sitefooter__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.sitefooter__sep { opacity: 0.5; }

.sitefooter code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.scrolltop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s;
  transform: translateY(8px);
  z-index: 40;
}

.scrolltop.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

.scrolltop:hover { border-color: var(--level-color); color: var(--level-color); }

/* ---------------------------------------------------------------------- */
/* RESPONSIVE                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 980px) {
  .format__head { grid-template-columns: 1fr; gap: 14px; }
  .format__grid2 { grid-template-columns: 1fr; gap: 24px; }
  .summary__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level__meta { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 700px) {
  .topbar__inner { padding: 14px 18px 10px; }
  .brand__text { font-size: 15px; }
  .brand__text em { display: none; }
  .intro-toggle { font-size: 12px; padding: 7px 12px; }
  .levelnav__inner { padding: 0 12px; }
  .levelnav__tab { font-size: 12.5px; padding: 12px 12px 11px; }

  .level { padding: 0 18px 72px; }
  .level__hero { padding: 36px 0 32px; }
  .level__title { font-size: clamp(32px, 10vw, 44px); }
  .level__brief { font-size: 18px; }

  .summary { padding: 34px 0 4px; }
  .summary__grid { grid-template-columns: 1fr; }

  .format { padding: 48px 0; }
  .gallery { grid-template-columns: 1fr; }

  .sitefooter__inner { flex-direction: column; gap: 4px; }
  .scrolltop { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}
