/**
 * Tema da plataforma.
 *
 * O claro é o padrão e mora no `:root`; o escuro é escolha explícita de quem
 * navega e mora em `[data-theme="dark"]`. De propósito não há
 * `prefers-color-scheme` aqui: quem usa o sistema no escuro continua chegando
 * no claro, como pedido, e troca no botão da barra se quiser.
 */
:root {
  color-scheme: light;

  --background: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --surface-3: #ededf1;
  --surface-sunken: #ffffff;
  --surface-inset: #eceef2;

  --text: #23252b;
  --text-strong: #0d0e12;
  --text-soft: #3f424a;
  --muted: #6b6e77;
  --faint: #8b8e96;

  --line: rgba(14, 15, 20, 0.14);
  --line-strong: rgba(14, 15, 20, 0.24);
  --line-strongest: rgba(14, 15, 20, 0.42);

  --tint-weak: rgba(14, 15, 20, 0.025);
  --tint: rgba(14, 15, 20, 0.045);
  --tint-strong: rgba(14, 15, 20, 0.075);
  --tint-stronger: rgba(14, 15, 20, 0.11);

  /* Superfície invertida: o botão que no escuro é branco, no claro é quase preto. */
  --invert-bg: #1b1d22;
  --invert-bg-hover: #34373f;
  --invert-text: #ffffff;

  --accent: #d8401f;
  --accent-dark: #ab2f13;
  --accent-text: #b5330f;
  --accent-soft: rgba(216, 64, 31, 0.12);
  --accent-2: #5b3ee0;
  --accent-3: #e8ab21;
  --on-accent: #ffffff;
  --on-accent-3: #3a2a05;

  --ok: #1c8a4c;
  --ok-dark: #16713d;
  --ok-soft: rgba(28, 138, 76, 0.13);
  --warn: #9a6f06;
  --warn-soft: rgba(154, 111, 6, 0.14);
  --danger: #c92a33;
  --danger-soft: rgba(201, 42, 51, 0.12);

  --shadow-color: rgba(20, 22, 30, 0.1);
  --scrim: rgba(18, 19, 24, 0.42);
  --topbar-bg: rgba(244, 244, 246, 0.86);
  /* Controles translúcidos sobre a página (chips, botões da barra). */
  --chip-bg: rgba(255, 255, 255, 0.78);
  --chip-bg-hover: rgba(255, 255, 255, 0.95);
  /* Chip sobre capa de app: a arte é escura nos dois temas, então o chip também. */
  --media-chip-bg: rgba(10, 10, 12, 0.6);
  --media-chip-strong: rgba(8, 9, 11, 0.72);
  --button-secondary-bg: rgba(20, 22, 28, 0.08);
  --button-secondary-bg-hover: rgba(20, 22, 28, 0.14);
  --shimmer-from: #ececef;
  --shimmer-to: #f8f8fa;


  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --background: #0a0a0c;
  --surface: #111318;
  --surface-2: #16181d;
  --surface-3: #1e2027;
  --surface-sunken: #0b0d11;
  --surface-inset: #101216;

  --text: #e7e8ec;
  --text-strong: #ffffff;
  --text-soft: #b2b5bd;
  --muted: #9b9aa4;
  --faint: #74767e;

  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --line-strongest: rgba(255, 255, 255, 0.45);

  --tint-weak: rgba(255, 255, 255, 0.03);
  --tint: rgba(255, 255, 255, 0.05);
  --tint-strong: rgba(255, 255, 255, 0.09);
  --tint-stronger: rgba(255, 255, 255, 0.14);

  --invert-bg: #ffffff;
  --invert-bg-hover: #dedee0;
  --invert-text: #101114;

  --accent: #ff5a3c;
  --accent-dark: #d63d21;
  --accent-text: #ff8f78;
  --accent-soft: rgba(255, 90, 60, 0.16);
  --accent-2: #7c5cff;
  --accent-3: #ffd166;
  --on-accent: #ffffff;
  --on-accent-3: #23180a;

  --ok: #58db8d;
  --ok-dark: #2f9c5e;
  --ok-soft: rgba(70, 209, 124, 0.14);
  --warn: #e8c04a;
  --warn-soft: rgba(229, 176, 9, 0.14);
  --danger: #ff626b;
  --danger-soft: rgba(229, 9, 20, 0.15);

  --shadow-color: rgba(0, 0, 0, 0.6);
  --scrim: rgba(0, 0, 0, 0.76);
  --topbar-bg: rgba(8, 9, 11, 0.92);
  --chip-bg: rgba(10, 11, 14, 0.72);
  --chip-bg-hover: rgba(20, 22, 28, 0.88);
  --media-chip-bg: rgba(10, 10, 12, 0.6);
  --media-chip-strong: rgba(8, 9, 11, 0.72);
  --button-secondary-bg: rgba(94, 94, 99, 0.68);
  --button-secondary-bg-hover: rgba(112, 112, 118, 0.8);
  --shimmer-from: #141519;
  --shimmer-to: #202126;


  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Nome antigo, mantido porque ainda há regra apontando para ele. */
:root {
  --surface-light: var(--surface-3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}


a {
  color: inherit;
  text-decoration: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  background: linear-gradient(180deg, var(--topbar-bg), transparent);
  transition: background 220ms ease, backdrop-filter 220ms ease;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  width: 100%;
  max-width: 1540px;
  padding: 0 clamp(22px, 4.3vw, 72px);
}

.topbar.scrolled {
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 12px 5px 12px 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand-mark svg {
  width: 20px;
  stroke-width: 2.1;
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.05);
}

.brand-word {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  text-transform: none;
}

.brand-word b {
  padding: 1px 6px;
  border-radius: 6px 2px 6px 2px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-right: auto;
}

.main-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-strong);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions,
.profile {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 20px;
  position: relative;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: width 240ms ease, background 240ms ease, border-color 240ms ease;
}

.search.open {
  width: min(250px, 34vw);
  border-color: var(--line);
  background: var(--chip-bg);
}

.search svg {
  position: absolute;
  left: 9px;
  z-index: 1;
  width: 20px;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 100%;
  padding: 0 12px 0 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-strong);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.search.open input {
  opacity: 1;
  pointer-events: auto;
}

.search input::placeholder {
  color: var(--muted);
}

.search > button {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.search.open > button {
  left: 0;
  width: 38px;
  right: auto;
}

.profile {
  gap: 8px;
  border: 0;
  color: var(--text-strong);
  background: transparent;
  cursor: pointer;
}

.profile span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, #e0303a, #8f050d);
  font-size: 11px;
  font-weight: 700;
}

.profile svg {
  width: 14px;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(720px, 78vh);
  padding: 132px clamp(22px, 5.1vw, 84px) 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  z-index: -2;
  inset: -20% -10% auto;
  height: 120%;
  background:
    radial-gradient(46% 40% at 18% 22%, rgba(255, 90, 60, 0.24), transparent 70%),
    radial-gradient(40% 38% at 82% 18%, rgba(124, 92, 255, 0.24), transparent 72%),
    radial-gradient(36% 32% at 62% 88%, rgba(255, 209, 102, 0.12), transparent 74%);
  filter: blur(6px);
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0);
  transition: transform 420ms ease-out;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-content {
  animation: hero-in 650ms 80ms ease-out both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 7px 14px 7px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-kicker i {
  color: var(--accent-3);
  font-size: 14px;
  font-style: normal;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(52px, 7.4vw, 118px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero h1 em {
  position: relative;
  font-style: normal;
  color: var(--accent);
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: 0.1em;
  left: 0;
  height: 0.09em;
  border-radius: 99px;
  background: var(--accent-3);
  transform: rotate(-1.2deg);
}

.hero-description {
  max-width: 46ch;
  margin-top: 26px;
  color: var(--text-soft);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 42px);
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.hero-stats dd {
  font-family: var(--mono);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Colagem de capas: cada peça em um plano diferente, girando com o ponteiro. */
.hero-collage {
  position: relative;
  height: clamp(300px, 34vw, 440px);
  perspective: 1100px;
  transform: translate3d(calc(var(--parallax-x, 0px) * -0.6), calc(var(--parallax-y, 0px) * -0.6), 0);
  transition: transform 420ms ease-out;
}

.collage-item {
  position: absolute;
  overflow: hidden;
  width: 56%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 70px var(--shadow-color);
  animation: collage-in 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--layer) * 110ms + 220ms);
}

.collage-item:nth-child(1) { top: 4%; left: 2%; transform: rotate(-7deg); z-index: 4; }
.collage-item:nth-child(2) { top: 26%; right: 0; transform: rotate(6deg); z-index: 3; }
.collage-item:nth-child(3) { bottom: 6%; left: 16%; transform: rotate(3deg); z-index: 2; }
.collage-item:nth-child(4) { top: 44%; left: 30%; width: 44%; transform: rotate(-3deg); z-index: 1; opacity: 0.9; }

@keyframes collage-in {
  from { opacity: 0; transform: translateY(28px) rotate(0deg) scale(0.94); }
}

.collage-cover,
.collage-item .app-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  transform: translateX(-50%);
  animation: float 2.4s ease-in-out infinite;
}

.hero-scroll svg {
  width: 18px;
}

@keyframes float {
  50% { transform: translate(-50%, 7px); }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 23px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button svg {
  width: 21px;
}

.button-primary {
  background: var(--invert-bg);
  color: var(--invert-text);
}

.button-primary:hover {
  background: var(--invert-bg-hover);
}

.button-primary svg {
  fill: currentColor;
  stroke: none;
}

.button-secondary {
  background: var(--button-secondary-bg);
  color: var(--text-strong);
  backdrop-filter: blur(7px);
}

.button-secondary:hover {
  background: var(--button-secondary-bg-hover);
}

.hero-scroll {
  position: absolute;
  bottom: 58px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strongest);
  border-radius: 50%;
  color: var(--text-strong);
  transform: translateX(-50%);
  animation: bob 2.3s ease-in-out infinite;
}

.hero-scroll svg {
  width: 18px;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

.catalog {
  position: relative;
  z-index: 2;
  min-height: 390px;
  max-width: 1540px;
  margin: 0 auto;
  padding: 46px clamp(22px, 5.1vw, 84px) 90px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2,
.modal-content h2 {
  font-size: clamp(24px, 2.1vw, 34px);
  letter-spacing: -0.035em;
}

.rail-controls {
  display: flex;
  gap: 8px;
}

.rail-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-strong);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.rail-controls button:hover {
  border-color: var(--line-strongest);
  background: var(--surface-3);
}

.rail-controls svg {
  width: 17px;
}

.apps-rail {
  display: grid;
  /* Cada card ocupa ~480px em telas grandes, mantendo proporção
     consistente sem esticar em monitores ultrawide. */
  grid-auto-columns: min(56%, 520px);
  grid-auto-flow: column;
  gap: 14px;
  padding: 12px 2px 30px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.apps-rail.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.apps-rail.dragging .app-card {
  pointer-events: none;
}

.apps-rail::-webkit-scrollbar {
  display: none;
}

.app-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  scroll-snap-align: start;
  outline: 0;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 220ms ease, box-shadow 220ms ease;
  animation: card-in 500ms ease both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-card:hover,
.app-card:focus-visible {
  z-index: 3;
  border-color: var(--line-strongest);
  box-shadow: 0 18px 45px var(--shadow-color);
  transform: translateY(-8px) scale(1.025);
}

.app-cover,
.app-fallback {
  width: 100%;
  height: 100%;
}

.app-cover {
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.app-card:hover .app-cover,
.app-card:focus-visible .app-cover {
  transform: scale(1.05);
}

.app-fallback {
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 30%, rgba(229, 9, 20, 0.72), transparent 24%),
    linear-gradient(135deg, #2b0b11, #101218 62%, #271317);
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(58px, 7vw, 98px);
  font-weight: 700;
  letter-spacing: -0.08em;
}

.app-fallback::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

/**
 * A capa do app é escura nos dois temas, então dentro do overlay os tokens
 * voltam a ser os de fundo escuro. Assim o contraste do card não depende do
 * tema da página e nenhuma regra filha precisa saber disso.
 */
.app-overlay {
  --text: #e7e8ec;
  --text-strong: #ffffff;
  --text-soft: #b8b8bc;
  --muted: #9b9aa4;
  --faint: #74767e;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --line-strongest: rgba(255, 255, 255, 0.45);
  --tint-weak: rgba(255, 255, 255, 0.03);
  --tint: rgba(255, 255, 255, 0.05);
  --tint-strong: rgba(255, 255, 255, 0.09);
  --tint-stronger: rgba(255, 255, 255, 0.14);
  --chip-bg: rgba(8, 9, 11, 0.72);
  --chip-bg-hover: rgba(24, 26, 32, 0.9);
  --invert-bg: #ffffff;
  --invert-bg-hover: #dedee0;
  --invert-text: #101114;

  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: var(--text-strong);
  background: linear-gradient(0deg, rgba(6, 6, 9, 0.95) 0%, rgba(6, 6, 9, 0.8) 35%, rgba(6, 6, 9, 0.3) 55%, transparent 80%);
}

.card-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.card-label::before {
  content: "";
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
}

.app-info {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
}

.app-info h3 {
  font-size: clamp(18px, 1.6vw, 25px);
  letter-spacing: -0.025em;
}

.app-info p {
  max-width: 88%;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-card:hover .app-info p,
.app-card:focus-visible .app-info p {
  opacity: 1;
  transform: translateY(0);
}

/*
  O play é o único ponto do card que abre o app: o resto da superfície é o
  `.card-link`, que leva à página dele. Por isso ele sobe acima daquela camada
  (z-index 2) em vez de ficar por baixo, decorativo.
*/
.card-open {
  position: relative;
  z-index: 3;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strongest);
  border-radius: 50%;
  background: var(--invert-bg);
  color: var(--invert-text);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card-open:hover,
.card-open:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px var(--tint-stronger);
}

.card-open svg {
  width: 15px;
  fill: currentColor;
  stroke: none;
  transform: translateX(1px);
}

.loading-card {
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background: linear-gradient(100deg, var(--shimmer-from) 30%, var(--shimmer-to) 50%, var(--shimmer-from) 70%);
  background-size: 300% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to { background-position-x: -150%; }
}

.empty-state {
  padding: 45px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--surface-light);
}

.empty-icon svg {
  width: 22px;
}

.empty-state h3 {
  color: var(--text-strong);
  font-size: 19px;
}

.empty-state p {
  margin-top: 6px;
  font-size: 14px;
}

.empty-state button {
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-strong);
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
}

.details-modal {
  position: fixed;
  z-index: 100;
  top: 50%;
  left: 50%;
  width: min(660px, calc(100vw - 34px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 28px 90px var(--shadow-color);
  transform: translate(-50%, -50%);
  animation: modal-in 200ms ease-out;
}

.details-modal[hidden],
.modal-overlay[hidden] {
  display: none;
}

@keyframes modal-in {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.98); }
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--text-strong);
  cursor: pointer;
}

.modal-close svg {
  width: 18px;
}

.modal-content {
  padding: 2px 30px 30px;
}

.modal-content p {
  margin: 13px 0 22px;
  color: var(--text-soft);
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .topbar {
    height: 66px;
  }

  .topbar-inner {
    padding-inline: 18px;
  }

  .main-nav {
    display: none;
  }

  .brand {
    margin-right: auto;
    font-size: 19px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }

  .profile svg {
    display: none;
  }

  .hero {
    align-items: end;
    min-height: 690px;
    padding: 100px 20px 125px;
  }

  .hero-backdrop {
    background-position: 62% center;
  }

  .hero-backdrop::before {
    background: linear-gradient(0deg, rgba(8, 9, 11, 0.98) 0%, rgba(8, 9, 11, 0.66) 55%, rgba(8, 9, 11, 0.18) 100%);
  }

  .hero-content {
    width: 100%;
  }

  .hero h1 {
    max-width: 520px;
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-description {
    max-width: 520px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .hero-scroll {
    display: none;
  }

  .catalog {
    margin-top: -58px;
    padding: 24px 20px 70px;
  }

  .apps-rail {
    grid-auto-columns: 84%;
  }

  .rail-controls {
    display: none;
  }

  .app-info p {
    display: none;
  }
}

@media (max-width: 470px) {
  .search.open {
    position: absolute;
    right: 65px;
    width: calc(100vw - 145px);
  }

  .hero-actions .button {
    flex: 1 1 auto;
    padding-inline: 16px;
  }

  .hero-actions .button-secondary {
    flex-basis: 100%;
  }

  .modal-content {
    padding-inline: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sign-in {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--chip-bg);
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sign-in:hover { border-color: var(--line-strongest); background: var(--tint-strong); }
.profile { position: relative; }
.profile img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.profile-menu {
  position: absolute;
  top: 62px;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(270px, calc(100vw - 32px));
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 18px 55px var(--shadow-color);
}
.profile-menu strong { font-size: 13px; }
.profile-menu small { margin-top: 3px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.profile-menu button { margin-top: 14px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-3); color: var(--text-strong); cursor: pointer; }

.app-card.locked::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(8, 9, 11, 0.8) center / 13px no-repeat;
  box-shadow: inset 0 0 0 1px var(--tint-stronger);
}

.auth-modal {
  position: fixed;
  z-index: 110;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(430px, calc(100vw - 34px));
  padding: 42px 36px 34px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: radial-gradient(circle at 50% 0, var(--accent-soft), transparent 42%), var(--surface-2);
  box-shadow: 0 28px 90px var(--shadow-color);
  text-align: center;
  transform: translate(-50%, -50%);
}
.auth-modal[hidden] { display: none; }
.auth-modal .brand-mark { width: 42px; height: 42px; border-radius: 10px 3px; font-size: 25px; }
.auth-modal h2 { margin-top: 20px; font-size: 28px; letter-spacing: -0.04em; }
.auth-modal p { margin-top: 10px; color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.auth-modal > small { margin-top: 15px; color: var(--faint); font-size: 10px; line-height: 1.5; }
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  margin-top: 25px;
  border-radius: 8px;
  background: var(--invert-bg);
  color: var(--invert-text);
  font-size: 13px;
  font-weight: 700;
}
.google-button svg { width: 20px; stroke: none; }
.google-button.disabled { pointer-events: none; opacity: 0.52; }

.submission-panel { padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.submission-login { padding: 42px 18px; text-align: center; }
.submission-login h3, .my-submissions h3 { font-size: 20px; }
.submission-login p { margin: 8px 0 24px; color: var(--muted); font-size: 13px; }
.submission-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.submission-fields label, .submission-rules { color: var(--text); font-size: 11px; font-weight: 700; }
.submission-fields label { display: flex; flex-direction: column; gap: 7px; }
.submission-fields .wide { grid-column: 1 / -1; }
.submission-fields input, .submission-fields select, .submission-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--surface-sunken);
  color: var(--text-strong);
  font: inherit;
  font-weight: 500;
}
.submission-fields input, .submission-fields select { height: 46px; padding: 0 12px; }
.submission-fields textarea { padding: 12px; resize: vertical; }
.submission-fields input:focus, .submission-fields select:focus, .submission-fields textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.upload-field { padding: 15px; border: 1px dashed var(--line-strong); border-radius: 9px; }
.upload-field input { height: auto; padding: 9px 0; border: 0; background: transparent; }
.upload-field small { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.submission-rules { display: flex; gap: 10px; margin: 18px 0; color: var(--muted); font-weight: 500; line-height: 1.5; }
.submission-rules input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--accent); }
#submission-submit { width: 100%; border: 0; cursor: pointer; }
#submission-submit:disabled { cursor: wait; opacity: .55; }
.submission-feedback { min-height: 20px; margin-top: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.submission-feedback.success { color: var(--ok); }.submission-feedback.error { color: var(--danger); }
.my-submissions { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
#submission-list { display: grid; gap: 9px; margin-top: 14px; }
.submission-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.submission-item strong { font-size: 12px; }.submission-item small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.4; }
.submission-status { align-self: start; padding: 5px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.submission-status.approved { background: rgba(70,209,124,.14); color: var(--ok); }.submission-status.rejected,.submission-status.failed { background: rgba(229,9,20,.15); color: var(--danger); }

@media (max-width: 560px) {
  .submission-fields { grid-template-columns: 1fr; }
  .submission-fields .wide { grid-column: auto; }
}

/* ---- Créditos do autor, ações do card e compartilhamento ---- */

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  color: var(--text);
  text-align: left;
}

.author-chip img,
.author-initials {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.author-initials {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--tint-strong);
  font-size: 11px;
  font-weight: 700;
}

.author-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.25;
}

.author-text small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.author-text strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.author-chip:hover .author-text strong {
  text-decoration: underline;
}

.author-chip.large img,
.author-chip.large .author-initials {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.author-chip.large .author-text strong {
  font-size: 14px;
}

.card-link {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.card-footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.card-action:hover {
  border-color: var(--line-strongest);
  background: var(--tint-stronger);
}

.card-action svg {
  width: 14px;
  flex: 0 0 auto;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tint);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.share-button:hover {
  border-color: var(--line-strongest);
  background: var(--tint-strong);
}

.share-button svg {
  width: 15px;
}

.share-feedback {
  min-height: 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.profile-menu a {
  margin-top: 14px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--tint);
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.profile-menu a:hover {
  background: var(--tint-strong);
}

.profile-menu button {
  margin-top: 8px;
}

.dashboard-link {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .card-footer .author-text small {
    display: none;
  }

  .card-action span {
    display: none;
  }

  .card-action {
    padding: 8px;
  }
}

/* ================= Jornada 42: textura, destaques, filtros e 3D ================= */

/* Grão sutil por cima de tudo: tira o aspecto "template" das áreas chapadas. */
body::after {
  content: "";
  position: fixed;
  z-index: 200;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
}

.eyebrow {
  font-family: var(--mono);
  letter-spacing: 0.1em;
}

.section-note {
  max-width: 34ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

/* ---- Destaques ---- */

.highlights {
  position: relative;
  z-index: 2;
  max-width: 1540px;
  margin: 0 auto;
  padding: 20px clamp(22px, 5.1vw, 84px) 10px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 22px;
  perspective: 1200px;
}

.highlight-grid .loading-card {
  aspect-ratio: 4 / 5;
}

.highlight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), var(--surface);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 220ms ease, box-shadow 260ms ease;
}

.highlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(220px circle at var(--glow-x, 50%) var(--glow-y, 0%), rgba(255, 255, 255, 0.16), transparent 70%);
  transition: opacity 240ms ease;
}

.highlight-card:hover {
  border-color: var(--line-strongest);
  box-shadow: 0 32px 70px var(--shadow-color);
}

.highlight-card:hover::after {
  opacity: 1;
}

.highlight-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-light);
}

.highlight-cover,
.highlight-art .app-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.highlight-card:hover .highlight-cover {
  transform: scale(1.06);
}

.highlight-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
}

.highlight-rank {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.highlight-body h3 {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.highlight-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.highlight-body .author-chip {
  margin-top: auto;
  padding-top: 12px;
}

.highlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.highlight-actions .button {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 13px;
}

/* ---- Filtros ---- */

.catalog-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tint-weak);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.filter-chip:hover {
  border-color: var(--line-strongest);
  transform: translateY(-1px);
}

.filter-chip i {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
}

.filter-chip.active {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.filter-chip.active i {
  color: rgba(255, 255, 255, 0.75);
}

.filter-chip.small {
  padding: 7px 11px;
  font-size: 12px;
}

.filter-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-toggle,
.filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.filter-toggle svg {
  width: 15px;
}

.filter-toggle:hover,
.filter-clear:hover {
  border-color: var(--line-strongest);
  color: var(--text-strong);
}

.filter-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--text-strong);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 10px;
}

.filter-clear {
  color: var(--muted);
}

.advanced-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--tint-weak);
  animation: panel-in 220ms ease-out;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-6px); }
}

.advanced-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.advanced-field.wide {
  grid-column: 1 / -1;
}

.advanced-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.advanced-field select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface-sunken);
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.advanced-field select:focus {
  border-color: var(--accent);
}

.catalog-count {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* ---- Cartões com profundidade ---- */

.apps-rail {
  perspective: 1400px;
}

.app-card {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  border-radius: 16px;
}

.app-card:hover,
.app-card:focus-within {
  z-index: 3;
  border-color: var(--line-strongest);
  box-shadow: 0 26px 60px var(--shadow-color);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-6px) scale(1.015);
}

.app-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 255, 255, 0.14), transparent 68%);
  transition: opacity 240ms ease;
}

.app-card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.card-category {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--media-chip-bg);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.card-metrics {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.app-fallback {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 90, 60, 0.6), transparent 26%),
    linear-gradient(135deg, #2a1420, #111218 62%, #1d1430);
}

/* ---- Chamada para criar ---- */

/* O painel é arte escura nos dois temas: dentro dele os tokens voltam ao escuro. */
.creator-cta {
  --text: #e7e8ec;
  --text-strong: #ffffff;
  --text-soft: #b2b5bd;
  --muted: #9b9aa4;
  --faint: #74767e;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --line-strongest: rgba(255, 255, 255, 0.45);
  --tint-weak: rgba(255, 255, 255, 0.03);
  --tint: rgba(255, 255, 255, 0.05);
  --tint-strong: rgba(255, 255, 255, 0.09);
  --tint-stronger: rgba(255, 255, 255, 0.14);
  --surface: #16181d;
  --surface-2: #1e2027;
  --chip-bg: rgba(8, 9, 11, 0.72);
  --chip-bg-hover: rgba(24, 26, 32, 0.9);
  --invert-bg: #ffffff;
  --invert-bg-hover: #dedee0;
  --invert-text: #101114;
  --accent: #ff5a3c;
  --accent-text: #ff8f78;
  --accent-soft: rgba(255, 90, 60, 0.16);
  --button-secondary-bg: rgba(94, 94, 99, 0.68);
  --button-secondary-bg-hover: rgba(112, 112, 118, 0.8);

  position: relative;
  color: var(--text);
  max-width: 1080px;
  margin: 40px auto 110px;
  padding: clamp(40px, 6vw, 76px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(255, 90, 60, 0.16), transparent 62%),
    radial-gradient(60% 80% at 100% 100%, rgba(124, 92, 255, 0.18), transparent 60%),
    #101118;
  overflow: hidden;
}

.cta-sticker {
  position: absolute;
  top: 26px;
  right: -46px;
  padding: 9px 54px;
  background: var(--accent-3);
  color: var(--on-accent-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(34deg);
}

.creator-cta h2 {
  margin: 12px 0 18px;
  max-width: 16ch;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.creator-cta > .cta-content > p {
  max-width: 60ch;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.cta-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.cta-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tint-weak);
}

.cta-steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px 3px 10px 3px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 13px;
}

.cta-steps span {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.cta-actions .button svg {
  width: 18px;
}

/* ---- Rodapé ---- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1540px;
  margin: 0 auto;
  padding: 34px clamp(22px, 5.1vw, 84px);
}

.footer-inner nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-inner nav a {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.footer-inner nav a:hover {
  color: var(--text-strong);
}

.footer-inner small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 980px) {
  .hero {
    padding-top: 150px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-collage {
    display: none;
  }

  .section-note {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: auto;
    padding-top: 116px;
  }

  .hero h1 {
    max-width: none;
  }

  .catalog-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    white-space: nowrap;
  }

  .tag-chips {
    flex-wrap: wrap;
  }

  .cta-sticker {
    display: none;
  }

  .footer-inner {
    justify-content: flex-start;
  }
}

/* ---- Capa reservada a quem entrou ---- */

.apps-rail img,
.apps-rail a,
.highlight-grid img,
.hero-collage img {
  -webkit-user-drag: none;
}

/* Capa bloqueada também é arte escura: escopa os tokens para os filhos, aqui
   e no app.css, lerem contraste de fundo escuro em qualquer tema. */
.cover-locked {
  --text: #e7e8ec;
  --text-strong: #ffffff;
  --text-soft: #b9b6c2;
  --muted: #9b9aa4;
  --line: rgba(255, 255, 255, 0.12);
  --line-strongest: rgba(255, 255, 255, 0.45);
  --accent-3: #ffd166;

  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #241624, #12131a 60%, #1b1430);
  color: var(--text-soft);
  text-align: center;
}

.cover-locked svg {
  width: 26px;
  color: var(--accent-3);
  stroke-width: 1.8;
}

.cover-locked span,
.cover-locked strong {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-fallback.cover-locked::after {
  border-style: dashed;
}

/* Na página do aplicativo o bloqueio é o próprio convite para entrar. */
.about-cover.cover-locked {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border-style: dashed;
  text-decoration: none;
  transition: border-color 200ms ease, transform 200ms ease;
}

.about-cover.cover-locked:hover {
  border-color: var(--line-strongest);
  transform: translateY(-2px);
}

.about-cover.cover-locked svg {
  width: 34px;
}

.about-cover.cover-locked strong {
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-transform: none;
}

.about-cover.cover-locked span {
  max-width: 34ch;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

/* ---- Alternador de tema ---- */

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--chip-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--chip-bg-hover);
  color: var(--text-strong);
}

.theme-toggle svg {
  width: 19px;
  stroke-width: 1.9;
}

/* Cada tema mostra o ícone do destino, não o do estado atual. */
.theme-toggle .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-light {
  display: block;
}

[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: none;
}

/* ---------- versões de aplicativos ---------- */
/* O aviso de que o envio vai substituir um app que já está no ar. */
.submission-update-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 16px;
  border: 1px dashed rgba(120, 190, 255, .45); border-radius: 12px;
  background: rgba(120, 190, 255, .08); font-size: 14px;
}
.submission-update-banner[hidden] { display: none; }
.submission-update-banner button {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: inherit; opacity: .7; text-decoration: underline; font: inherit;
}
.submission-version {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px;
  font-size: 11px; letter-spacing: .04em; vertical-align: middle;
  background: rgba(255, 255, 255, .1);
}
.submission-item .submission-update { margin-top: 8px; justify-self: start; }
/* A data de última atualização, logo abaixo das métricas do app. */
.about-updated {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 0; font-size: 13px; opacity: .75;
}
.about-updated span { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; opacity: .8; }
.about-updated time { font-weight: 600; opacity: 1; }

/* Ação destrutiva do painel: desabilitar tira o app do ar para todo mundo. */
.card-action-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.card-action-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.card-action-locked { opacity: .6; cursor: not-allowed; }
