/* Riffly Policy Site — Brand Theme */
:root {
  --bg: #0D0B14;
  --surface: #161225;
  --border: #2A2240;
  --primary: #7B3FDE;
  --text: #F0EBF5;
  --text-secondary: #B8A9CC;
  --text-muted: #6B5A80;
  --link: #C49DFF;
  --error: #FF5C8A;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--link);
}

/* ── Container / Main ── */
.container,
main {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

article {
  width: 100%;
}

/* ── Typography ── */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.4rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

em {
  color: var(--text-muted);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  text-decoration: underline;
  color: #d9bdff;
}

/* ── Blockquote (legal notices) ── */
blockquote {
  border-left: 3px solid var(--primary);
  background: rgba(123, 63, 222, 0.08);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

blockquote p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

th, td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

tr:nth-child(even) {
  background: rgba(22, 18, 37, 0.5);
}

/* ── Horizontal rule ── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── Cards (index page) ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: block;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(123, 63, 222, 0.15);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Hero (index page) ── */
.hero {
  text-align: center;
  padding: 3rem 0 1rem;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── Notice boxes ── */
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.notice--danger {
  border-color: var(--error);
  background: rgba(255, 92, 138, 0.06);
}

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--link);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  header {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    gap: 0.85rem;
    width: 100%;
  }

  main, .container {
    padding: 1.75rem 1rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2rem 0 0.5rem;
  }
}
