/* ═══════════════════════════════════════════════════════════════════
   PAINEL RR ENGENHARIA
   Dark masculine. Preto dominante + dourado. Inter. Mesmos tokens
   da home rreng.com.br para identidade unificada.
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --bg:           #0a0a0b;
  --bg-2:         #121214;
  --bg-3:         #1a1a1d;
  --border:       rgba(255, 255, 255, 0.07);
  --border-strong:rgba(255, 255, 255, 0.14);

  --text:         #ededeb;
  --text-2:       rgba(237, 237, 235, 0.72);
  --text-3:       rgba(237, 237, 235, 0.48);
  --text-4:       rgba(237, 237, 235, 0.28);

  --gold:         #c9a24f;
  --gold-hover:   #dfb66a;
  --gold-soft:    rgba(201, 162, 79, 0.15);
  --gold-line:    rgba(201, 162, 79, 0.35);

  --font:         'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(201, 162, 79, 0.08), transparent 60%),
    radial-gradient(700px 500px at 85% 110%, rgba(201, 162, 79, 0.04), transparent 60%),
    var(--bg);
}

::selection { background: var(--gold); color: var(--bg); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Grain sutil em todo o canvas (mesmo padrão da home) */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.04;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ═══════════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex; align-items: center;
  transition: filter 0.25s var(--ease);
}
.brand img {
  width: 68px; height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}
.brand:hover { filter: brightness(1.08); }

.user {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.user:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

/* ═══════════════════════════════════════════════════════════════════
   CONTEÚDO
   ═══════════════════════════════════════════════════════════════════ */
.content {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.5rem, 4vw, 3rem) 6rem;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--gold);
  margin-right: 14px;
  opacity: 0.85;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0;
}
.hero-title .accent {
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
}

.hero-rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 2rem 0 1.5rem;
  opacity: 0.85;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 560px;
}

/* ═══════════════════════════════════════════════════════════════════
   GRID DE APPS
   ═══════════════════════════════════════════════════════════════════ */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 2rem 1.75rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.005) 100%), var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.32s var(--ease),
    border-color 0.32s var(--ease),
    background 0.32s var(--ease),
    box-shadow 0.32s var(--ease);
}

/* Linha dourada sutil no topo (revela no hover) */
.app-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

/* Glow radial dourado sutil no canto superior direito (no hover) */
.app-card::after {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 80%;
  background: radial-gradient(closest-side, var(--gold-soft) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: -1;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.008) 100%), var(--bg-3);
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(201, 162, 79, 0.08);
}
.app-card:hover::before { opacity: 1; }
.app-card:hover::after  { opacity: 1; }

.app-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* Número do card no topo (01, 02...) */
.app-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.app-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

.app-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.app-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.015);
}

.app-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--gold);
  transform: translateX(-4px);
  opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
}
.app-card:hover .app-arrow {
  transform: translateX(0);
  opacity: 1;
}

/* ── Placeholder vazio ────────────────────────────────────────── */
.app-card-empty {
  cursor: default;
  pointer-events: none;
  background: none;
  border-style: dashed;
  opacity: 0.5;
}
.app-card-empty::before,
.app-card-empty::after { display: none; }
.app-card-empty .app-num { color: var(--text-4); }
.app-card-empty .app-title { color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.footbar {
  padding: 1.75rem 2rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.35) 100%);
}
.foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-4);
  letter-spacing: 0.04em;
}
.foot-brand {
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
}
.foot-sep {
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}
.foot-meta {
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .topbar { padding: 1rem 1.25rem; }
  .brand img { width: 56px; }
  .content { padding: 3rem 1.25rem 4rem; }
  .app-card { padding: 1.5rem 1.5rem 1.25rem; min-height: 240px; }
  .app-title { font-size: 1.3rem; }
  .foot-inner { flex-direction: column; gap: 0.5rem; }
  .foot-sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-card,
  .app-card::before,
  .app-card::after,
  .app-arrow,
  .brand { transition: none; }
}
