/* =========================================================
   Frooty Links — tema portal (baseado no mockup)
   ========================================================= */
:root {
  --green: #a4e005;
  --green-600: #8fbf04;
  --purple: #7c3aed;
  --purple-700: #6d28d9;
  --purple-900: #2e1065;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #eceef2;
  --card: #ffffff;
  --panel: #ffffff;
  --bg-hero-1: #2a1150;
  --bg-hero-2: #150a2e;
  --bg-hero-3: #0c0620;
  --shadow-card: 0 6px 20px rgba(23, 10, 45, .06);
  --radius: 18px;
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
}

/* Tema claro (quando o usuário alterna) */
[data-theme="light"] {
  --panel: #ffffff;
  --ink: #1f2937;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-hero-3);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Layout da página pública ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 50% -120px, rgba(124,58,237,.55), transparent 60%),
    radial-gradient(800px 400px at 90% 0, rgba(164,224,5,.10), transparent 55%),
    linear-gradient(180deg, var(--bg-hero-1) 0%, var(--bg-hero-2) 55%, var(--bg-hero-3) 100%);
  color: #fff;
  padding: 22px 20px 90px;
  overflow: hidden;
}
.hero::before {
  content: "FROOTY";
  position: absolute;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  font-weight: 900;
  font-size: clamp(90px, 22vw, 240px);
  letter-spacing: .05em;
  color: rgba(255,255,255,.04);
  pointer-events: none;
  white-space: nowrap;
}
.wrap { max-width: 940px; margin: 0 auto; position: relative; z-index: 2; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.10); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  cursor: pointer; transition: .2s;
}
.icon-btn:hover { background: rgba(255,255,255,.18); }
.icon-btn svg { width: 20px; height: 20px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: .2s;
}
.pill-btn:hover { background: rgba(255,255,255,.2); }
.pill-btn svg { width: 16px; height: 16px; }

.brand { text-align: center; margin-top: 4px; }
.brand-logo {
  width: 128px; height: 128px; margin: 0 auto 6px;
  border-radius: 50%;
  border: 3px solid var(--green);
  background: linear-gradient(160deg, #6b21a8, #3b0d6b);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(164,224,5,.25);
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo.has-img { background: #fff; }
.brand-logo.has-img img { object-fit: contain; padding: 16px; }
.brand-logo .logo-text { font-size: 30px; font-weight: 800; color: #fff; }
.icon-btn .flip { transform: rotate(180deg); }
.brand h1 {
  font-size: clamp(28px, 5vw, 40px); margin: 10px 0 6px; font-weight: 800;
}
.brand h1 em { color: var(--green); font-style: normal; }
.brand p { margin: 0 auto; max-width: 460px; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.5; }

.search {
  margin: 22px auto 6px; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 12px 16px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.search svg { width: 18px; height: 18px; color: rgba(255,255,255,.6); }
.search input {
  border: none; background: transparent; color: #fff; outline: none;
  width: 100%; font-size: 15px;
}
.search input::placeholder { color: rgba(255,255,255,.55); }

/* Tabs de categorias */
.tabs {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin: 26px auto 0; max-width: 780px;
  position: relative; z-index: 3;
}
.tab {
  min-width: 96px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.85); cursor: pointer; transition: .18s;
}
.tab svg { width: 26px; height: 26px; color: var(--green); }
.tab span { font-size: 13px; font-weight: 600; }
.tab:hover { background: rgba(255,255,255,.12); }
.tab.active {
  background: #fff; color: var(--ink);
  border-color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.tab.active svg { color: var(--purple); }

/* ---------- Painel branco ---------- */
.panel {
  background: var(--panel);
  border-radius: 30px 30px 0 0;
  max-width: 980px; margin: -46px auto 0;
  padding: 34px clamp(18px, 4vw, 40px) 20px;
  position: relative; z-index: 4;
  box-shadow: 0 -10px 40px rgba(0,0,0,.25);
}
.section { margin-bottom: 30px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; color: var(--ink);
}
.section-title .dot {
  width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(164,224,5,.16); color: var(--green-600);
}
.section-title .dot svg { width: 16px; height: 16px; }

/* Grid de cards de acesso */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-card); transition: .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(23,10,45,.12); border-color: #e3e6ec; }
.card .tile {
  width: 48px; height: 48px; border-radius: 13px; flex: 0 0 48px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.card .tile svg { width: 24px; height: 24px; }
.card .body { min-width: 0; flex: 1; }
.card .body strong { display: block; font-size: 15px; color: var(--ink); }
.card .body span { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .go {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,.08); color: var(--purple);
}
.card .go svg { width: 17px; height: 17px; }

/* Cards de documento (arquivos) */
.docs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.doc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 12px; text-align: center;
  box-shadow: var(--shadow-card); transition: .18s;
}
.doc:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(23,10,45,.12); }
.doc .tile {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.doc .tile svg { width: 22px; height: 22px; }
.doc strong { display: block; font-size: 13px; color: var(--ink); line-height: 1.3; }
.doc span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Banner destaque (ex.: institucional) */
.banner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--purple-900), #3b0d6b);
  color: #fff; border-radius: 20px; padding: 22px 24px;
}
.banner .badge {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--purple); display: flex; align-items: center; justify-content: center;
}
.banner .badge svg { width: 26px; height: 26px; color: #fff; }
.banner .banner-body { flex: 1; min-width: 200px; }
.banner .banner-body strong { font-size: 17px; display: block; }
.banner .banner-body p { margin: 4px 0 0; color: rgba(255,255,255,.7); font-size: 14px; }
.banner .banner-cta {
  background: #fff; color: var(--purple-700); font-weight: 700;
  padding: 12px 20px; border-radius: 12px;
}

/* Rodapé social + créditos */
.socials { display: flex; gap: 12px; justify-content: center; margin: 26px 0 6px; }
.socials a {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: .18s;
}
.socials a:hover { transform: translateY(-3px); }
.socials a svg { width: 22px; height: 22px; }

.footer {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 18px 0 30px; border-top: 1px solid var(--line); margin-top: 10px;
}
.footer .leaf { color: var(--green-600); }

.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- Galeria de mockups ---------- */
.gallery {
  columns: 4 210px;
  column-gap: 14px;
}
.shot {
  break-inside: avoid;
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  transition: .18s;
}
.shot:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(23,10,45,.14); }
.shot img { width: 100%; height: auto; display: block; background: #f7f7fa; }
.shot figcaption {
  padding: 9px 12px; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10, 4, 24, .92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lb-stage { margin: 0; max-width: 92vw; max-height: 82vh; text-align: center; }
.lb-stage img { max-width: 92vw; max-height: 74vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-stage figcaption { color: rgba(255,255,255,.75); font-size: 13px; margin-top: 12px; }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.12); color: #fff;
  border: none; cursor: pointer; border-radius: 50%;
  width: 52px; height: 52px; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: .18s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; font-size: 34px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-download {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #1c2b00; font-weight: 700;
  padding: 11px 20px; border-radius: 999px; font-size: 14px;
}
.lb-download svg { width: 16px; height: 16px; }

/* ---------- QR code (admin) ---------- */
.qr-box { text-align: center; }
.qr-box img { width: 150px; height: 150px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .docs { grid-template-columns: repeat(3, 1fr); }
  .gallery { columns: 3 180px; }
}
@media (max-width: 720px) {
  .hero { padding: 16px 14px 84px; }
  .hero::before { font-size: 120px; top: 70px; }
  .cards { grid-template-columns: 1fr; }
  .docs { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2 140px; column-gap: 10px; }
  .panel { border-radius: 24px 24px 0 0; padding: 26px 16px 16px; }
  .brand-logo { width: 104px; height: 104px; }
  .brand h1 { font-size: 26px; }
  /* Tabs viram carrossel horizontal no celular */
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    padding-bottom: 6px; margin-top: 20px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; min-width: 84px; }
  .pill-btn span { display: none; }
  .lb-nav { width: 44px; height: 44px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (max-width: 420px) {
  .docs { grid-template-columns: 1fr 1fr; }
  .brand p { font-size: 14px; }
  .section-title { font-size: 17px; }
}
