/* ==========================================================================
   EFS Aplicativos — Folha de estilo principal
   Tema escuro: roxo profundo + azul elétrico + detalhes em amarelo/laranja
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #050a1e;
  --surface: #0d1634;
  --surface-2: #131f45;
  --surface-3: #1b2a58;
  --border: #223261;
  --border-2: #344a86;

  --text: #eef3ff;
  --text-2: #c3cdec;
  --muted: #8e9cc6;

  --violet: #7c3aed;
  --violet-2: #a78bfa;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --sky: #38bdf8;

  --brand: #3b82f6;
  --brand-hover: #2563eb;

  --accent: #ffb020;
  --accent-2: #ff8a1f;
  --accent-ink: #1a1206;

  --ring: #60a5fa;
  --grad: linear-gradient(120deg, #7c3aed 0%, #3b82f6 55%, #38bdf8 100%);
  --grad-text: linear-gradient(
    100deg,
    #c4b5fd 0%,
    #8b5cf6 22%,
    #3b82f6 68%,
    #60a5fa 100%
  );
  --grad-warm: linear-gradient(135deg, #ffc23c 0%, #ff7a1a 100%);

  --header-bg: rgba(5, 10, 30, 0.72);
  --header-bg-scrolled: rgba(5, 10, 30, 0.9);
  --footer-bg: rgba(5, 10, 30, 0.6);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 8px 20px -12px rgba(0, 0, 0, 0.8);
  --shadow-md: 0 22px 48px -26px rgba(2, 6, 30, 0.95);
  --shadow-lg: 0 46px 90px -40px rgba(2, 6, 30, 1);
  --glow-violet: 0 18px 46px -20px rgba(59, 130, 246, 0.7);
  --glow-accent: 0 18px 46px -20px rgba(255, 138, 31, 0.65);

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --maxw: 1160px;
  --header-h: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background:
    radial-gradient(
      900px 520px at 12% -12%,
      rgba(124, 58, 237, 0.4),
      transparent 60%
    ),
    radial-gradient(
      960px 560px at 92% -4%,
      rgba(59, 130, 246, 0.5),
      transparent 58%
    ),
    radial-gradient(
      780px 520px at 50% 118%,
      rgba(56, 189, 248, 0.2),
      transparent 60%
    ),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  font: inherit;
  color: inherit;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}
.container {
  width: min(var(--maxw), 100% - 48px);
  margin-inline: auto;
}

/* Cartões de fundo escuro fixo mantêm textos claros em ambos os temas */
.hero-art,
.featured,
.support {
  --text: #eef3ff;
  --text-2: #c3cdec;
  --muted: #8e9cc6;
  --violet-2: #a78bfa;
  --surface-2: #131f45;
  --surface-3: #1b2a58;
  --border-2: #344a86;
  --grad-text: linear-gradient(
    100deg,
    #c4b5fd 0%,
    #8b5cf6 22%,
    #3b82f6 68%,
    #60a5fa 100%
  );
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}
.site-header.scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  width: clamp(44px, 5.5vw, 58px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-2);
  padding: 9px 14px;
  border-radius: var(--r-pill);
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease);
}
.nav a:hover {
  color: var(--text);
  background: var(--surface-3);
}
.nav .contact-link {
  border: 1px solid var(--border-2);
  background: var(--surface-2);
}
.nav .contact-link:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  color: var(--text);
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.theme-toggle:hover {
  background: var(--surface-3);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-moon {
  display: none;
}
:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(46px, 7vw, 92px) 0 clamp(38px, 6vw, 68px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--violet-2);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-warm);
}
h1 {
  font-size: clamp(38px, 4.9vw, 62px);
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 18px 0 22px;
  font-weight: 800;
}
/* Os títulos recebem o gradiente roxo→azul no fim desta folha de estilo. */
.hero p {
  max-width: 500px;
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-2);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ---------- Botões ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  background: var(--grad);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--glow-violet);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    filter 0.2s var(--ease);
}
.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 26px 60px -22px rgba(59, 130, 246, 0.95);
}
.button.secondary {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--text);
  box-shadow: none;
}
.button.secondary:hover {
  background: var(--surface-3);
  border-color: var(--violet-2);
  color: var(--text);
}

/* ---------- Arte lateral do hero ---------- */
.hero-art {
  position: relative;
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.4vw, 30px);
  background: linear-gradient(150deg, #4318a8 0%, #1d4ed8 52%, #38bdf8 100%);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1px rgba(167, 139, 250, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  isolation: isolate;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      260px 260px at 100% 0,
      rgba(255, 176, 32, 0.5),
      transparent 70%
    ),
    radial-gradient(
      260px 260px at 0 115%,
      rgba(56, 189, 248, 0.55),
      transparent 70%
    );
}
.preview {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  background: rgba(16, 10, 34, 0.82);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.95);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.preview:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 26px 46px -22px rgba(0, 0, 0, 0.95);
}
.preview:nth-child(2) {
  margin-left: clamp(0px, 4vw, 34px);
}
.preview:nth-child(3) {
  margin-right: clamp(0px, 4vw, 28px);
}
.preview strong {
  display: block;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
}
.preview small {
  color: var(--muted);
  font-size: 12.5px;
}
.preview .arrow {
  margin-left: auto;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}
.preview:hover .arrow {
  transform: translate(3px, -3px);
}
.icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 600;
}
.icon-naval {
  background: #140d2e;
  overflow: hidden;
}
.icon-naval img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.memory-icon {
  background: #140d2e;
  padding: 10px;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.memory-icon i {
  width: 100%;
  height: 100%;
  border-radius: 5px;
}
.memory-icon i:nth-child(1) {
  background: #44ca91;
}
.memory-icon i:nth-child(2) {
  background: #ff8c7a;
}
.memory-icon i:nth-child(3) {
  background: #f4cb58;
}
.memory-icon i:nth-child(4) {
  background: #60b8ed;
}
.calc-icon {
  background: #140d2e;
  color: var(--accent);
}

/* ---------- Seções ---------- */
.section {
  padding: clamp(24px, 4vw, 36px) 0 clamp(48px, 6vw, 80px);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.section-head h2,
.support h2 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 10px 0;
  font-weight: 800;
}
.section-head p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 560px;
}

/* ---------- Faixa de destaques ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.stat {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-warm);
}
.stat b {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat span {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Jogos em destaque ---------- */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(140deg, #120a33, #1b2b6b);
  box-shadow:
    var(--shadow-md),
    inset 0 0 0 1px rgba(167, 139, 250, 0.22);
}
.featured img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: contain;
  display: block;
}
.feature-content {
  padding: clamp(24px, 3vw, 36px);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #ffd98a;
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.45);
  border-radius: var(--r-pill);
  padding: 5px 12px;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.25);
}
.feature-content h3 {
  font-size: clamp(24px, 2.6vw, 30px);
  margin: 15px 0 10px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.feature-content p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}
.feature-content .button {
  background: var(--grad-warm);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: var(--glow-accent);
}
.feature-content .button:hover {
  filter: brightness(1.06);
  box-shadow: 0 26px 60px -22px rgba(255, 138, 31, 0.9);
}
.feature-actions {
  margin-top: 22px;
}
.feature-content .trailer-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 181, 253, 0.55);
  color: #f5f3ff;
  box-shadow: none;
}
.feature-content .trailer-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #c4b5fd;
  box-shadow: none;
}
.feature-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.feature-links a {
  font-size: 13px;
  color: #d6c9f5;
  text-decoration-color: rgba(214, 201, 245, 0.4);
}
.feature-links a:hover {
  color: #fff;
}

/* ---------- Filtros e busca ---------- */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter {
  padding: 8px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.filter:hover {
  border-color: var(--violet-2);
  color: var(--text);
}
.filter.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-violet);
}
.catalog-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.search-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.search-label input {
  width: 250px;
  padding: 11px 15px;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.search-label input::placeholder {
  color: var(--muted);
}
.search-label input:hover {
  border-color: var(--violet-2);
}
.catalog-count {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}
.empty {
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  color: var(--text-2);
}
.catalog-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
}
.catalog-footer a {
  color: var(--violet-2);
  font-weight: 650;
}

/* ---------- Grade de aplicativos ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.app-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}
.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-md), var(--glow-violet);
}
.app-card[hidden] {
  display: none;
}
.app-visual {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, #101a3d, #1b2a58);
}
.app-card[data-category="jogos"] .app-visual {
  background: linear-gradient(160deg, #1c2570, #123a86);
}
.app-card[data-category="utilidades"] .app-visual {
  background: linear-gradient(160deg, #241a4a, #3a2410);
}
.app-visual::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  right: -40%;
  bottom: -60%;
  background: radial-gradient(
    circle at 60% 40%,
    rgba(59, 130, 246, 0.5),
    transparent 60%
  );
}
.app-card[data-category="utilidades"] .app-visual::before {
  background: radial-gradient(
    circle at 60% 40%,
    rgba(255, 138, 31, 0.42),
    transparent 60%
  );
}
.official-icon {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: #fff;
  object-fit: contain;
  box-shadow:
    0 18px 32px -16px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s var(--ease);
}
.app-card:hover .official-icon {
  transform: translateY(-3px) scale(1.05);
}
.app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}
.category {
  align-self: flex-start;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 750;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.2);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}
.app-card[data-category="utilidades"] .category {
  color: #ffcf7a;
  background: rgba(255, 176, 32, 0.14);
}
.app-body h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 12px 0 8px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.app-body p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 20px;
  line-height: 1.65;
}
.store-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 9px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--violet-2);
  text-decoration: none;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.store-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.store-link:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
}
.store-link span[aria-hidden="true"] {
  display: none;
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.card-links .store-link {
  margin-top: 0;
}
.online-actions {
  margin-top: 0;
}

/* ---------- Contato ---------- */
.support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(26px, 3vw, 40px);
  background: linear-gradient(135deg, #101a3d, #1b2a58);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.support p {
  max-width: 580px;
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}
.support .button {
  white-space: nowrap;
  flex-shrink: 0;
}
.support .actions {
  margin-top: 6px;
}

/* ---------- Rodapé ---------- */
.site-footer {
  margin-top: 20px;
  padding: 40px 0;
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
}
.footer-title {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.footer-note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0;
}
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
}
.footer-links a:hover {
  color: var(--violet-2);
}

/* ---------- Utilitários ---------- */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 99;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}

/* ---------- Revelação ao rolar ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Títulos com gradiente roxo→azul ---------- */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1,
  h2,
  .feature-content h3 {
    background-image: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---------- Tema claro ---------- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f6ff;
  --surface: #ffffff;
  --surface-2: #eef2ff;
  --surface-3: #e2e9fd;
  --border: #d6def5;
  --border-2: #bcc9ee;

  --text: #0f1533;
  --text-2: #3e4a70;
  --muted: #68739a;

  --brand: #4f46e5;
  --brand-hover: #4338ca;

  --violet-2: #6d28d9;
  --ring: #4f46e5;

  --grad-text: linear-gradient(100deg, #7c3aed 0%, #4f46e5 42%, #2563eb 100%);

  --header-bg: rgba(255, 255, 255, 0.78);
  --header-bg-scrolled: rgba(255, 255, 255, 0.92);
  --footer-bg: rgba(255, 255, 255, 0.7);

  --shadow-xs: 0 1px 2px rgba(15, 21, 51, 0.12);
  --shadow-sm: 0 10px 24px -14px rgba(29, 41, 120, 0.35);
  --shadow-md: 0 24px 50px -28px rgba(29, 41, 120, 0.4);
  --shadow-lg: 0 46px 90px -44px rgba(29, 41, 120, 0.45);
  --glow-violet: 0 18px 46px -22px rgba(37, 99, 235, 0.4);
}
:root[data-theme="light"] body {
  background:
    radial-gradient(
      900px 520px at 12% -12%,
      rgba(124, 58, 237, 0.16),
      transparent 60%
    ),
    radial-gradient(
      960px 560px at 92% -4%,
      rgba(59, 130, 246, 0.2),
      transparent 58%
    ),
    radial-gradient(
      780px 520px at 50% 118%,
      rgba(56, 189, 248, 0.16),
      transparent 60%
    ),
    var(--bg);
}
:root[data-theme="light"] .eyebrow {
  color: #6d28d9;
}
:root[data-theme="light"] .category {
  color: #5b21b6;
  background: rgba(109, 40, 217, 0.12);
}
:root[data-theme="light"] .app-card[data-category="utilidades"] .category {
  color: #8a4b00;
  background: rgba(217, 119, 6, 0.14);
}
:root[data-theme="light"] .store-link,
:root[data-theme="light"] .catalog-footer a,
:root[data-theme="light"] .footer-links a:hover {
  color: #5b21b6;
}

/* ---------- Página de política (conteúdo textual) ---------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(30px, 4vw, 52px) 0 clamp(56px, 7vw, 88px);
}
.legal h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
  margin: 0 0 8px;
}
.legal .last-updated {
  display: block;
  text-align: right;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 30px;
}
.legal h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 40px 0 12px;
}
.legal h3 {
  font-size: clamp(17px, 1.9vw, 21px);
  margin: 28px 0 8px;
}
.legal h4 {
  font-size: clamp(15px, 1.6vw, 18px);
  margin: 22px 0 8px;
  color: var(--text);
}
.legal p,
.legal li {
  color: var(--text-2);
}
.legal p {
  margin: 0 0 16px;
}
.legal ul {
  padding-left: 22px;
  margin: 0 0 18px;
}
.legal li {
  margin-bottom: 8px;
}
.legal a {
  color: var(--blue-2);
  text-decoration-color: rgba(96, 165, 250, 0.45);
}
.legal a:hover {
  color: var(--text);
}
.legal strong {
  color: var(--text);
}
.legal .important-note-box {
  background: rgba(255, 176, 32, 0.09);
  border: 1px solid rgba(255, 176, 32, 0.4);
  border-left-width: 4px;
  border-radius: var(--r-sm);
  padding: 16px 18px;
  margin: 0 0 22px;
  color: #ffd98a;
  font-size: 14.5px;
  line-height: 1.7;
}
.legal .important-note-box strong,
.legal .important-note-box a {
  color: #ffd98a;
}
.legal .important-note-box a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal .contact-info {
  margin-top: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 26px;
}
.legal .contact-info h2 {
  margin-top: 0;
}
:root[data-theme="light"] .legal a {
  color: #2563eb;
  text-decoration-color: rgba(37, 99, 235, 0.4);
}
:root[data-theme="light"] .legal .important-note-box {
  background: rgba(255, 176, 32, 0.16);
  border-color: rgba(176, 118, 20, 0.45);
  color: #7a4400;
}
:root[data-theme="light"] .legal .important-note-box strong,
:root[data-theme="light"] .legal .important-note-box a {
  color: #7a4400;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1050px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    gap: 30px;
  }
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 44px 0 52px;
  }
  .hero-art {
    max-width: 560px;
  }
  .featured {
    grid-template-columns: 1fr;
  }
  .featured img {
    min-height: 0;
    aspect-ratio: 1024/500;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: calc(var(--header-h) + 60px);
  }
  .container {
    width: calc(100% - 36px);
  }
  .header-inner {
    min-height: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .nav a {
    padding: 8px 10px;
  }
  .nav .contact-link {
    border: 0;
    background: transparent;
    padding: 9px 10px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-links {
    align-items: flex-start;
  }
}
@media (max-width: 560px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .search-label {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .search-label input {
    width: 100%;
  }
  .support {
    flex-direction: column;
    align-items: flex-start;
  }
  .preview:nth-child(2),
  .preview:nth-child(3) {
    margin: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
