/* ============================================================================
   ASTRUBIA — design system v2 "Lareira"
   Identidade: madeira quente, mel dourado, luz de lareira, arte painterly.
   Fontes: Cinzel (títulos/display) + Alegreya Sans (texto).
   ========================================================================== */

/* ---- fontes ---------------------------------------------------------------- */
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/fonts/alegreyasans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/fonts/alegreyasans-400i.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/fonts/alegreyasans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/fonts/alegreyasans-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/fonts/alegreyasans-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ---- tokens ---------------------------------------------------------------- */
:root {
  /* floresta profunda / verde-petroleo (fundos) */
  --ink-950: #03110f;
  --ink-900: #061a17;
  --ink-850: #09231e;
  --ink-800: #0d2d25;
  --ink-700: #143a2e;
  --ink-600: #1d4c39;

  /* folha (o verde do logo) */
  --moss-600: #3b7a31;
  --moss-500: #55a43a;
  --moss-400: #79ca47;
  --leaf-300: #b2e861;

  /* mel dourado */
  --gold-700: #8d5700;
  --gold-600: #b87400;
  --gold-500: #dc9300;
  --gold-400: #f5b51b;
  --gold-300: #ffd45a;
  --gold-200: #fff0a6;

  /* pergaminho */
  --parch-100: #f6ecd2;
  --parch-200: #ecdcb4;
  --parch-300: #dcc78f;
  --parch-400: #c7ac70;

  /* azul das flâmulas (acento frio) */
  --arcane-600: #08748a;
  --arcane-500: #0a91aa;
  --arcane-400: #18b8cf;
  --arcane-300: #68e3ef;

  /* madeira clara / móveis */
  --wood-700: #4a2f16;
  --wood-600: #5f3d1d;
  --wood-500: #7a4f26;

  /* brasa (laranja de lareira) */
  --ember-600: #d97a24;
  --ember-500: #f09a3e;
  --ember-400: #ffb95e;

  /* texto sobre fundo escuro */
  --text: #f2ead7;
  --text-strong: #fff9e9;
  --text-muted: #c7d8c5;
  --text-faint: #86a99a;

  /* estados */
  --ok: #83df62;
  --danger: #ef624c;
  --danger-soft: #ff9b85;

  /* tipografia */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;

  /* escala tipografica */
  --type-display-home: clamp(4.5rem, 6.1vw, 5.5rem);
  --type-page-title: clamp(2.125rem, 3.2vw, 2.5rem);
  --type-section-title: 1.5rem;
  --type-card-title: 1rem;
  --type-body: .9375rem;
  --type-body-small: .8125rem;
  --type-label: .6875rem;

  /* espacamento — base 4 */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* layout */
  --container: 1180px;
  --container-wide: 1180px;
  --gutter: 1.5rem;
  --section-space: var(--space-16);
  --card-space: 1.25rem;
  --grid-gap: var(--space-4);
  --control-height: 2.5rem;
  --radius: 10px;
  --radius-lg: var(--radius);

  /* sombras e brilhos */
  --shadow-panel: 0 22px 48px -18px rgba(0, 8, 7, .82), 0 1px 0 rgba(104, 227, 239, .08);
  --glow-gold: 0 0 28px rgba(255, 212, 90, .38);
  --glow-ember: 0 0 30px rgba(255, 159, 38, .34);
  --glow-arcane: 0 0 28px rgba(24, 184, 207, .38);

  /* textura de ruído sutil (SVG turbulence) */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- reset / base ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: 1.55;
  color: var(--text);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 520px at 50% -8%, rgba(255, 177, 38, .17), transparent 70%),
    radial-gradient(900px 620px at 100% 30%, rgba(24, 184, 207, .13), transparent 65%),
    radial-gradient(850px 560px at 0% 76%, rgba(121, 202, 71, .11), transparent 65%),
    var(--noise);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--gold-300); text-decoration: none; }
a:hover { color: var(--gold-200); }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(238, 192, 106, .35); color: var(--text-strong); }

:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  padding: .6rem 1rem;
  background: var(--gold-400);
  color: var(--ink-950);
  font-weight: 700;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---- layout ------------------------------------------------------------------ */
.container {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}
.container--wide { width: min(var(--container-wide), calc(100% - (var(--gutter) * 2))); }

.section { padding-block: var(--section-space); position: relative; }
.section--tight { padding-block: var(--space-12); }

/* transição suave entre seções (evita "retângulos independentes") */
.section-fade-top::before,
.section-fade-bottom::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  pointer-events: none;
  z-index: 1;
}
.section-fade-top::before { top: 0; background: linear-gradient(to bottom, var(--ink-900), transparent); }
.section-fade-bottom::after { bottom: 0; background: linear-gradient(to top, var(--ink-900), transparent); }

/* ---- arte raster (imagens geradas) ------------------------------------------- */
/* moldura dourada para arte painterly */
.art-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 212, 90, .52);
  box-shadow:
    inset 0 0 0 1px rgba(3, 17, 15, .88),
    var(--shadow-panel),
    0 0 26px -16px rgba(24, 184, 207, .8);
}
.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s ease;
}
.art-frame:hover img { transform: scale(1.045); }
@media (prefers-reduced-motion: reduce) {
  .art-frame:hover img { transform: none; }
}
.art-frame::after {
  /* vinheta interna que casa a arte com o fundo do site */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(18, 11, 4, .55);
  border-radius: inherit;
}
.art-frame--glow { box-shadow: inset 0 0 0 1px rgba(18, 11, 4, .8), var(--shadow-panel), var(--glow-gold); }

/* faixa de cena: imagem de fundo + véu escuro para texto por cima */
.scene {
  position: relative;
  isolation: isolate;
  background-size: cover;
  background-position: center;
}
.scene::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, var(--ink-900), rgba(23, 14, 6, .55) 24%, rgba(23, 14, 6, .55) 76%, var(--ink-900)),
    radial-gradient(70% 90% at 50% 50%, rgba(18, 11, 4, .25), rgba(18, 11, 4, .7));
}

/* ---- tipografia --------------------------------------------------------------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-body);
  font-size: var(--type-label);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.kicker::before, .kicker--center::after {
  content: '';
  width: 34px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-500));
}
.kicker--center::after { background: linear-gradient(to left, transparent, var(--gold-500)); }

.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--text-strong);
}
h1.h-display { font-size: var(--type-page-title); }

.h-section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--type-section-title);
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--text-strong);
}
.h-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: .05em;
  color: var(--gold-300);
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 46rem;
}
.lead strong { color: var(--text); }

.section-head { display: grid; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head--center { justify-items: center; text-align: center; }

/* ---- ornamentos ---------------------------------------------------------------- */
.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  color: var(--gold-500);
  margin-block: .35rem;
}
.divider-ornament::before,
.divider-ornament::after {
  content: '';
  height: 1px;
  width: min(150px, 24vw);
}
.divider-ornament::before { background: linear-gradient(to right, transparent, var(--gold-500)); }
.divider-ornament::after { background: linear-gradient(to left, transparent, var(--gold-500)); }
.divider-ornament svg { flex: none; }

/* moldura com cantos dourados */
.frame-corners { position: relative; }
.frame-corners::before,
.frame-corners::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--gold-500);
  opacity: .8;
  pointer-events: none;
}
.frame-corners::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.frame-corners::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

/* ---- painéis --------------------------------------------------------------------- */
.panel {
  position: relative;
  background:
    linear-gradient(155deg, rgba(104, 227, 239, .10), transparent 38%),
    radial-gradient(70% 90% at 100% 100%, rgba(255, 181, 27, .08), transparent 68%),
    linear-gradient(to bottom, var(--ink-800), var(--ink-850));
  border: 1px solid rgba(255, 212, 90, .12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}
.panel--pad { padding: var(--card-space); }

.parchment {
  background:
    var(--noise),
    linear-gradient(165deg, var(--parch-100), var(--parch-200) 60%, var(--parch-300));
  color: #33260f;
  border-radius: var(--radius-lg);
  border: 1px solid var(--parch-400);
  box-shadow: inset 0 0 60px rgba(120, 90, 40, .18), var(--shadow-panel);
}
.parchment a { color: #7a5a1d; text-decoration: underline; }
.parchment a:hover { color: #5c430f; }

/* ---- botões ------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: var(--control-height);
  padding: 0 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--type-body-small);
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #2b1c00;
  background: var(--gold-400);
  border-color: var(--gold-600);
  box-shadow: none;
  text-shadow: none;
}
.btn--primary:hover {
  color: #2a1c05;
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, .8),
    inset 0 -2px 0 rgba(90, 62, 16, .38),
    0 12px 26px -10px rgba(238, 192, 106, .75),
    var(--glow-gold);
}

.btn--ghost {
  color: var(--gold-300);
  background: rgba(3, 17, 15, .36);
  border: 1px solid rgba(255, 212, 90, .42);
  backdrop-filter: blur(5px);
}
.btn--ghost:hover {
  color: var(--gold-200);
  border-color: var(--gold-300);
  box-shadow: none;
}

.btn--lg,
.btn--sm { min-height: var(--control-height); padding: 0 1.25rem; font-size: var(--type-body-small); }
.btn--block { width: 100%; }

.btn[disabled], .btn--disabled {
  opacity: .55;
  pointer-events: none;
  filter: saturate(.4);
}

/* ---- status do servidor -------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(104, 227, 239, .34);
  background: rgba(3, 24, 21, .78);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
}
.status-pill.is-online { color: var(--ok); border-color: rgba(134, 194, 106, .45); }
.status-pill.is-online .status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(134, 194, 106, .55);
  animation: status-pulse 2.4s ease-out infinite;
}
.status-pill.is-offline { color: var(--danger-soft); border-color: rgba(217, 105, 79, .4); }
.status-pill.is-offline .status-dot { background: var(--danger); }

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(134, 194, 106, .55); }
  70% { box-shadow: 0 0 0 9px rgba(134, 194, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(134, 194, 106, 0); }
}

/* ---- header ----------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(3, 20, 18, .93), rgba(3, 20, 18, .58) 64%, rgba(3, 20, 18, 0));
}
.site-header.is-scrolled {
  background: rgba(4, 27, 23, .94);
  border-bottom-color: rgba(104, 227, 239, .28);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .9), 0 1px 16px rgba(24, 184, 207, .08);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: none;
}
.brand-crest { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.brand-logo {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .55));
  transition: filter .25s ease;
}
.brand:hover .brand-logo { filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .55)) drop-shadow(0 0 14px rgba(238, 192, 106, .45)); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-300);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}
.brand:hover .brand-name { color: var(--gold-200); }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  margin-inline: auto;
}
.main-nav a {
  position: relative;
  padding: .4rem 0;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -2px;
  width: 0; height: 2px;
  background: linear-gradient(to right, var(--arcane-400), var(--gold-300));
  transition: width .25s ease, left .25s ease;
}
.main-nav a:hover { color: var(--gold-200); }
.main-nav a:hover::after,
.main-nav a.is-active::after { width: 100%; left: 0; }
.main-nav a.is-active { color: var(--gold-300); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex: none;
}
.header-login {
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .92rem;
  color: var(--text);
}
.header-login:hover { color: var(--gold-200); }
.header-account {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-300);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: rgba(3, 25, 22, .76);
  border: 1px solid rgba(104, 227, 239, .38);
  border-radius: 8px;
}
.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--gold-300);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- menu mobile --------------------------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 6.5rem 2rem 2.5rem;
  background:
    radial-gradient(700px 380px at 85% 0%, rgba(240, 154, 62, .12), transparent 65%),
    radial-gradient(800px 500px at 10% 100%, rgba(122, 90, 30, .2), transparent 70%),
    linear-gradient(to bottom, var(--ink-950), var(--ink-850));
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s ease, transform .3s ease;
}
.mobile-menu.is-open { opacity: 1; transform: none; }

.mobile-menu-scenery {
  position: absolute;
  inset: auto 0 0 0;
  height: 32vh;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(18, 11, 4, .95), transparent),
    radial-gradient(60% 120% at 30% 100%, rgba(95, 61, 29, .5), transparent 70%),
    radial-gradient(50% 100% at 80% 100%, rgba(74, 107, 46, .35), transparent 70%);
}

.mobile-menu-nav {
  display: grid;
  gap: .4rem;
  position: relative;
}
.mobile-menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .55rem .4rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-strong);
  border-bottom: 1px solid rgba(238, 192, 106, .16);
}
.mobile-menu-nav a.is-active,
.mobile-menu-nav a:hover { color: var(--gold-300); }
.mobile-menu-num {
  font-size: .85rem;
  letter-spacing: .2em;
  color: var(--gold-500);
  min-width: 2rem;
}
.mobile-menu-status { position: relative; }
.mobile-menu-actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

body.menu-open { overflow: hidden; }

/* ---- footer ----------------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  background: linear-gradient(to bottom, var(--ink-900), var(--ink-950));
  position: relative;
}
.footer-scenery { margin-bottom: -1px; }
.footer-scenery svg { width: 100%; height: clamp(90px, 12vw, 180px); }

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3rem 2rem;
  position: relative;
}
.footer-brand { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.brand--footer .brand-name { font-size: 1.5rem; }
.brand--footer .brand-logo { height: 108px; }
.footer-tagline {
  color: var(--text-muted);
  font-style: italic;
  max-width: 30ch;
}
.footer-col { display: grid; gap: .55rem; align-content: start; }
.footer-col a { color: var(--text-muted); font-weight: 500; }
.footer-col a:hover { color: var(--gold-200); }
.footer-col-title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: .35rem;
}
.footer-col-title--gap { margin-top: 1.2rem; }

.footer-base {
  display: grid;
  gap: .4rem;
  padding-block: 1.4rem 2rem;
  border-top: 1px solid rgba(238, 192, 106, .16);
  color: var(--text-faint);
  font-size: .9rem;
}
.footer-disclaimer { max-width: 72ch; }

/* ---- cartões de notícia --------------------------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.news-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(24, 184, 207, .08), transparent 42%),
    linear-gradient(to bottom, var(--ink-800), var(--ink-850));
  border: 1px solid rgba(104, 227, 239, .22);
  box-shadow: var(--shadow-panel);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 212, 90, .62);
  box-shadow: var(--shadow-panel), var(--glow-gold), 0 0 24px -14px rgba(24, 184, 207, .9);
}
.news-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }

.news-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8.5;
  overflow: hidden;
}
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-cover-art { position: absolute; inset: 0; filter: saturate(1.18) contrast(1.04); }

/* arte painterly por categoria (gradiente por baixo como fallback) */
.news-cover-art { background-size: cover; background-position: center; }
.news-cover--novidades .news-cover-art {
  background-image:
    url('/img/art/news-novidades.jpg'),
    radial-gradient(90% 90% at 75% 15%, rgba(248, 223, 160, .5), transparent 55%),
    linear-gradient(150deg, #3c2812, #1c1208 70%);
}
.news-cover--atualizacoes .news-cover-art {
  background-image:
    url('/img/art/news-atualizacoes.jpg'),
    radial-gradient(80% 100% at 80% 100%, rgba(88, 165, 204, .38), transparent 60%),
    linear-gradient(160deg, #17303a, #0e1c22 70%);
}
.news-cover--eventos .news-cover-art {
  background-image:
    url('/img/art/news-eventos.jpg'),
    radial-gradient(80% 100% at 30% 0%, rgba(255, 185, 94, .45), transparent 55%),
    linear-gradient(150deg, #3a2d14, #1d1608 70%);
}
.news-cover--manutencao .news-cover-art {
  background-image:
    url('/img/art/news-manutencao.jpg'),
    radial-gradient(80% 100% at 70% 0%, rgba(199, 172, 112, .3), transparent 55%),
    linear-gradient(150deg, #33302a, #171512 70%);
}
.news-cover--comunidade .news-cover-art {
  background-image:
    url('/img/art/news-comunidade.jpg'),
    radial-gradient(90% 90% at 20% 15%, rgba(156, 197, 97, .4), transparent 55%),
    linear-gradient(150deg, #2e2410, #171008 70%);
}
/* silhueta de colinas sobre a arte */
.news-cover-art::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background:
    radial-gradient(120% 170% at 20% 180%, rgba(16, 9, 3, .9), transparent 60%),
    radial-gradient(120% 170% at 85% 190%, rgba(16, 9, 3, .85), transparent 62%);
}

.news-category {
  position: absolute;
  top: .9rem; left: .9rem;
  padding: .3rem .75rem;
  border-radius: 6px;
  background: rgba(3, 24, 21, .86);
  border: 1px solid rgba(104, 227, 239, .48);
  color: var(--gold-300);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.news-body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.3rem 1.4rem 1.5rem;
  flex: 1;
}
.news-date {
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
}
.news-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
  color: var(--text-strong);
}
.news-card:hover .news-title { color: var(--gold-200); }
.news-excerpt {
  color: var(--text-muted);
  font-size: .98rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-more {
  margin-top: auto;
  padding-top: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.news-card:hover .news-more { color: var(--gold-200); }
.news-empty { color: var(--text-muted); font-style: italic; }

/* ---- tabelas (ranking) ------------------------------------------------------------------------------ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.rank-table th {
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-400);
  text-align: left;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(238, 192, 106, .4);
  white-space: nowrap;
}
.rank-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(238, 192, 106, .12);
  color: var(--text);
}
.rank-table tbody tr { transition: background .2s ease; }
.rank-table tbody tr:hover { background: rgba(238, 192, 106, .06); }

/* ---- badges / selos --------------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .7rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid rgba(238, 192, 106, .4);
  color: var(--gold-300);
  background: rgba(238, 192, 106, .08);
}
.badge--arcane { border-color: rgba(88, 165, 204, .45); color: var(--arcane-300); background: rgba(88, 165, 204, .08); }
.badge--moss { border-color: rgba(121, 164, 74, .5); color: var(--leaf-300); background: rgba(121, 164, 74, .1); }

/* ---- formulários -------------------------------------------------------------------------------------- */
.field { display: grid; gap: .45rem; }
.field label {
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--parch-100);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(238, 192, 106, .35);
  background: rgba(16, 9, 3, .6);
  color: var(--text-strong);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(238, 192, 106, .18);
}
.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(217, 105, 79, .15);
}
.field .hint { font-size: .88rem; color: var(--text-faint); }
.field .error {
  font-size: .9rem;
  font-weight: 700;
  color: var(--danger-soft);
  display: none;
}
.field .error.is-visible { display: block; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 3rem; }
.toggle-pass {
  position: absolute;
  top: 50%; right: .55rem;
  transform: translateY(-50%);
  display: inline-flex;
  padding: .45rem;
  background: none;
  border: 0;
  color: var(--text-faint);
  border-radius: 6px;
}
.toggle-pass:hover { color: var(--gold-300); }

.strength { display: grid; gap: .3rem; }
.strength-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(240, 228, 200, .12);
  overflow: hidden;
}
.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--danger);
  transition: width .3s ease, background .3s ease;
}
.strength-label { font-size: .85rem; color: var(--text-faint); }

.form-global-error,
.form-global-success {
  display: none;
  padding: .85rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
}
.form-global-error.is-visible,
.form-global-success.is-visible { display: block; }
.form-global-error {
  border: 1px solid rgba(217, 105, 79, .5);
  background: rgba(217, 105, 79, .12);
  color: var(--danger-soft);
}
.form-global-success {
  border: 1px solid rgba(134, 194, 106, .5);
  background: rgba(134, 194, 106, .1);
  color: var(--ok);
}

.btn .btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(42, 28, 5, .35);
  border-top-color: #2a1c05;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: none;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- animação de entrada -------------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .22s; }
.reveal-d3 { transition-delay: .34s; }

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

@media (max-width: 600px) {
  :root {
    --gutter: 1rem;
    --section-space: 2.5rem;
  }
}

/* ---- responsivo ------------------------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .header-actions .header-login { display: none; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .header-actions .btn { padding: .55rem .9rem; font-size: .74rem; }
  .header-inner { min-height: 64px; gap: .8rem; }
  .header-actions { gap: .8rem; }
  .brand-name { font-size: 1.1rem; }
  .brand-logo { height: 48px; }
}

@media (max-width: 420px) {
  .header-inner { gap: .55rem; }
  .brand { gap: .45rem; }
  .brand-crest { width: 28px; height: 32px; }
  .brand-logo { height: 42px; }
  .brand-name { font-size: .98rem; letter-spacing: .12em; }
  .header-actions { gap: .55rem; }
  .header-actions .btn { padding: .5rem .65rem; font-size: .68rem; letter-spacing: .1em; }
  .nav-toggle { width: 40px; height: 40px; padding: 9px; }
}

@media (min-width: 1081px) {
  .mobile-menu { display: none; }
}

/* ---- modal Astrubia ------------------------------------------------------- */
body.astrubia-modal-open { overflow: hidden; }

.astrubia-modal {
  --modal-accent: var(--arcane-300);
  --modal-accent-rgb: 104, 227, 239;
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity .18s ease;
}
.astrubia-modal[hidden] { display: none; }
.astrubia-modal.is-open { opacity: 1; }
.astrubia-modal--success { --modal-accent: var(--leaf-300); --modal-accent-rgb: 178, 232, 97; }
.astrubia-modal--error { --modal-accent: #ff8b68; --modal-accent-rgb: 255, 139, 104; }
.astrubia-modal--question { --modal-accent: var(--gold-300); --modal-accent-rgb: 255, 212, 90; }

.astrubia-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(24, 82, 65, .25), transparent 42%),
    rgba(1, 11, 10, .84);
  backdrop-filter: blur(8px) saturate(.7);
}

.astrubia-modal__panel {
  position: relative;
  width: min(31rem, 100%);
  overflow: hidden;
  color: var(--text-strong);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--modal-accent-rgb), .11), transparent 38%),
    linear-gradient(145deg, rgba(13, 45, 37, .99), rgba(4, 24, 21, .99));
  border: 1px solid rgba(var(--modal-accent-rgb), .48);
  border-radius: 14px 14px 22px 14px;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, .65),
    0 0 44px rgba(var(--modal-accent-rgb), .08),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  transform: translateY(12px) scale(.975);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.astrubia-modal.is-open .astrubia-modal__panel { transform: translateY(0) scale(1); }
.astrubia-modal__panel::before,
.astrubia-modal__panel::after {
  content: '';
  position: absolute;
  pointer-events: none;
  width: 34px;
  height: 34px;
  border-color: var(--gold-400);
  opacity: .72;
}
.astrubia-modal__panel::before {
  top: 9px;
  left: 9px;
  border-top: 1px solid;
  border-left: 1px solid;
  border-radius: 7px 0 0;
}
.astrubia-modal__panel::after {
  right: 9px;
  bottom: 9px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  border-radius: 0 0 13px;
}

.astrubia-modal__ornament {
  position: relative;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--modal-accent) 18%, var(--gold-400) 50%, var(--modal-accent) 82%, transparent);
  box-shadow: 0 0 22px rgba(var(--modal-accent-rgb), .26);
}
.astrubia-modal__ornament span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--gold-400);
  border: 2px solid var(--ink-900);
  transform: translate(-50%, -50%) rotate(45deg);
}
.astrubia-modal__form { padding: 1.75rem 1.85rem 1.65rem; }
.astrubia-modal__heading {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: .9rem;
}
.astrubia-modal__sigil {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(var(--modal-accent-rgb), .58);
  border-radius: 50% 46% 50% 44%;
  color: var(--modal-accent);
  background: rgba(var(--modal-accent-rgb), .08);
  box-shadow: inset 0 0 16px rgba(var(--modal-accent-rgb), .09);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.astrubia-modal__eyebrow {
  margin: 0 0 .15rem;
  color: var(--modal-accent);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.astrubia-modal__title {
  margin: 0;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  line-height: 1.15;
}
.astrubia-modal__message {
  margin: 1.15rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
}
.astrubia-modal__choices {
  display: grid;
  gap: .65rem;
  margin-top: 1.15rem;
}
.astrubia-modal__choices[hidden] { display: none; }
.astrubia-modal__choice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .18rem .75rem;
  width: 100%;
  padding: .78rem .9rem;
  color: var(--text-strong);
  text-align: left;
  background: rgba(1, 13, 12, .62);
  border: 1px solid rgba(var(--modal-accent-rgb), .24);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.astrubia-modal__choice:hover,
.astrubia-modal__choice:focus-visible {
  border-color: rgba(var(--modal-accent-rgb), .65);
  outline: none;
}
.astrubia-modal__choice.is-selected {
  background: rgba(var(--modal-accent-rgb), .11);
  border-color: var(--modal-accent);
  box-shadow: 0 0 0 2px rgba(var(--modal-accent-rgb), .09);
  transform: translateX(2px);
}
.astrubia-modal__choice-title { font-weight: 800; }
.astrubia-modal__choice-badge {
  align-self: center;
  padding: .15rem .42rem;
  color: var(--gold-200);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 212, 90, .3);
  border-radius: 999px;
}
.astrubia-modal__choice-meta {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: .82rem;
}
.astrubia-modal__choice-error { margin-top: .55rem; }
.astrubia-modal__field { margin-top: 1.15rem; }
.astrubia-modal__field label {
  display: block;
  margin-bottom: .42rem;
  color: var(--parch-200);
  font-weight: 700;
  letter-spacing: .03em;
}
.astrubia-modal__field input {
  width: 100%;
  min-height: 46px;
  padding: .65rem .8rem;
  color: var(--text-strong);
  caret-color: var(--gold-300);
  background: rgba(1, 13, 12, .7);
  border: 1px solid rgba(var(--modal-accent-rgb), .4);
  border-radius: 8px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.astrubia-modal__field input:focus {
  border-color: var(--modal-accent);
  box-shadow: 0 0 0 3px rgba(var(--modal-accent-rgb), .12);
}
.astrubia-modal__field input[aria-invalid="true"] { border-color: #ff8b68; }
.astrubia-modal__error {
  display: none;
  margin: .45rem 0 0;
  color: #ffab91;
  font-size: .88rem;
}
.astrubia-modal__error.is-visible { display: block; }
.astrubia-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: .7rem;
  margin-top: 1.45rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 212, 90, .14);
}
.astrubia-modal__actions .btn { min-width: 8.5rem; }

@media (max-width: 520px) {
  .astrubia-modal { padding: .85rem; }
  .astrubia-modal__form { padding: 1.45rem 1.2rem 1.25rem; }
  .astrubia-modal__actions { flex-direction: column-reverse; }
  .astrubia-modal__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .astrubia-modal,
  .astrubia-modal__panel { transition: none; }
}
