:root {
  --ink: #12182b;
  --muted: #5b6475;
  --line: #e4e7ee;
  --bg: #f6f7f9;
  --card: #ffffff;
  --wv-blue: #1b5590;
  --wv-navy: #1c2b4a;
  --radius: 18px;
  --head: "Barlow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--bg);
  /* Grade sutil remetendo a planta/estrutura */
  background-image:
    linear-gradient(rgba(18, 24, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 43, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.locked { overflow: hidden; }

[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(246, 247, 249, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.brand-wv { font-family: var(--head); font-weight: 800; font-size: 22px; color: var(--wv-blue); }
.brand-maldi { font-family: var(--head); font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: 0.04em; }
.brand-sub { font-size: 12px; color: var(--wv-blue); margin-left: 6px; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: #fff; color: var(--ink); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
  flex: 1;
}

.hero { padding: clamp(40px, 8vw, 88px) 0 clamp(24px, 4vw, 40px); max-width: 720px; }
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wv-blue);
}
.hero h1 {
  margin: 0;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.08;
}
.hero-sub { margin: 16px 0 0; color: var(--muted); font-size: 16px; }

/* ---------- Grupos ---------- */
.group { padding: 32px 0; scroll-margin-top: 80px; }
.group + .group { border-top: 1px solid var(--line); }

.group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.group-mark {
  width: 6px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--c1), var(--c3));
}
.group-head h2 { margin: 0; font-family: var(--head); font-size: 26px; font-weight: 700; line-height: 1.1; }
.group-head small { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

/* ---------- Card ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -18px rgba(18, 24, 43, 0.35);
  border-color: transparent;
  outline: none;
}
.card:hover::after, .card:focus-visible::after { transform: scaleX(1); }

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  /* formato orgânico inspirado nas peças das apresentações */
  border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
  background: var(--accent);
  color: #fff;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin: 4px 0 0; font-family: var(--head); font-size: 20px; font-weight: 700; }
.card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); flex: 1; }

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text, var(--accent));
}
.card-cta svg { width: 16px; height: 16px; transition: transform 0.2s; }
.card:hover .card-cta svg { transform: translateX(4px); }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 32px 16px; }

/* ---------- Viewer ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #fff;
  animation: fade 0.25s ease;
}
@keyframes fade { from { opacity: 0; transform: scale(0.99); } }

.viewer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 3px solid var(--accent, var(--wv-blue));
  background: #fff;
}
.viewer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.viewer-group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.viewer-title strong { font-family: var(--head); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 20px; height: 20px; }

.viewer-body { position: relative; flex: 1; background: var(--bg); }
.viewer-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}
.loader span {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--accent, var(--wv-blue));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand-sub { display: none; }
}
