:root {
  color-scheme: dark;
  --text: #ffffff;
  --muted: rgba(255,255,255,.78);
  --card: rgba(3, 18, 37, .70);
  --card-border: rgba(255,255,255,.22);
  --shadow: 0 24px 70px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #06172c;
  overflow-x: hidden;
  text-transform: uppercase;
}

.page-bg, .veil { position: fixed; inset: 0; }
.page-bg { z-index: -3; overflow: hidden; background: #06172c; }
.page-bg picture, .page-bg img { width: 100%; height: 100%; display: block; }
.page-bg img { object-fit: cover; object-position: center center; transform: scale(1.015); }
.veil {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(2,9,21,.38) 0%, rgba(2,9,21,.50) 48%, rgba(2,9,21,.74) 100%),
    radial-gradient(circle at 50% 35%, rgba(0,0,0,.08), rgba(0,0,0,.42) 80%);
  backdrop-filter: saturate(.95);
}

.portal-shell {
  width: min(1480px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(34px, 5vh, 70px) 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portal-header { text-align: center; text-shadow: 0 3px 18px rgba(0,0,0,.55); }
.eyebrow {
  font-size: clamp(.72rem, .9vw, .9rem);
  letter-spacing: .34em;
  font-weight: 700;
  color: rgba(255,255,255,.82);
}
.portal-header h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4.3vw, 4.5rem);
  line-height: .95;
  letter-spacing: .07em;
  font-weight: 850;
}
.lead {
  margin: 0 auto;
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(.78rem, 1.1vw, 1.05rem);
  letter-spacing: .14em;
  font-weight: 650;
}

.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: clamp(28px, 5vh, 54px) 0 24px;
}

.app-card {
  min-height: 390px;
  padding: 30px 28px 26px;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.025) 38%),
    var(--card);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  opacity: .95;
}
.app-card--gestao::before { background: linear-gradient(#31d6ff, #1876ff); }
.app-card--uniformes::before { background: linear-gradient(#55d58b, #0e7a50); }
.app-card--scout::before { background: linear-gradient(#d34cff, #6e43ff); }
.app-card:hover, .app-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(255,255,255,.52);
  background:
    linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.045) 42%),
    rgba(3,18,37,.82);
  box-shadow: 0 30px 85px rgba(0,0,0,.52);
  outline: none;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  margin-bottom: 24px;
}
.app-icon svg { width: 31px; height: 31px; fill: #fff; }
.app-kicker {
  color: rgba(255,255,255,.66);
  letter-spacing: .14em;
  font-weight: 700;
  font-size: .70rem;
}
.app-card h2 {
  margin: 8px 0 14px;
  font-size: clamp(1.35rem, 1.8vw, 2rem);
  line-height: 1.05;
  letter-spacing: .02em;
}
.app-card p {
  margin: 0 0 26px;
  color: rgba(255,255,255,.84);
  font-size: .88rem;
  line-height: 1.65;
  letter-spacing: .025em;
  text-transform: none;
}
.app-card p::first-letter { text-transform: uppercase; }
.open-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .09em;
}
.open-link span { font-size: 1.2rem; transition: transform .2s ease; }
.app-card:hover .open-link span { transform: translateX(5px); }

.portal-footer {
  text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,.65);
  margin-top: 8px;
  letter-spacing: .13em;
  font-size: .75rem;
  color: rgba(255,255,255,.84);
}
.portal-footer small {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.56);
  letter-spacing: .09em;
  font-size: .63rem;
}

@media (max-width: 980px) {
  .portal-shell { width: min(760px, calc(100% - 30px)); justify-content: flex-start; }
  .apps { grid-template-columns: 1fr; gap: 14px; margin-top: 30px; }
  .app-card { min-height: 0; padding: 24px 22px; }
  .app-icon { width: 50px; height: 50px; border-radius: 15px; margin-bottom: 17px; }
  .app-card p { margin-bottom: 18px; }
  .page-bg img { object-position: center center; }
}

@media (max-width: 560px) {
  .portal-shell { width: calc(100% - 22px); padding-top: 26px; }
  .portal-header h1 { line-height: 1.04; }
  .eyebrow { letter-spacing: .20em; }
  .lead { line-height: 1.55; letter-spacing: .08em; }
  .app-card { border-radius: 20px; }
  .app-card p { font-size: .83rem; line-height: 1.55; }
  .portal-footer { padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Descanso: conserva o layout e a posição de rolagem. */
.portal-shell, .veil {
  opacity: 1;
  transition: opacity 280ms ease, visibility 0s;
}
body.is-idle .portal-shell, body.is-idle .veil {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 0s 280ms;
}
body.is-idle { cursor: none; }
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
