/* Central de marca. Só o que os componentes de styles.css não cobrem. */
.logo-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── ÁREA DE DOWNLOAD ─────────────────────── */
.logo-downloads { padding: 72px 0 96px; background: var(--off-white); }

.logo-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
  gap: 44px;
  align-items: start;
}

.logo-preview-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.logo-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--navy-dark);
  min-width: 0;
}

.logo-preview-file {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  min-height: 442px;
  transition: background-color var(--transition);
}

.logo-preview.is-transparente {
  background-color: var(--white);
  background-image:
    linear-gradient(45deg, var(--gray-100) 25%, transparent 25%),
    linear-gradient(-45deg, var(--gray-100) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--gray-100) 75%),
    linear-gradient(-45deg, transparent 75%, var(--gray-100) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.logo-preview.is-claro { background: #F0F0F0; }
.logo-preview.is-azul { background: #032E3B; }
.logo-preview.is-laranja { background: #E75707; }

.logo-frames { position: relative; width: 100%; height: 380px; }
.logo-scene { display: block; width: 100%; height: 100%; overflow: hidden; }
.logo-part { transform-box: view-box; transform-origin: 0 0; transition: transform 260ms cubic-bezier(.77,0,.175,1); }
.logo-part path { transition: fill var(--transition); }
.logo-frames[data-instant="true"] .logo-part { transition: none; }

/* ── CONTROLES ────────────────────────────── */
.logo-options { border: 0; min-width: 0; }
.logo-options legend,
.logo-field > span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.logo-options > div { display: grid; gap: 8px; }
.logo-backgrounds { margin-top: 20px; }
.logo-backgrounds > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.logo-compositions { margin-bottom: 22px; }
.logo-compositions > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.logo-slogan { margin-bottom: 22px; }
.logo-slogan[hidden] { display: none; }
.logo-slogan > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.logo-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 11px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition);
}
@media (hover: hover) {
  .logo-options label:hover { border-color: var(--orange); }
}
.logo-options label:has(input:checked) {
  color: var(--text);
  background: var(--orange-pale);
  border-color: var(--orange);
}
.logo-options input { accent-color: var(--orange); flex-shrink: 0; }

.logo-swatch { width: 14px; height: 14px; border: 1px solid var(--gray-200); border-radius: 3px; flex-shrink: 0; }
.logo-swatch.is-transparente { background: repeating-conic-gradient(var(--gray-200) 0% 25%, #fff 0% 50%) 50% / 7px 7px; }
.logo-swatch.is-claro { background: #F0F0F0; }
.logo-swatch.is-azul { background: #032E3B; border-color: #032E3B; }
.logo-swatch.is-laranja { background: #E75707; border-color: #E75707; }

.logo-contrast-note { font-size: 13px; line-height: 1.6; color: var(--gray-400); margin-top: 12px; }

.logo-field { display: flex; flex-direction: column; margin-bottom: 20px; }
.logo-field[hidden] { display: none; }
.logo-field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.logo-field select:hover { border-color: var(--orange); }
.logo-field small { font-size: 12px; line-height: 1.5; color: var(--gray-400); margin-top: 8px; }

.logo-options input:focus-visible,
.logo-field select:focus-visible,
.logo-viewer:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.logo-viewer:focus-visible { outline-color: var(--white); }

/* ── RESUMO E BOTÕES ──────────────────────── */
.logo-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 24px 0 14px;
  padding: 20px;
  background: var(--navy-dark);
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  border-radius: var(--radius-lg);
}
.logo-summary-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}
.logo-summary strong { font-size: 22px; line-height: 1.3; color: #fff; letter-spacing: -0.02em; }
.logo-summary p { font-size: 14px; color: rgba(255,255,255,0.7); }
.logo-summary-details { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.logo-summary-details span {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.logo-controls { display: flex; flex-direction: column; }
.logo-actions { order: 1; display: grid; gap: 12px; }
.logo-share-status { order: 1; font-size: 13px; line-height: 1.5; color: var(--gray-600); margin-top: 10px; }
.logo-share-status[hidden] { display: none; }

.logo-download {
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  font-size: 15px;
  white-space: normal;
}
.logo-share:disabled { opacity: 0.6; cursor: progress; }
.logo-kit { order: 2; margin-top: 12px; }
.logo-kit small { display: block; font-size: 11.5px; font-weight: 400; color: var(--gray-600); margin-top: 3px; }
.logo-kit svg { flex-shrink: 0; }

/* ── MANUAL ───────────────────────────────── */
.logo-manual-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  margin-bottom: 36px;
}
.section-dark .logo-manual-header .section-label { color: var(--orange); margin-bottom: 14px; }
.section-dark .logo-manual-header .section-label::before,
.section-dark .logo-manual-header .section-label::after { background: var(--orange); opacity: 0.5; }
.logo-manual-header h2 { margin-bottom: 0; }
.logo-pdf-badge { padding: 9px 14px; font-size: 12.5px; flex-shrink: 0; }

.logo-viewer { backdrop-filter: none; }
.logo-viewer .mockup-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.logo-page-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-page-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
}
.logo-page-controls button:not(:disabled):hover { background: var(--orange); border-color: var(--orange); }
.logo-page-controls button:disabled { opacity: 0.3; cursor: default; }
.logo-page-controls button:focus-visible { outline-color: var(--white); border-radius: 50%; }
.logo-page-counter {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  min-width: 54px;
  text-align: center;
}
.logo-page-counter span { color: rgba(255,255,255,0.45); font-weight: 400; }

.logo-manual-canvas { padding: 22px; }
.logo-manual-window { overflow: hidden; width: 100%; aspect-ratio: 16 / 9; background: #fff; border-radius: var(--radius); }
.logo-manual-track { display: flex; width: 100%; height: 100%; transition: transform 240ms cubic-bezier(.77,0,.175,1); }
.logo-manual-slide { flex: 0 0 100%; min-width: 0; width: 100%; height: 100%; }
.logo-manual-slide img { width: 100%; height: 100%; object-fit: contain; }

.logo-thumbnails { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.logo-thumbnails button {
  background: transparent;
  border: 0;
  padding: 0;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color var(--transition);
}
.logo-thumbnails button span {
  display: block;
  margin-bottom: 7px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  opacity: 0.65;
  transition: opacity var(--transition), border-color var(--transition);
}
.logo-thumbnails img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }
.logo-thumbnails button:hover { color: #fff; }
.logo-thumbnails button:hover span { opacity: 1; border-color: rgba(255,255,255,0.4); }
.logo-thumbnails button[aria-current="page"] { color: var(--orange); font-weight: 700; }
.logo-thumbnails button[aria-current="page"] span { opacity: 1; border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.logo-thumbnails button:focus-visible { outline-color: var(--white); }

.logo-manual-action { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }

/* ── RESPONSIVO ───────────────────────────── */
@media (max-width: 1024px) {
  .logo-workspace { grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); gap: 26px; }
  .logo-backgrounds > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-compositions > div { grid-template-columns: 1fr; }
  .logo-preview { min-height: 380px; padding: 20px; }
  .logo-frames { height: 340px; }
}

/*
  Celular: a prévia fica presa no topo e os botões no pé, então cada opção tocada
  mostra o resultado na hora e o arquivo está sempre a um toque. Flex, não grid: dentro
  de grid o sticky fica preso à própria linha. display: contents solta os filhos das
  duas colunas para que "order" reorganize tudo numa coluna só.
*/
@media (max-width: 768px) {
  .logo-hero { padding: 92px 0 28px; }
  .logo-hero .hero-eyebrow { margin-bottom: 12px; }
  .logo-hero h1 { font-size: clamp(30px, 8.4vw, 40px); margin-bottom: 8px; }
  .logo-hero .page-hero-desc { font-size: 15px; line-height: 1.55; }

  .logo-downloads { padding: 0; }
  .logo-workspace { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .logo-preview-column, .logo-controls { display: contents; }

  .logo-preview-card {
    position: sticky;
    top: 68px;
    z-index: 5;
    margin: 0 -20px;
    border: 0;
    border-bottom: 1px solid var(--gray-100);
    border-radius: 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  }
  .logo-preview-bar { display: none; }
  .logo-preview { min-height: 0; padding: 12px 20px; }
  .logo-frames { height: clamp(130px, 24vh, 190px); }

  .logo-compositions { order: 1; margin: 20px 0 0; }
  .logo-slogan { order: 2; margin: 18px 0 0; }
  .logo-field:has(#logo-color) { order: 3; margin: 18px 0 0; }
  .logo-backgrounds { order: 4; margin: 18px 0 0; }
  .logo-contrast-note { order: 5; margin-top: 8px; }
  .logo-field:has(#logo-format) { order: 6; margin: 18px 0 0; }
  #logo-size-field { order: 7; margin: 18px 0 0; }
  .logo-summary { display: none; }
  .logo-kit { order: 8; margin-top: 20px; }
  .logo-share-status { order: 9; margin-top: 12px; }

  .logo-actions {
    order: 10;
    position: sticky;
    bottom: 0;
    z-index: 6;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px -20px 0;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
    background: var(--white);
    box-shadow: 0 -6px 18px rgba(0,0,0,0.08);
  }
  .logo-actions .logo-download { justify-content: center; gap: 8px; min-height: 50px; padding: 10px; font-size: 14px; }
  .logo-actions .logo-share { background: var(--white); }

  /* Opções como blocos de toque: o rádio some, a seleção aparece pelo fundo e pela borda. */
  .logo-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
  .logo-options label {
    position: relative;
    justify-content: center;
    min-height: 48px;
    padding: 8px 6px;
    font-size: 12.5px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }
  .logo-options label:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
  .logo-compositions > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logo-backgrounds > div { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .logo-backgrounds label { flex-direction: column; gap: 5px; padding: 8px 2px; font-size: 11px; }
  .logo-swatch { width: 20px; height: 20px; }
  /* Abaixo de 16px o iOS amplia a página ao tocar no campo. */
  .logo-field select { font-size: 16px; min-height: 48px; }

  .logo-manual { padding: 56px 0; }
  .logo-manual-header { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
  .logo-viewer .mockup-dots { display: none; }
  .logo-viewer .mockup-header { padding: 10px 12px; }
  .logo-page-controls button { width: 44px; height: 44px; }
  .logo-manual-canvas { padding: 8px; }
  .logo-manual-track { touch-action: pan-y; }
  .logo-thumbnails {
    display: flex;
    gap: 10px;
    margin: 16px -20px 0;
    padding: 2px 20px 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .logo-thumbnails::-webkit-scrollbar { display: none; }
  .logo-thumbnails button { flex: 0 0 104px; scroll-snap-align: start; }
  .logo-manual-action { flex-direction: column; margin-top: 24px; }
  .logo-manual-action > * { width: 100%; justify-content: center; min-height: 50px; }

  /* Sem o botão flutuante: cobre os controles e competiria com o "Compartilhar" da barra. */
  .wa-float { display: none; }
}

@media (max-width: 360px) {
  .logo-backgrounds label { font-size: 10px; letter-spacing: -0.01em; }
}

/* Celular deitado: não sobra altura para duas barras presas. */
@media (max-width: 960px) and (max-height: 560px) {
  .logo-preview-card, .logo-actions { position: static; }
}
