:root {
  --bg: #08090d;
  --surface: #111319;
  --surface-soft: #171a22;
  --text: #f8f8fa;
  --muted: #a9acb7;
  --line: rgba(255, 255, 255, 0.09);
  --brand: #ed2024;
  --brand-dark: #a90f17;
  --orange: #ff7a1a;
  --blue: #3f8cff;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(circle at 8% 8%, rgba(237, 32, 36, 0.13), transparent 26rem),
    radial-gradient(circle at 90% 40%, rgba(237, 32, 36, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: 94px; height: 42px; object-fit: contain; }

.main-nav { display: flex; max-width: calc(100% - 118px); align-items: center; gap: 6px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #20232c; color: #fff; }
.main-nav span { padding: 9px 12px; color: var(--muted); font-size: 0.92rem; font-weight: 700; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 250px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0b0c11 url('../img/banner.png') center/cover no-repeat;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 8, 12, 0.78) 0%, rgba(7, 8, 12, 0.46) 52%, rgba(7, 8, 12, 0.18) 100%),
    linear-gradient(0deg, rgba(8, 9, 13, 0.74) 0%, transparent 52%);
}

.hero-content { padding: 34px 0 30px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #ffb2b4;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before { width: 24px; height: 2px; content: ""; background: var(--brand); }
.hero h1 { max-width: 850px; margin: 0; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.02; letter-spacing: -0.05em; }
.hero p { max-width: 760px; margin: 12px 0 0; color: #d4d5db; font-size: clamp(0.94rem, 1.6vw, 1.08rem); line-height: 1.5; }
.compact-hero { min-height: 230px; }
.landing-hero { min-height: 225px; }

.catalogue { padding: 30px 0 72px; }
.catalogue-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-title { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -0.035em; }
.section-subtitle { margin: 8px 0 0; color: var(--muted); }

.search-wrap { position: relative; width: min(100%, 360px); }
.search-wrap svg { position: absolute; top: 50%; left: 16px; width: 19px; color: #7f838e; transform: translateY(-50%); pointer-events: none; }
.search-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
}
.search-input:focus { border-color: rgba(237, 32, 36, 0.65); box-shadow: 0 0 0 4px rgba(237, 32, 36, 0.12); }

.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; }

.platform-section { padding: 30px 0 72px; }
.platform-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.platform-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(29, 31, 40, 0.98), rgba(14, 16, 22, 0.98));
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.platform-card:hover, .platform-card:focus-visible { transform: translateY(-4px); border-color: rgba(237, 32, 36, 0.5); background: linear-gradient(145deg, rgba(42, 29, 34, 0.98), rgba(18, 17, 23, 0.98)); outline: none; }
.platform-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: auto; border-radius: 14px; background: rgba(237, 32, 36, 0.12); color: #ff696c; }
.platform-icon svg { width: 27px; height: 27px; }
.platform-card strong { margin-top: 20px; font-size: 1.08rem; }
.platform-card > span:last-child { margin-top: 6px; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

.entry-page { height: 100vh; overflow: hidden; }
.entry-background { min-height: 100vh; filter: blur(8px) saturate(0.72); transform: scale(1.025); transform-origin: center; }
.entry-preview { padding: 30px 0 60px; }
.entry-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.entry-preview-grid div { overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.entry-preview-grid img { width: 100%; height: 100%; display: block; object-fit: cover; }
.device-modal-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; overflow: auto; background: rgba(4, 5, 8, 0.55); backdrop-filter: blur(10px); }
.device-modal { width: min(100%, 1010px); max-height: calc(100vh - 48px); overflow: auto; padding: 30px; border: 1px solid rgba(255,255,255,.14); border-radius: 28px; background: rgba(15, 17, 23, 0.96); box-shadow: 0 36px 110px rgba(0,0,0,.72); }
.device-modal-logo { width: 88px; height: 42px; display: block; object-fit: contain; margin-bottom: 12px; }
.device-modal .eyebrow { margin-bottom: 8px; }
.device-modal h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -.045em; }
.device-modal-lead { margin: 12px 0 24px; color: var(--muted); line-height: 1.55; }
.device-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.device-option { min-height: 168px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, #20232c, #15171e); text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.device-option:hover, .device-option:focus-visible { transform: translateY(-3px); border-color: rgba(237,32,36,.72); background: linear-gradient(150deg, #2a2229, #18171d); outline: 3px solid rgba(237,32,36,.28); outline-offset: 2px; }
.device-option-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 14px; background: rgba(237,32,36,.12); color: #ff676a; }
.device-option-icon svg { width: 34px !important; height: 34px !important; max-width: 34px; max-height: 34px; }
.device-option-copy { display: flex; flex-direction: column; margin-top: auto; padding-top: 18px; }
.device-option-copy strong { font-size: 1.08rem; }
.device-option-copy small { margin-top: 6px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.device-arrow { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.device-modal-secondary { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; color: var(--muted); font-size: .85rem; }
.device-modal-secondary a { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #e6e7ea; text-decoration: none; }
.device-modal-secondary a:hover, .device-modal-secondary a:focus-visible { border-color: rgba(237,32,36,.55); color: #fff; outline: none; }

.apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.app-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(27, 29, 38, 0.98), rgba(14, 16, 22, 0.98));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}
.app-card:hover, .app-card:focus-within { transform: translateY(-5px); border-color: rgba(237, 32, 36, 0.42); }
.app-card.is-featured::after {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(7, 8, 12, 0.82);
  color: #ffd0d1;
  content: "Destaque";
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.app-cover { overflow: hidden; aspect-ratio: 16 / 9; background: #0b0c10; }
.app-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 300ms ease; }
.app-card:hover .app-cover img { transform: scale(1.025); }
.app-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.app-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.76rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.app-name { margin: 12px 0 4px; font-size: 1.33rem; line-height: 1.2; letter-spacing: -0.025em; }
.app-description { margin: 4px 0 18px; color: var(--muted); font-size: 0.91rem; line-height: 1.55; }
.device-line { margin: 6px 0; color: #d3d4da; font-size: 0.87rem; line-height: 1.5; }
.partner-badge { width: max-content; padding: 6px 9px; border-radius: 999px; background: rgba(255, 122, 26, 0.12); color: #ffc08f; font-size: 0.66rem; }
.partner-badge.is-own { background: rgba(63, 140, 255, 0.14); color: #b9d3ff; }
.info-note { margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; background: rgba(237, 32, 36, 0.08); color: #e2e3e7; font-size: 0.86rem; line-height: 1.5; }
.app-actions { display: grid; gap: 10px; margin-top: auto; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.65); outline-offset: 2px; }
.button-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 12px 28px rgba(197, 16, 26, 0.25); }
.button-secondary { border-color: var(--line); background: #22252e; color: #f2f3f5; }
.button-secondary:hover { border-color: rgba(255, 255, 255, 0.17); background: #2a2e38; }
.button-config { border-color: rgba(63, 140, 255, 0.28); background: rgba(63, 140, 255, 0.13); color: #b9d3ff; }
.button-code { width: 100%; border-color: rgba(255, 122, 26, 0.3); background: rgba(255, 122, 26, 0.12); color: #ffc08f; }
.button svg { width: 19px; height: 19px; flex: 0 0 auto; }
.provider { padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); text-align: center; font-size: 0.9rem; }

.empty-state { display: none; padding: 42px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state.is-visible { display: block; }
.catalog-empty { padding: 50px 24px; border: 1px dashed rgba(255,255,255,.15); border-radius: var(--radius); background: rgba(255,255,255,.025); text-align: center; }
.catalog-empty span { color: #ff8d90; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.catalog-empty h3 { margin: 10px 0 8px; font-size: 1.35rem; }
.catalog-empty p { margin: 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 0.86rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }

.download-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; background: #090a0e url('../img/banner.png') center/cover fixed no-repeat; }
.download-page::before { position: fixed; inset: 0; content: ""; background: rgba(7, 8, 12, 0.88); backdrop-filter: blur(8px); }
.download-panel { position: relative; z-index: 1; width: min(100%, 610px); padding: clamp(26px, 6vw, 52px); border: 1px solid var(--line); border-radius: 28px; background: rgba(17, 19, 25, 0.96); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58); text-align: center; }
.download-logo { width: 122px; height: 60px; object-fit: contain; }
.download-icon { width: 76px; height: 76px; display: grid; place-items: center; margin: 24px auto 22px; border-radius: 50%; background: rgba(237, 32, 36, 0.12); color: #ff5a5d; }
.download-icon svg { width: 36px; height: 36px; animation: pulse 1.5s ease-in-out infinite; }
.download-panel h1 { margin: 0; font-size: clamp(1.75rem, 5vw, 2.65rem); letter-spacing: -0.045em; }
.download-panel .lead { margin: 14px auto 0; color: var(--muted); line-height: 1.65; }
.download-app { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.025); }
.download-app strong { display: block; font-size: 1.05rem; }
.download-app span { color: var(--muted); font-size: 0.86rem; }
.progress-track { height: 7px; margin: 26px 0 12px; overflow: hidden; border-radius: 99px; background: #292c34; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-dark), #ff4c50); animation: prepare 2.6s ease-out forwards; }
.countdown { min-height: 24px; margin: 0 0 20px; color: #d7d8dc; font-size: 0.92rem; }
.download-actions { display: grid; gap: 10px; }
.download-help { margin: 20px 0 0; color: #858994; font-size: 0.8rem; line-height: 1.55; }
.back-link { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 0.86rem; text-decoration: none; }
.back-link:hover { color: #fff; }
.error-icon { color: #ffb15c; background: rgba(255, 177, 92, 0.11); }

@keyframes pulse { 50% { transform: translateY(4px); opacity: 0.65; } }
@keyframes prepare { to { width: 100%; } }

@media (max-width: 900px) {
  .apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { min-height: 225px; }
  .device-options { grid-template-columns: 1fr; }
  .device-option { min-height: 96px; display: grid; grid-template-columns: 48px 1fr; gap: 15px; align-items: center; }
  .device-option-copy { margin: 0; padding: 0; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 62px; gap: 12px; }
  .brand img { width: 72px; height: 38px; }
  .main-nav { max-width: calc(100% - 84px); }
  .main-nav a { padding: 8px 9px; font-size: 0.78rem; }
  .main-nav span { padding: 8px 9px; font-size: .78rem; }
  .hero { min-height: 205px; }
  .hero-content { padding: 28px 0 25px; }
  .catalogue { padding-top: 26px; }
  .catalogue-toolbar { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
  .apps-grid { grid-template-columns: 1fr; }
  .platform-section { padding-top: 22px; }
  .platform-grid { grid-template-columns: 1fr; gap: 12px; }
  .platform-card { min-height: 132px; }
  .device-modal-overlay { padding: 12px; align-items: center; }
  .device-modal { max-height: calc(100vh - 24px); padding: 22px 18px; border-radius: 22px; }
  .device-modal-logo { width: 72px; height: 34px; }
  .device-modal-lead { margin-bottom: 18px; font-size: .9rem; }
  .device-options { gap: 10px; }
  .device-option { min-height: 84px; padding: 14px; }
  .device-option-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .device-option-copy small { font-size: .76rem; }
  .device-modal-secondary { flex-wrap: wrap; margin-top: 14px; }
  .app-body { padding: 19px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}

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