/* =========================================================
   Componentes · nomes seguem o vocabulário de namethatui.com
   (Navigation Bar, Toggle Group, Chip, Card, Bento Grid,
   Breadcrumbs, Accordion, Tabs, Data Table, Modal Dialog/Sheet,
   Scrim, Toast, Form Field, Callout, Chat Launcher, Popover)
   ========================================================= */

/* ---------- Parallax Scrolling (fundo) ---------- */
.parallax {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.parallax__layer {
  position: absolute;
  left: 0; right: 0; top: 0;
  will-change: transform;
}
.parallax__layer--far { height: 125vh; }
.parallax__layer--near { height: 150vh; }
.parallax__layer svg { width: 100%; height: 100%; }
.parallax { opacity: 0.7; }
.parallax::after {
  /* esmaece a arte de forma uniforme do topo para baixo */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--c-bg) 92%);
  opacity: 0.6;
}
.art-grid { fill: var(--art-grid); }
.art-contours path { stroke: var(--art-contour); stroke-width: 1.2; }
.art-links path { stroke: var(--art-link); stroke-width: 1.2; }
.art-links--hot path { stroke: var(--art-hot); stroke-width: 2; stroke-linecap: round; }
.art-node { fill: var(--art-node); }
.art-node--on { fill: var(--art-on); }
.art-halo { fill: var(--art-halo); }

/* ---------- Navigation Bar (menubar flutuante) ---------- */
.menubar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
}
.menubar__bar {
  pointer-events: auto;
  width: 100%;
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-bottom-color: var(--c-border);
  border-radius: 0;
  background: var(--c-surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition:
    width var(--dur-slow) var(--ease),
    margin var(--dur-slow) var(--ease),
    border-radius var(--dur-slow) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.menubar__inner {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: width var(--dur-slow) var(--ease);
}
.menubar.is-floating .menubar__bar {
  background: var(--c-surface-strong);
  width: min(100% - 24px, calc(var(--container) + 40px));
  margin-top: 12px;
  border-radius: var(--radius);
  border-color: var(--c-border);
  box-shadow: var(--shadow-float);
}
.menubar.is-floating .menubar__inner { width: calc(100% - 32px); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  border-radius: var(--radius-inner);
}
.logo { display: block; height: auto; }
.logo__mark { fill: var(--c-logo-mark); }
.logo__word { fill: var(--c-logo-word); }
.brand .logo--horizontal { height: 44px; width: auto; }
.brand--stacked .logo--stacked { width: 168px; height: auto; }
@media (max-width: 400px) { .brand .logo--horizontal { height: 38px; } }

.menubar__nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.menubar__link,
.menubar__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-inner);
  background: transparent;
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.menubar__link:hover,
.menubar__trigger:hover,
.menubar__trigger[aria-expanded="true"] { background: var(--c-primary-soft); }
.menubar__link[aria-current="page"],
.menubar__trigger[data-active="true"] { color: var(--c-primary); }
.menubar__trigger svg { width: 12px; height: 12px; transition: transform var(--dur) var(--ease); }
.menubar__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.menubar__group { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  translate: -50% 0;
  min-width: 340px;
  padding: var(--sp-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  box-shadow: var(--shadow-float);
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur) var(--ease-spring), visibility var(--dur-fast);
}
.menubar__group.is-open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown__item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-inner);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.dropdown__item:hover { background: var(--c-primary-soft); }
.dropdown__item[aria-current="page"] .dropdown__title { color: var(--c-primary); }
.dropdown__title { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.dropdown__desc { font-size: var(--fs-xs); color: var(--c-text-muted); line-height: 1.4; }

.menubar__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: var(--sp-2); }
.menubar__actions .menubar__burger { display: none; }

/* ---------- Toggle Group (Segmented Control) ---------- */
.toggle-group {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-pill);
  background: var(--c-surface-sunken);
  border: 1px solid var(--c-border);
}
.toggle-group button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  color: var(--c-text-muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.toggle-group button[aria-pressed="true"],
.toggle-group [role="tab"][aria-selected="true"] {
  background: var(--c-surface-solid);
  color: var(--c-text);
  box-shadow: var(--shadow-raise);
}
.toggle-group--lg button { font-size: var(--fs-sm); padding: 8px 18px; letter-spacing: 0; }

/* ---------- Icon Button ---------- */
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-surface-solid);
  color: var(--c-text);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.icon-button:hover { background: var(--c-primary-soft); }
.icon-button:active { transform: scale(0.94); }
.icon-button svg { width: 18px; height: 18px; }
.theme-icon--sun { display: none; }
:root[data-effective-theme="dark"] .theme-icon--sun { display: block; }
:root[data-effective-theme="dark"] .theme-icon--moon { display: none; }

/* ---------- Drawer (menu mobile) ---------- */
.drawer {
  pointer-events: auto;
  position: fixed;
  left: 12px; right: 12px;
  top: calc(var(--header-h) + 20px + env(safe-area-inset-top, 0px));
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow: auto;
  padding: var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  box-shadow: var(--shadow-float);
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.menubar.is-open .drawer { opacity: 1; visibility: visible; transform: none; }
.drawer__link {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-inner);
  text-decoration: none;
  font-weight: var(--fw-medium);
}
.drawer__link:hover { background: var(--c-primary-soft); }
.drawer__link[aria-current="page"] { color: var(--c-primary); background: var(--c-primary-soft); }
.drawer__label { padding: 14px 14px 4px; font-size: var(--fs-xs); color: var(--c-text-muted); }
.drawer__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding: var(--sp-3) var(--sp-2) var(--sp-1);
  margin-top: var(--sp-2); border-top: 1px solid var(--c-border);
}
.drawer .btn { margin-top: var(--sp-2); }
.nav-scrim {
  position: fixed; inset: 0;
  background: var(--c-scrim);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
  pointer-events: auto;
  z-index: -1;
}
.menubar.is-open .nav-scrim { opacity: 1; visibility: visible; }

@media (max-width: 1040px) {
  .menubar__nav, .menubar__actions .toggle-group, .menubar__actions .icon-button--theme, .menubar__actions .btn { display: none; }
  .menubar__actions .menubar__burger { display: inline-grid; }
  .menubar__actions { margin-left: auto; }
}
@media (min-width: 1041px) {
  .drawer, .nav-scrim { display: none; }
}

/* ---------- Button ---------- */
.btn {
  --btn-bg: var(--c-surface-solid);
  --btn-fg: var(--c-text);
  --btn-bd: var(--c-border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  max-width: 100%;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--c-primary-soft); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--primary { --btn-bg: var(--c-primary); --btn-fg: var(--c-on-primary); --btn-bd: transparent; }
.btn--primary:hover { background: var(--c-primary-hover); }
.btn--signal { --btn-bg: var(--c-signal); --btn-fg: var(--c-on-signal); --btn-bd: transparent; }
.btn--signal:hover { background: var(--c-signal); filter: brightness(1.08); }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn--sm { min-height: 36px; padding: 6px 14px; font-size: var(--fs-xs); }
.btn--lg { min-height: 52px; padding: 14px 26px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* ---------- Text Link ---------- */
.link {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  border-radius: 4px;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Badge / Chip / Pill / Tag ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  text-decoration: none;
}
a.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.pill--signal { background: var(--c-signal-soft); color: var(--c-signal); }
.pill--neutral { background: var(--c-surface-sunken); color: var(--c-text-muted); }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-signal);
  box-shadow: 0 0 0 3px var(--c-signal-soft);
  flex-shrink: 0;
}

/* ---------- Card ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
}
.card__icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-inner);
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.card__icon svg { width: 22px; height: 22px; }
.card__title { font-size: var(--fs-lg); }
.card__text { color: var(--c-text-muted); font-size: var(--fs-sm); }
.card__footer { margin-top: auto; padding-top: var(--sp-3); }
.card--link { text-decoration: none; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card--link:hover { border-color: var(--c-primary); }
.card--link .card__more { color: var(--c-primary); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }

.check-list { list-style: none; display: grid; gap: var(--sp-2); }
.check-list li { position: relative; padding-left: 26px; color: var(--c-text-muted); font-size: var(--fs-sm); }
.check-list li::before {
  content: "";
  position: absolute; left: 2px; top: 0.42em;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-signal-soft);
  box-shadow: inset 0 0 0 4px var(--c-signal-soft), inset 0 0 0 7px var(--c-signal);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--c-text-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; opacity: 0.5; }
.breadcrumbs a { text-decoration: none; border-radius: 4px; }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs [aria-current="page"] { color: var(--c-text); }

/* ---------- Accordion (Disclosure) ---------- */
.accordion { display: grid; gap: var(--sp-3); }
.accordion details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  overflow: hidden;
}
.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  border-radius: var(--radius);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 2px;
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
  opacity: 0.6;
}
.accordion details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.accordion__body { padding: 0 var(--sp-6) var(--sp-6); color: var(--c-text-muted); display: grid; gap: var(--sp-3); }

/* ---------- Tabs ---------- */
.tabs__list { display: inline-flex; flex-wrap: wrap; margin-bottom: var(--sp-6); }
.tabs__panel[hidden] { display: none; }
.tabs__panel { animation: panel-in var(--dur) var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Data Table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
}
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 720px; }
.data-table caption { text-align: left; padding: var(--sp-4) var(--sp-5); color: var(--c-text-muted); font-size: var(--fs-xs); caption-side: bottom; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.data-table thead th { font-weight: var(--fw-semibold); background: var(--c-surface-sunken); position: sticky; top: 0; }
.data-table tbody th { font-weight: var(--fw-medium); color: var(--c-text-muted); white-space: nowrap; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table td.is-yes { color: var(--c-signal); font-weight: var(--fw-semibold); }
.data-table td.is-no { color: var(--c-text-muted); }

/* ---------- Modal Dialog (Sheet) + Scrim ---------- */
.dialog {
  width: min(100% - 24px, 860px);
  max-height: min(88vh, 920px);
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  color: var(--c-text);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.dialog[open] { display: flex; flex-direction: column; animation: dialog-in var(--dur-slow) var(--ease-spring); }
.dialog::backdrop { background: var(--c-scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.dialog__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--c-border);
}
.dialog__body { padding: var(--sp-6); overflow: auto; }
.dialog__foot {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: flex-end;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-sunken);
}
@media (max-width: 640px) {
  .dialog { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
}

/* ---------- Toast ---------- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  z-index: 90;
  display: grid; gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--c-text);
  color: var(--c-bg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-float);
  animation: toast-in var(--dur) var(--ease-spring);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Form Field ---------- */
.form { display: grid; gap: var(--sp-5); }
.form__row { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.field__label .req { color: var(--c-text-muted); font-weight: var(--fw-regular); }
.field__control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  font-size: var(--fs-base);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
textarea.field__control { min-height: 140px; resize: vertical; }
.field__control::placeholder { color: var(--c-text-muted); opacity: 0.7; }
.field__control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-soft); }
.field__helper { font-size: var(--fs-xs); color: var(--c-text-muted); }
.field__error { font-size: var(--fs-xs); color: var(--c-danger); font-weight: var(--fw-medium); display: none; }
.field.is-invalid .field__control { border-color: var(--c-danger); box-shadow: 0 0 0 4px var(--c-danger-soft); }
.field.is-invalid .field__error { display: block; }

/* ---------- Callout (Inline Alert) ---------- */
.callout {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-primary-soft);
}
.callout--signal { background: var(--c-signal-soft); }
.callout__title { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); }
.callout__title svg { width: 20px; height: 20px; color: var(--c-primary); }

/* ---------- Chat Launcher + Popover ---------- */
.chat {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: var(--sp-3);
}
.chat__launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--c-signal);
  color: var(--c-on-signal);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-float);
  transition: transform var(--dur) var(--ease-spring);
}
.chat__launcher:hover { transform: translateY(-2px); }
.chat__launcher svg { width: 24px; height: 24px; }
.chat__popover {
  width: min(320px, calc(100vw - 32px));
  padding: var(--sp-5);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  box-shadow: var(--shadow-float);
  display: grid;
  gap: var(--sp-3);
  transform-origin: bottom right;
  animation: popover-in var(--dur) var(--ease-spring);
}
.chat__popover[hidden] { display: none; }
@keyframes popover-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.chat__head { display: flex; align-items: center; gap: var(--sp-3); }
.chat__head strong { font-size: var(--fs-sm); line-height: 1.3; }
.chat__close { margin-left: auto; width: 30px; height: 30px; }
.chat__bubble {
  padding: 12px 14px;
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  background: var(--c-surface-sunken);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
@media (max-width: 520px) {
  .chat__launcher { width: 56px; padding: 0; justify-content: center; }
  .chat__launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Video Player ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background:
    radial-gradient(80% 120% at 80% 10%, var(--c-primary-soft), transparent 60%),
    var(--c-surface-solid);
}
.video video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute; inset: 0;
  display: grid; place-items: center; align-content: center; gap: var(--sp-3);
  border: 0; background: transparent; color: var(--c-text);
  border-radius: var(--radius);
}
.video__play-icon {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-on-primary);
  box-shadow: 0 0 0 10px var(--c-primary-soft);
  transition: transform var(--dur) var(--ease-spring);
}
.video__play:hover .video__play-icon { transform: scale(1.06); }
.video__play-icon svg { width: 28px; height: 28px; margin-left: 4px; }
.video__label { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.video__error { position: absolute; inset: auto var(--sp-4) var(--sp-4); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: var(--sp-16) 0 calc(var(--sp-8) + 72px);
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-solid);
}
.footer__grid {
  display: grid;
  gap: var(--sp-10);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
}
.footer__brand { display: grid; gap: var(--sp-4); justify-items: start; }
.footer__title { font-size: var(--fs-sm); color: var(--c-text-muted); max-width: 30ch; font-stretch: var(--stretch-body); font-weight: var(--fw-regular); }
.footer__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin-bottom: var(--sp-4); }
.footer__nav { list-style: none; columns: 2; column-gap: var(--sp-8); font-size: var(--fs-sm); }
.footer__nav li { break-inside: avoid; padding: 4px 0; }
.footer__nav a, .footer__contact a { color: var(--c-text-muted); text-decoration: none; border-radius: 4px; }
.footer__nav a:hover, .footer__contact a:hover { color: var(--c-primary); }
.footer__contact { list-style: none; display: grid; gap: var(--sp-3); font-size: var(--fs-sm); }
.footer__contact span { display: block; font-size: var(--fs-xs); color: var(--c-text-muted); opacity: 0.8; }
.footer__legal {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4);
  font-size: var(--fs-xs); color: var(--c-text-muted);
}
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer__grid { grid-template-columns: 1fr; } .footer__nav { columns: 1; } }

/* ---------- Contact list ---------- */
.contact-list { list-style: none; display: grid; gap: var(--sp-3); }
.contact-item {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease);
}
a.contact-item:hover { border-color: var(--c-primary); }
.contact-item__icon { width: 40px; height: 40px; border-radius: var(--radius-inner); display: grid; place-items: center; background: var(--c-primary-soft); color: var(--c-primary); flex-shrink: 0; }
.contact-item__icon--signal { background: var(--c-signal-soft); color: var(--c-signal); }
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item__label { font-size: var(--fs-xs); color: var(--c-text-muted); }
.contact-item__value { font-weight: var(--fw-semibold); }

/* ---------- Product Card ----------
   Estrutura idêntica em todos os cards: mídia (altura fixa) · nome · descrição
   (2 linhas fixas) · 4 linhas de especificação · 2 botões. Assim tudo alinha. */
.product-grid { display: grid; gap: var(--sp-6); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .product-grid { grid-template-columns: minmax(0, 1fr); } }

.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-solid);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 40px);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.product-card:hover { border-color: var(--c-border-strong); box-shadow: var(--shadow-raise); }
.product-card__media {
  height: 240px;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-media-bg);
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%;
  min-height: 0;
  object-fit: contain;
  transition: transform var(--dur-slow) var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }

/* Placeholder tipográfico enquanto não houver foto oficial */
.spec-hero { display: grid; justify-items: center; gap: 6px; text-align: center; }
.spec-hero__value {
  font-size: 3.5rem;
  font-stretch: var(--stretch-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--c-text);
}
.spec-hero__value small { font-size: 0.45em; font-weight: 500; color: var(--c-text-muted); margin-left: 2px; }
.spec-hero__label { font-size: var(--fs-xs); color: var(--c-text-muted); }
.spec-hero__swatch { width: 36px; height: 6px; border-radius: var(--radius-pill); margin-top: 6px; background: var(--c-text-muted); opacity: 0.4; }
.spec-hero__swatch--color { background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); opacity: 1; }

.product-card__body { display: grid; gap: var(--sp-2); padding: var(--sp-6) var(--sp-6) var(--sp-4); }
.product-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.product-card__name { font-size: var(--fs-xl); }
.product-card__tagline {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.45;
  min-height: calc(1.45em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__specs { list-style: none; display: grid; padding: 0 var(--sp-6); margin-bottom: var(--sp-5); }
.product-card__specs li {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4);
  padding: 9px 0;
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.product-card__specs span { color: var(--c-text-muted); }
.product-card__specs strong { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; }
.product-card__actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2);
  padding: 0 var(--sp-6) var(--sp-6);
  margin-top: auto;
}

.product-hero .spec-hero { padding: var(--sp-8) var(--sp-4); border-radius: var(--radius); background: var(--c-surface-sunken); }
.product-hero img { width: 100%; height: auto; border-radius: var(--radius); background: var(--c-media-bg); }

.spec-groups { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.spec-group h3 { font-size: var(--fs-base); margin-bottom: var(--sp-3); }
.spec-list { list-style: none; display: grid; }
.spec-list li { display: flex; justify-content: space-between; gap: var(--sp-4); padding: 9px 0; border-bottom: 1px solid var(--c-border); font-size: var(--fs-sm); }
.spec-list li:last-child { border-bottom: 0; }
.spec-list span { color: var(--c-text-muted); }
.spec-list strong { text-align: right; }

.product-hero { display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-6); align-items: center; margin-bottom: var(--sp-6); }
@media (max-width: 640px) { .product-hero { grid-template-columns: 1fr; } }

/* ---------- Empty State ---------- */
.empty-state { padding: var(--sp-10); text-align: center; border: 1px dashed var(--c-border-strong); border-radius: var(--radius); color: var(--c-text-muted); }

/* Pills e chips dentro de grids nunca esticam */
.stack > .pill, .stack > .chip, .section-head > .pill { justify-self: start; }

/* Textos longos (e-mails, URLs) nunca forçam largura */
.contact-item > span:last-child { min-width: 0; }
.contact-item__value { overflow-wrap: anywhere; }
.hero-panel__head { flex-wrap: wrap; }

/* ---------- v1.4 · Grades de produto por quantidade ---------- */
.product-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .product-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .product-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .product-grid--3, .product-grid--4 { grid-template-columns: minmax(0, 1fr); } }
.product-card[hidden] { display: none; }
.product-card__actions--single { grid-template-columns: 1fr; }
.product-card__bullets { padding: 0 var(--sp-6); margin-bottom: var(--sp-5); min-height: calc(3 * 1.55em + 2 * var(--sp-2)); }
.product-card__specs strong[data-i18n] { white-space: nowrap; }

/* Foto de destaque fora de card (W90, OpenTouch) */
.product-hero-media {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  padding: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-media-bg);
}
.product-hero-media img { width: 100%; height: 100%; object-fit: contain; }

/* Data Table larga com primeira coluna fixa */
.data-table--wide { min-width: 1120px; }
.data-table--sticky tbody th,
.data-table--sticky thead th:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--c-surface-solid);
  box-shadow: 1px 0 0 var(--c-border);
}
.data-table--sticky thead th:first-child { z-index: 2; background: var(--c-surface-sunken); }
.data-table thead th a.link { white-space: nowrap; }
.data-table td { white-space: nowrap; }
.data-table tbody th { white-space: normal; min-width: 180px; }

/* Notas de rodapé de tabelas */
.footnotes { margin: var(--sp-4) 0 0; padding-left: 1.4em; display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--c-text-muted); max-width: var(--measure); }
.footnotes li::marker { font-weight: var(--fw-semibold); }

/* Dropdown com muitas soluções: duas colunas */
@media (min-width: 1041px) {
  .dropdown--wide { min-width: 600px; grid-template-columns: 1fr 1fr; }
}

/* Grade de 4: selo acima do nome, descrição em até 3 linhas, foto maior */
.product-grid--4 .product-card__top { flex-direction: column-reverse; align-items: flex-start; gap: var(--sp-2); }
.product-grid--4 .product-card__name { font-size: var(--fs-lg); }
.product-grid--4 .product-card__tagline { -webkit-line-clamp: 3; min-height: calc(1.45em * 3); }
.product-grid--4 .product-card__media { padding: var(--sp-3) var(--sp-4); height: 220px; }
.product-grid--4 .product-card__body { padding: var(--sp-5) var(--sp-5) var(--sp-4); }
.product-grid--4 .product-card__specs { padding: 0 var(--sp-5); }
.product-grid--4 .product-card__actions { padding: 0 var(--sp-5) var(--sp-5); }

/* Tabela larga: cabe inteira no desktop; no celular rola dentro do quadro */
.data-table--wide { min-width: 1080px; table-layout: fixed; }
.data-table--wide th, .data-table--wide td { padding: 11px 10px; white-space: normal; overflow-wrap: anywhere; }
.data-table--wide tbody th, .data-table--wide thead th:first-child { width: 150px; min-width: 0; }

/* Toggle Group nunca quebra o rótulo; se faltar espaço, rola dentro do trilho */
.toggle-group { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.toggle-group::-webkit-scrollbar { display: none; }
.toggle-group button { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 480px) { .toggle-group--lg button { padding: 8px 14px; } }

/* v1.4.2 · grade de 2 e sombra suave nas fotos (aparelhos brancos em fundo claro) */
.product-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .product-grid--2 { grid-template-columns: minmax(0, 1fr); } }
.product-card__media img, .product-hero-media img { filter: drop-shadow(0 10px 18px rgba(15, 37, 35, 0.14)); }
.product-grid--4 .product-card__bullets { padding: 0 var(--sp-5); }

/* ---------- Powered by Magu (assinatura MAGU no rodapé) ---------- */
.powered-by {
  margin: 0;
  min-height: 1.6em;
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--c-text-muted);
}
.powered-by__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, opacity 0.25s;
}
.powered-by__link:hover,
.powered-by__link:focus-visible { border-color: var(--typed-color, var(--mg-1)); opacity: 0.85; }
.powered-by__text {
  color: var(--typed-color, var(--mg-1));
  font-weight: var(--mg-weight);
  text-shadow: 0 0 var(--mg-blur) var(--typed-glow, var(--mg-1-glow));
  white-space: nowrap;
  transition: color 0.35s, text-shadow 0.35s;
}
.powered-by__cursor {
  display: inline-block; width: 2px; height: 1em; margin-left: -0.25em;
  vertical-align: text-bottom;
  background: var(--typed-color, var(--mg-1));
  box-shadow: 0 0 var(--mg-blur) var(--typed-glow, var(--mg-1-glow));
  animation: mg-blink 1s step-end infinite;
  transition: background 0.35s, box-shadow 0.35s;
}
@keyframes mg-blink { 50% { opacity: 0; } }
@media (max-width: 480px) {
  .powered-by { font-size: 0.78rem; letter-spacing: 0.05em; }
  .powered-by__text { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .powered-by__cursor { display: none; } }
