/* ============================================================
   BUDDY LEGAL SITE — PREMIUM DARK DESIGN SYSTEM
   Matches the mobile app: #09090B background · #C0FF00 accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg:           #09090b;
  --bg-2:         #0e0e11;
  --surface:      #141416;
  --surface-2:    #1c1c1f;
  --surface-3:    #242428;
  --text:         #f4f4f5;
  --text-2:       #a1a1aa;
  --text-3:       #71717a;
  --line:         #27272a;
  --line-2:       #3f3f46;
  --accent:       #c0ff00;
  --accent-dim:   rgba(192, 255, 0, 0.08);
  --accent-glow:  rgba(192, 255, 0, 0.18);
  --accent-border:rgba(192, 255, 0, 0.28);
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    22px;
  --radius-xl:    32px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Ambient background glow ── */
body::before {
  content: '';
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 80vh;
  background: radial-gradient(ellipse at center, rgba(192,255,0,0.045) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(38px, 6.5vw, 72px);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(20px, 3vw, 28px);
  margin: 40px 0 14px;
}

h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
  color: var(--text);
}

p {
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}

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

a:hover {
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul {
  color: var(--text-2);
  line-height: 1.75;
  margin: 0 0 18px 0;
  padding-left: 0;
  list-style: none;
}

ul li {
  padding: 6px 0 6px 24px;
  position: relative;
}

ul li::before {
  content: '–';
  color: var(--accent);
  font-weight: 700;
  left: 0;
  position: absolute;
}

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

/* ── Layout ── */
.page {
  margin: 0 auto;
  max-width: 980px;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}

/* ── Navigation ── */
.nav {
  align-items: center;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(9,9,11,0.75);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  left: 0;
  padding: 18px 24px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 100;
  margin: 0 -24px 60px;
  /* Extend full width */
  width: calc(100% + 48px);
}

.brand {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  gap: 10px;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity 0.15s;
}

.brand:hover {
  opacity: 0.75;
  text-decoration: none;
}

.brand-icon {
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  height: 30px;
  overflow: hidden;
  width: 30px;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-links a {
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  opacity: 1;
}

/* ── Hero section ── */
.hero {
  padding: 20px 0 56px;
}

.eyebrow {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 1.2px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  background: var(--accent);
  border-radius: 999px;
  display: inline-block;
  height: 6px;
  width: 6px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 span {
  background: linear-gradient(135deg, #c0ff00 0%, #8bcd00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  color: var(--text-2);
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 400;
  line-height: 1.7;
  max-width: 620px;
}

/* ── Cards grid ── */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: 0 0 40px rgba(192,255,0,0.06), 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card h2 {
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--text);
}

.card p {
  font-size: 14px;
  margin-bottom: 0;
}

/* ── Buttons ── */
.button {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #000;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  letter-spacing: 0.6px;
  margin-top: 20px;
  padding: 11px 20px;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}

.button:hover {
  box-shadow: 0 0 20px rgba(192,255,0,0.35);
  opacity: 0.9;
  text-decoration: none;
  transform: scale(1.02);
}

.button.secondary {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--text);
}

.button.secondary:hover {
  background: var(--surface-3);
  box-shadow: none;
  border-color: var(--text-3);
}

/* ── Notice block ── */
.notice {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  margin: 0 0 40px;
  padding: 20px 24px;
}

.notice p {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 6px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice strong {
  color: var(--accent);
}

/* ── Prose content sections ── */
.section {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.section h2 {
  color: var(--text);
}

.section h2:first-child {
  margin-top: 28px;
}

/* ── Muted text ── */
.muted {
  color: var(--text-2);
}

/* ── Support topic cards ── */
.topic-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 40px;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.topic-card h2 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--text);
}

.topic-card p {
  font-size: 13px;
  margin: 0;
}

/* ── Card icon badge ── */
.card-icon {
  align-items: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  color: var(--accent);
  display: inline-flex;
  font-size: 18px;
  height: 40px;
  justify-content: center;
  margin-bottom: 16px;
  width: 40px;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--line);
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 24px;
  justify-content: space-between;
  margin-top: 72px;
  padding-top: 28px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-right {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-2);
  text-decoration: none;
  opacity: 1;
}

.footer-brand {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ── Entrance animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero,
.grid,
.topic-grid,
.notice,
.section {
  animation: fadeUp 0.45s ease both;
}

.grid { animation-delay: 0.08s; }
.topic-grid { animation-delay: 0.08s; }
.notice { animation-delay: 0.06s; }
.section { animation-delay: 0.1s; }

/* ── Join page specific ── */
.join-page {
  max-width: 760px;
}

.join-hero {
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  padding: 34px 0 28px;
  text-align: center;
}

.join-card {
  margin: 0 auto;
  max-width: 620px;
  text-align: center;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav {
    padding: 14px 20px;
    gap: 12px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    font-size: 11px;
    padding: 6px 10px;
  }

  .grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(32px, 10vw, 52px);
  }

  .footer {
    flex-direction: column;
    gap: 20px;
  }

  .footer-right {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 0 16px 60px;
  }

  .nav {
    margin: 0 -16px 48px;
    padding: 14px 16px;
    width: calc(100% + 32px);
  }
}
