/* =============================================================================
   WR UNIVERSE — sistema de design das páginas públicas
   Usado por index.php, registro.php, regras.php, termos-uso.php e privacidade.php.
   Nada aqui entra na partida: partida.php tem o seu próprio assets/css/partida.
   ========================================================================== */

:root {
    --wr-ink:        #04060e;
    --wr-ink-2:      #070b18;
    --wr-surface:    rgba(13, 19, 34, .62);
    --wr-surface-2:  rgba(9, 14, 27, .82);
    --wr-line:       rgba(148, 163, 184, .16);
    --wr-line-soft:  rgba(148, 163, 184, .09);

    --wr-text:       #eef2f9;
    --wr-muted:      #98a6bf;
    --wr-dim:        #6b7a94;

    --wr-cyan:       #2ad6ef;
    --wr-violet:     #8b7cf6;
    --wr-amber:      #fbbf24;
    --wr-lime:       #a3e635;
    --wr-rose:       #fb7185;

    --wr-r-sm: 10px;
    --wr-r-md: 14px;
    --wr-r-lg: 20px;
    --wr-r-xl: 28px;

    --wr-shadow-sm: 0 2px 8px rgba(2, 6, 18, .34);
    --wr-shadow-md: 0 14px 34px -14px rgba(2, 6, 18, .74);
    --wr-shadow-lg: 0 34px 72px -30px rgba(2, 6, 18, .9);
    --wr-glow-cyan: 0 0 0 1px rgba(42, 214, 239, .18), 0 18px 48px -22px rgba(42, 214, 239, .55);

    --wr-ease: cubic-bezier(.2, .7, .3, 1);
}

/* --- base ---------------------------------------------------------------- */

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body.wr-body {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--wr-ink);
    color: var(--wr-text);
    min-height: 100vh;
    font-feature-settings: 'ss01' 1, 'cv11' 1;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* O fundo é uma camada fixa, não um background do body: assim o gradiente não
   se estica nem se repete em páginas longas como o manual de regras. */
.wr-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(1100px 620px at 12% -8%,  rgba(42, 214, 239, .16), transparent 62%),
        radial-gradient(900px  560px at 88% -4%,  rgba(139, 124, 246, .17), transparent 60%),
        radial-gradient(760px  520px at 50% 106%, rgba(163, 230, 53, .09),  transparent 58%),
        linear-gradient(168deg, #04060e 0%, #070d1c 44%, #060913 100%);
}

/* Malha técnica discreta — dá textura sem virar papel de parede. */
.wr-bg::before {
    content: '';
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 72% 58% at 50% 32%, #000 0%, transparent 78%);
            mask-image: radial-gradient(ellipse 72% 58% at 50% 32%, #000 0%, transparent 78%);
    opacity: .5;
}

.wr-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    will-change: transform;
}
.wr-bg__orb--a { left: -14%; top: -18%;   width: 46vw; height: 46vw; background: rgba(42, 214, 239, .22);  animation: wr-drift-a 26s var(--wr-ease) infinite alternate; }
.wr-bg__orb--b { right: -12%; top: 6%;    width: 40vw; height: 40vw; background: rgba(139, 124, 246, .22); animation: wr-drift-b 32s var(--wr-ease) infinite alternate; }
.wr-bg__orb--c { left: 34%; bottom: -26%; width: 44vw; height: 44vw; background: rgba(251, 191, 36, .10);  animation: wr-drift-a 38s var(--wr-ease) infinite alternate-reverse; }

@keyframes wr-drift-a { to { transform: translate3d(7%, 9%, 0) scale(1.14); } }
@keyframes wr-drift-b { to { transform: translate3d(-9%, 6%, 0) scale(1.1); } }

.wr-shell {
    position: relative;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 18px 20px 72px;
}
@media (max-width: 640px) { .wr-shell { padding: 12px 14px 92px; } }

/* --- tipografia ---------------------------------------------------------- */

.wr-display {
    font-family: 'Bebas Neue', ui-sans-serif, sans-serif;
    font-weight: 400;
    letter-spacing: .012em;
    line-height: .88;
    text-transform: uppercase;
}

.wr-h1   { font-size: clamp(2.9rem, 7.2vw, 5.4rem); }
.wr-h2   { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
.wr-h3   { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }

.wr-gradient-text {
    background: linear-gradient(103deg, #ffffff 4%, #cfeffb 34%, var(--wr-cyan) 66%, var(--wr-violet) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.wr-lead {
    color: var(--wr-muted);
    font-size: clamp(.98rem, 1.3vw, 1.12rem);
    line-height: 1.68;
    max-width: 62ch;
}

.wr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid rgba(42, 214, 239, .26);
    background: rgba(42, 214, 239, .08);
    color: #9fe9f8;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.wr-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wr-cyan);
    box-shadow: 0 0 0 3px rgba(42, 214, 239, .18);
    animation: wr-pulse 2.4s ease-in-out infinite;
}
.wr-eyebrow--violet { border-color: rgba(139,124,246,.3); background: rgba(139,124,246,.09); color: #cfc7ff; }
.wr-eyebrow--violet::before { background: var(--wr-violet); box-shadow: 0 0 0 3px rgba(139,124,246,.18); }
.wr-eyebrow--amber  { border-color: rgba(251,191,36,.3);  background: rgba(251,191,36,.09);  color: #fde4a6; }
.wr-eyebrow--amber::before  { background: var(--wr-amber);  box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.wr-eyebrow--lime   { border-color: rgba(163,230,53,.3);   background: rgba(163,230,53,.09);   color: #d9f7a4; }
.wr-eyebrow--lime::before   { background: var(--wr-lime);   box-shadow: 0 0 0 3px rgba(163,230,53,.18); }

@keyframes wr-pulse { 50% { opacity: .35; } }

/* --- cartões ------------------------------------------------------------- */

.wr-card {
    position: relative;
    border-radius: var(--wr-r-lg);
    border: 1px solid var(--wr-line);
    background:
        linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,0) 46%),
        var(--wr-surface);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
            backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: var(--wr-shadow-md);
    padding: clamp(18px, 2.4vw, 30px);
}

/* Fio de luz no topo — o detalhe que separa um cartão chapado de um com volume. */
.wr-card::before {
    content: '';
    position: absolute;
    inset-inline: 14%;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(42, 214, 239, .55), transparent);
    opacity: .7;
}

.wr-card--flush   { padding: 0; overflow: hidden; }
.wr-card--tight   { padding: clamp(14px, 1.6vw, 20px); }
.wr-card--solid   { background: var(--wr-surface-2); }
.wr-card--plain::before { display: none; }

.wr-card--hover {
    transition: transform .32s var(--wr-ease), border-color .32s var(--wr-ease), box-shadow .32s var(--wr-ease);
}
.wr-card--hover:hover {
    transform: translateY(-4px);
    border-color: rgba(42, 214, 239, .32);
    box-shadow: var(--wr-shadow-lg), var(--wr-glow-cyan);
}

/* Cartões temáticos: só a cor muda, a estrutura é a mesma. */
.wr-card--cyan   { border-color: rgba(42,214,239,.24);  background: linear-gradient(168deg, rgba(42,214,239,.1),  rgba(42,214,239,.02) 58%), var(--wr-surface); }
.wr-card--violet { border-color: rgba(139,124,246,.24); background: linear-gradient(168deg, rgba(139,124,246,.1), rgba(139,124,246,.02) 58%), var(--wr-surface); }
.wr-card--amber  { border-color: rgba(251,191,36,.24);  background: linear-gradient(168deg, rgba(251,191,36,.1),  rgba(251,191,36,.02) 58%), var(--wr-surface); }
.wr-card--lime   { border-color: rgba(163,230,53,.24);  background: linear-gradient(168deg, rgba(163,230,53,.1),  rgba(163,230,53,.02) 58%), var(--wr-surface); }
.wr-card--rose   { border-color: rgba(251,113,133,.24); background: linear-gradient(168deg, rgba(251,113,133,.1), rgba(251,113,133,.02) 58%), var(--wr-surface); }

.wr-card--violet::before { background: linear-gradient(90deg, transparent, rgba(139,124,246,.55), transparent); }
.wr-card--amber::before  { background: linear-gradient(90deg, transparent, rgba(251,191,36,.55),  transparent); }
.wr-card--lime::before   { background: linear-gradient(90deg, transparent, rgba(163,230,53,.55),  transparent); }
.wr-card--rose::before   { background: linear-gradient(90deg, transparent, rgba(251,113,133,.55), transparent); }

/* --- botões -------------------------------------------------------------- */

.wr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: var(--wr-r-md);
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .22s var(--wr-ease), box-shadow .22s var(--wr-ease),
                background .22s var(--wr-ease), border-color .22s var(--wr-ease), color .22s var(--wr-ease);
}
.wr-btn:active { transform: translateY(1px) scale(.99); }

.wr-btn--primary {
    background: linear-gradient(118deg, #34e0f5 0%, #22b8e8 42%, #7c6ef2 100%);
    color: #05121a;
    box-shadow: 0 14px 34px -16px rgba(42, 214, 239, .9);
}
.wr-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(42, 214, 239, 1); }

.wr-btn--lime {
    background: linear-gradient(118deg, #b6f04a 0%, #7fd44f 100%);
    color: #0d1705;
    box-shadow: 0 14px 34px -16px rgba(163, 230, 53, .85);
}
.wr-btn--lime:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(163, 230, 53, .95); }

.wr-btn--amber {
    background: linear-gradient(118deg, #fdd34f 0%, #f59e0b 100%);
    color: #1a1103;
    box-shadow: 0 14px 34px -16px rgba(251, 191, 36, .85);
}
.wr-btn--amber:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(251, 191, 36, .95); }

.wr-btn--ghost {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(255, 255, 255, .03);
    color: var(--wr-text);
}
.wr-btn--ghost:hover {
    transform: translateY(-2px);
    border-color: rgba(42, 214, 239, .48);
    background: rgba(42, 214, 239, .1);
    color: #b6efff;
}

.wr-btn--block { width: 100%; }
.wr-btn--sm    { padding: 9px 15px; font-size: 11px; }

/* --- chips e métricas ---------------------------------------------------- */

.wr-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--wr-line);
    background: rgba(255, 255, 255, .04);
    color: var(--wr-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    white-space: nowrap;
}
.wr-chip strong { color: var(--wr-text); font-weight: 700; }
.wr-chip--cyan   { border-color: rgba(42,214,239,.28);  background: rgba(42,214,239,.08);  color: #a5ecfa; }
.wr-chip--violet { border-color: rgba(139,124,246,.28); background: rgba(139,124,246,.08); color: #cfc7ff; }
.wr-chip--amber  { border-color: rgba(251,191,36,.28);  background: rgba(251,191,36,.08);  color: #fde4a6; }
.wr-chip--lime   { border-color: rgba(163,230,53,.28);  background: rgba(163,230,53,.08);  color: #d9f7a4; }
.wr-chip--rose   { border-color: rgba(251,113,133,.28); background: rgba(251,113,133,.08); color: #ffc4cc; }

.wr-stat {
    border-radius: var(--wr-r-md);
    border: 1px solid var(--wr-line);
    background: rgba(255, 255, 255, .035);
    padding: 14px 16px;
}
.wr-stat__value {
    font-family: 'Bebas Neue', ui-sans-serif, sans-serif;
    font-size: 2.1rem;
    line-height: 1;
    color: var(--wr-text);
}
.wr-stat__label {
    margin-top: 5px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--wr-dim);
}

/* --- formulários --------------------------------------------------------- */

.wr-label {
    display: block;
    margin-bottom: 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--wr-dim);
}

.wr-input {
    width: 100%;
    padding: 13px 15px;
    border-radius: var(--wr-r-md);
    border: 1px solid var(--wr-line);
    background: rgba(3, 7, 18, .68);
    color: var(--wr-text);
    font-family: inherit;
    font-size: 14.5px;
    outline: none;
    transition: border-color .2s var(--wr-ease), box-shadow .2s var(--wr-ease), background .2s var(--wr-ease);
}
.wr-input::placeholder { color: var(--wr-dim); }
.wr-input:hover  { border-color: rgba(148, 163, 184, .3); }
.wr-input:focus  {
    border-color: rgba(42, 214, 239, .6);
    background: rgba(3, 7, 18, .86);
    box-shadow: 0 0 0 4px rgba(42, 214, 239, .13);
}

.wr-alert {
    border-radius: var(--wr-r-md);
    border: 1px solid rgba(251, 113, 133, .36);
    background: rgba(251, 113, 133, .1);
    color: #ffc9d0;
    padding: 12px 15px;
    font-size: 13.5px;
    font-weight: 600;
}
.wr-alert--ok {
    border-color: rgba(163, 230, 53, .36);
    background: rgba(163, 230, 53, .1);
    color: #dcf7a8;
}

/* --- listas e texto corrido ---------------------------------------------- */

.wr-list { display: grid; gap: 9px; }
.wr-list li {
    list-style: none;
    border-radius: var(--wr-r-sm);
    border: 1px solid var(--wr-line-soft);
    background: rgba(255, 255, 255, .032);
    padding: 11px 14px;
    color: #cdd7e6;
    font-size: 14px;
    line-height: 1.6;
}
.wr-list li strong { color: var(--wr-text); }

.wr-prose { color: #c3cddd; font-size: 14.6px; line-height: 1.78; }
.wr-prose p { max-width: 82ch; }

.wr-legal-item {
    border-top: 1px solid var(--wr-line-soft);
    padding-top: 20px;
    margin-top: 20px;
}
.wr-legal-item:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.wr-legal-item h2 {
    display: flex;
    align-items: baseline;
    gap: 11px;
    margin-bottom: 9px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #a5ecfa;
}
.wr-legal-item h2 .wr-legal-num {
    font-family: 'Bebas Neue', ui-sans-serif, sans-serif;
    font-size: 1.55rem;
    letter-spacing: .02em;
    color: rgba(42, 214, 239, .42);
    line-height: 1;
}

/* Índice lateral dos documentos legais. */
.wr-toc { display: grid; gap: 3px; }
.wr-toc a {
    display: flex;
    gap: 10px;
    border-radius: var(--wr-r-sm);
    padding: 8px 11px;
    color: var(--wr-muted);
    font-size: 12.6px;
    line-height: 1.4;
    text-decoration: none;
    transition: background .18s var(--wr-ease), color .18s var(--wr-ease);
}
.wr-toc a span { color: rgba(42, 214, 239, .5); font-weight: 700; }
.wr-toc a:hover { background: rgba(42, 214, 239, .09); color: #d6f4fd; }

/* --- rodapé -------------------------------------------------------------- */

.wr-footer {
    margin-top: 44px;
    border-top: 1px solid var(--wr-line);
    padding-top: 30px;
}
.wr-footer__grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) { .wr-footer__grid { grid-template-columns: 1fr; gap: 22px; } }

.wr-footer__title {
    margin-bottom: 12px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--wr-dim);
}
.wr-footer__link {
    display: block;
    padding: 5px 0;
    color: var(--wr-muted);
    font-size: 13.4px;
    text-decoration: none;
    transition: color .18s var(--wr-ease);
}
.wr-footer__link:hover { color: var(--wr-cyan); }

.wr-footer__bar {
    margin-top: 28px;
    border-top: 1px solid var(--wr-line-soft);
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--wr-dim);
    font-size: 11.5px;
    letter-spacing: .05em;
}

/* --- utilidades ---------------------------------------------------------- */

.wr-grid      { display: grid; gap: clamp(14px, 1.6vw, 20px); }
.wr-grid--2   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wr-grid--3   { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wr-grid--4   { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .wr-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wr-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .wr-grid--2, .wr-grid--3, .wr-grid--4 { grid-template-columns: 1fr; } }

.wr-section { margin-bottom: clamp(22px, 3.2vw, 44px); }

.wr-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: clamp(14px, 1.8vw, 22px);
}

.wr-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--wr-line), transparent); }

/* Entrada suave por scroll — desligada em prefers-reduced-motion mais abaixo. */
.wr-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--wr-ease), transform .7s var(--wr-ease);
}
.wr-reveal.wr-in { opacity: 1; transform: none; }

/* A PWA liga/desliga o botão trocando a classe .hidden do Tailwind; garantimos
   o comportamento mesmo se o CDN do Tailwind não carregar. */
[data-wr-pwa-install].hidden { display: none !important; }

/* Barras de rolagem internas combinando com o tema. */
.wr-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(42,214,239,.35) transparent; }
.wr-scroll::-webkit-scrollbar { width: 6px; }
.wr-scroll::-webkit-scrollbar-track { background: transparent; }
.wr-scroll::-webkit-scrollbar-thumb { background: rgba(42,214,239,.3); border-radius: 99px; }
.wr-scroll::-webkit-scrollbar-thumb:hover { background: rgba(42,214,239,.5); }

:focus-visible {
    outline: 2px solid rgba(42, 214, 239, .75);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .wr-reveal { opacity: 1; transform: none; }
}
