/* Tipografia i base */
:root {
  --bg: #0f172a;
  --bg-card: #020617;
  --bg-card-alt: #02081a;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.2);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  color: var(--text-main);
  line-height: 1.6;
}

/* Layout general */

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Capçalera */

.site-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(18px);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.7),
    rgba(8, 47, 73, 0.9)
  );
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: 0.04em;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Targetes / Seccions */

.card {
  background: radial-gradient(circle at top left, #0b1120 0, #020617 55%, #000 100%);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem;
  margin: 1.4rem 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -60%;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.15), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.18), transparent 55%);
  opacity: 0.2;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

.card h3 {
  margin-top: 1.1rem;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

/* Targeta destacada */
.highlight {
  background: radial-gradient(circle at top, #022c22 0, #020617 60%, #000 100%);
  border-color: rgba(45, 212, 191, 0.4);
}

/* Llistes i text */

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.25rem;
}

p {
  margin: 0.35rem 0;
}

/* Blocs de codi */

pre {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}

code {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Preguntes */

.question {
  margin-top: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-soft);
}

.question strong {
  color: var(--accent);
}

/* Peu de pàgina */

.site-footer {
  text-align: center;
  margin: 2rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsiu */

@media (max-width: 600px) {
  .card {
    padding: 1.25rem 1.2rem;
  }

  .site-header {
    position: static;
  }
}
