:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface2:     #1c222b;
  --border:       #30363d;
  --border-soft:  #21262d;
  --accent:       #f4c430;
  --accent-hover: #ffdb4d;
  --accent-soft:  #fef3c7;
  --accent-tint:  rgba(244, 196, 48, 0.12);
  --accent-glow:  rgba(244, 196, 48, 0.2);
  --text:         #e6edf3;
  --muted:        #8b949e;
  --faint:        #484f58;
  --sans:         'Familjen Grotesk', system-ui, -apple-system, sans-serif;
  --mono:         'Fira Code', 'Fira Mono', monospace;

  --grid-bg:
    linear-gradient(rgba(244, 196, 48, 0.05) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(244, 196, 48, 0.05) 1px, transparent 1px) 0 0 / 48px 48px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent-tint); color: var(--text); }

/* ---------- NAV ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.logo {
  font-family: var(--mono); font-size: 0.95rem;
  color: var(--accent); text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.logo em { color: var(--muted); font-style: normal; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted); text-decoration: none;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.2s; font-weight: 400;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

#lang-btn {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--accent); background: transparent;
  border: 1px solid var(--border); padding: 0.4rem 0.8rem;
  cursor: pointer; letter-spacing: 0.1em;
  text-transform: uppercase; transition: all 0.2s;
  border-radius: 6px;
}
#lang-btn:hover { border-color: var(--accent); background: var(--accent-tint); }

/* ---------- HERO ---------- */
.hero {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 9rem 2rem 5rem; position: relative; overflow: hidden;
  background-image: var(--grid-bg);
  background-position: center;
}

.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, rgba(244, 196, 48, 0.08), transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg) 100%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 2rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  animation: fadeUp 0.8s ease both;
}

.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: blink 2.5s infinite;
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-weight: 500;
  line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.5rem;
  animation: fadeUp 0.8s 0.1s ease both;
}
.hero h1 .dim { color: var(--faint); font-style: italic; font-weight: 400; }
.hero h1 .hi { color: var(--accent); font-weight: 500; }

.subtitle {
  font-size: 1.1rem; color: var(--muted); line-height: 1.75;
  max-width: 600px; margin: 0 auto 2rem;
  animation: fadeUp 0.8s 0.2s ease both;
}
.subtitle strong { color: var(--text); font-weight: 500; }
.subtitle em { color: var(--accent-hover); font-style: italic; }

.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  animation: fadeUp 0.8s 0.3s ease both;
}

/* ---------- BUTTONS ---------- */
.btn, .cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  padding: 0.85rem 1.6rem; transition: all 0.2s;
  border-radius: 6px; font-weight: 500;
}

.btn-fill, .cta {
  background: var(--accent); color: #0d1117; border-color: var(--accent);
}
.btn-fill:hover, .cta:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  color: #0d1117; transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-outline {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---------- DIVIDER ---------- */
.divider {
  display: flex; align-items: center; gap: 1.5rem; padding: 0 4rem;
}
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-label {
  font-family: var(--mono); font-size: 0.65rem; color: var(--muted);
  letter-spacing: 0.15em; text-transform: uppercase; white-space: nowrap;
}

/* ---------- SECTIONS ---------- */
section { padding: 4rem; }

.section-tag {
  font-family: var(--mono); font-size: 0.65rem; color: var(--accent);
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 0.75rem; font-weight: 500;
}

section h2 {
  font-size: 2rem; font-weight: 500; letter-spacing: -0.025em;
  line-height: 1.15; margin-bottom: 1.25rem; color: var(--text);
}

section h3 {
  font-size: 1.2rem; font-weight: 500; color: var(--text);
  margin: 2rem 0 0.75rem;
}

section p {
  color: var(--muted); line-height: 1.8; font-size: 1rem;
  max-width: 900px;
}
section p strong { color: var(--text); font-weight: 500; }
section p em { color: var(--accent-hover); font-style: italic; }

/* ---------- MAIN CONTENT ---------- */
main {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem;
}

main section {
  margin-bottom: 1.5rem; padding: 2.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px;
}

/* ---------- GRID & CARDS ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-top: 1.5rem;
}

.card {
  background: var(--surface2); padding: 2rem;
  border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  opacity: 0; transition: opacity 0.2s;
}
.card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.card:hover::before { opacity: 1; }

.card h3 {
  font-size: 1.15rem; font-weight: 500; margin: 0 0 0.75rem;
  color: var(--text); letter-spacing: -0.01em;
}

.card p {
  font-size: 0.92rem; color: var(--muted); line-height: 1.7;
}

.card.single {
  max-width: 700px;
}

/* ---------- LISTS ---------- */
main section ul, main section ol {
  color: var(--muted); line-height: 1.8; font-size: 0.95rem;
  margin-left: 1.5rem; margin-top: 0.5rem;
}
main section ul li, main section ol li {
  margin-bottom: 0.35rem;
}
main section ul li strong, main section ol li strong { color: var(--text); }
main section ul li em, main section ol li em { color: var(--accent-hover); font-style: italic; }

/* ---------- TABLES ---------- */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin-top: 1.5rem; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}

th {
  background: var(--bg); color: var(--accent);
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1rem 1.25rem; text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.85rem 1.25rem; color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
}

tbody tr { background: var(--surface); transition: background 0.2s; }
tbody tr:nth-child(even) { background: var(--surface2); }
tbody tr:hover { background: rgba(244, 196, 48, 0.04); }
tbody tr:last-child td { border-bottom: none; }

.banlist-table { width: 100%; }
.banlist-table th { background: var(--bg); color: var(--accent); }
.banlist-table td { color: var(--text); }

/* ---------- CARD TOOLTIP ---------- */
.card-tooltip {
  position: relative; display: inline-block; cursor: pointer;
  color: var(--accent); font-weight: 500;
  border-bottom: 1px dashed var(--accent-tint);
  transition: color 0.2s;
}
.card-tooltip:hover { color: var(--accent-hover); }

.card-tooltip .tooltip-image {
  position: absolute; left: 105%; top: 50%;
  transform: translateY(-50%);
  width: 200px; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: var(--surface); visibility: hidden;
  pointer-events: none; z-index: 100;
}
.card-tooltip:hover .tooltip-image { visibility: visible; }

/* ---------- SECTION IMAGE ---------- */
li.image-item { list-style: none; margin-bottom: 1rem; }

.section-image {
  display: block; max-width: 100%; margin: 1.5rem auto 0;
  border-radius: 8px; border: 1px solid var(--border);
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border); padding: 2.5rem 4rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  background: var(--surface);
}

footer p {
  font-family: var(--mono); font-size: 0.72rem; color: var(--faint);
  line-height: 1.6;
}

footer .cta {
  font-size: 0.65rem; padding: 0.6rem 1.2rem;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.65rem; }
  section { padding: 2.5rem 1.5rem; }
  .hero { padding: 7rem 1.5rem 4rem; min-height: 60vh; }
  .divider { padding: 0 1.5rem; }
  main { padding: 0 1rem 3rem; }
  main section { padding: 1.5rem; }
  .grid { grid-template-columns: 1fr; }
  footer {
    flex-direction: column; gap: 1rem;
    text-align: center; padding: 2rem 1.5rem;
  }
  .card-tooltip .tooltip-image {
    left: auto; right: 0; top: 100%;
    transform: none; margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  nav { padding: 0.8rem 1rem; }
  .logo { font-size: 0.8rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.6rem; letter-spacing: 0.08em; }
  #lang-btn { padding: 0.3rem 0.6rem; font-size: 0.6rem; }
  .hero h1 { font-size: 1.8rem; }
  .subtitle { font-size: 0.95rem; }
}

/* ---------- LANGUAGE TOGGLE ---------- */
/* lang.js sets <html lang="en|es">; blocks with rich markup are duplicated
   per language and toggled here (data-en/data-es only works for plain text) */
html[lang="es"] .lang-en { display: none !important; }
html:not([lang="es"]) .lang-es { display: none !important; }
