/* You Got A Bird — Legal Site v4 | App-matched dark theme */
/* Fonts: Dancing Script (brand wordmark) + Inter (body) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg:         #0A0A0A;
  --surface:    #131A12;
  --surface-2:  #1B2A19;
  --green:      #4DB84D;
  --green-dim:  rgba(77,184,77,0.12);
  --text:       #FFFFFF;
  --text-light: #C8CFC8;
  --text-muted: #6B7A6B;
  --border:     rgba(255,255,255,0.07);
  --border-g:   rgba(77,184,77,0.22);
  --radius:     16px;
  --radius-sm:  10px;
  --radius-pill:50px;
  --nav-h:      64px;
}

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

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

body {
  background: var(--bg);
  color: var(--text-light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.nav-logo-ring {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-name {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text-light);
  background: rgba(255,255,255,0.05);
}
.nav-links a.active {
  color: var(--green);
}

.nav-app-btn {
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}
.nav-app-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ─── LANDING PAGE ─── */
.landing {
  max-width: 600px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.landing-hero {
  text-align: center;
  margin-bottom: 52px;
}

.hero-logo-ring {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 340px;
  margin: 0 auto;
}

.doc-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.2s, transform 0.2s;
}
.doc-card:hover {
  background: var(--surface-2);
  border-color: var(--border-g);
  transform: translateY(-2px);
}

.doc-card-body {
  flex: 1;
  min-width: 0;
}

.doc-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.doc-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.doc-card-arrow {
  color: var(--green);
  font-size: 1.25rem;
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s;
}
.doc-card:hover .doc-card-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.landing-cta {
  text-align: center;
  margin-top: 56px;
}

.cta-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.cta-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* ─── DOC LAYOUT ─── */
.doc-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  gap: 36px;
  align-items: flex-start;
}

/* ─── TOC SIDEBAR ─── */
.doc-toc {
  display: none; /* shown via media query */
  width: 232px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.doc-toc::-webkit-scrollbar { width: 4px; }
.doc-toc::-webkit-scrollbar-track { background: transparent; }
.doc-toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.toc-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 10px;
}

.toc-list { list-style: none; }

.toc-list li { margin-bottom: 1px; }

.toc-list a {
  display: block;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.78125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.toc-list a:hover {
  color: var(--text-light);
  background: rgba(255,255,255,0.04);
}
.toc-list a.active {
  color: var(--green);
  border-left-color: var(--green);
  background: var(--green-dim);
}

/* ─── DOC CONTENT ─── */
.doc-wrap {
  flex: 1;
  min-width: 0;
  padding-top: 36px;
}

.doc-header {
  margin-bottom: 28px;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 18px;
  transition: color 0.12s;
}
.doc-back::before { content: '←'; font-size: 1em; }
.doc-back:hover { color: var(--green); }

.doc-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-meta-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.01em;
}

/* ─── SECTIONS ─── */
.doc-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  margin-bottom: 10px;
}

.doc-section h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.doc-section h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-light);
  margin: 18px 0 8px;
}

.doc-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 14px 0 6px;
}

.doc-section p {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.75;
}
.doc-section p:last-child { margin-bottom: 0; }

.doc-section ul,
.doc-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.doc-section li {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.65;
}
.doc-section li::marker { color: var(--green); }

.doc-section a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.12s;
}
.doc-section a:hover { opacity: 0.78; text-decoration: underline; }

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

.doc-section blockquote {
  background: var(--green-dim);
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.callout {
  background: var(--surface-2);
  border: 1px solid var(--border-g);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-light);
  margin-top: 12px;
}
.callout a { color: var(--green); }

.caps-legal {
  font-size: 0.8125rem !important;
  color: var(--text-muted) !important;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

/* ─── TABLES ─── */
.doc-section .table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.doc-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.doc-section th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.doc-section td {
  padding: 11px 14px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.doc-section tr:last-child td { border-bottom: none; }
.doc-section tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── FOOTER ─── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 44px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-ring {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.12s;
}
.footer-links a:hover { color: var(--green); }

.footer-sep { color: var(--border); font-size: 0.75rem; }

.footer-legal {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ─── RESPONSIVE ─── */
@media (min-width: 1024px) {
  .doc-toc { display: block; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .doc-container { gap: 0; }
}

@media (max-width: 640px) {
  nav { padding: 0 16px; }
  .nav-name { font-size: 1.125rem; }
  .nav-app-btn { padding: 8px 14px; font-size: 0.75rem; }

  .landing { padding: 48px 16px 72px; }
  .hero-logo-ring { width: 64px; height: 64px; }
  .hero-title { font-size: 2rem; }
  .doc-card { padding: 18px 16px; }

  .doc-container { padding: 0 16px 64px; }
  .doc-wrap { padding-top: 24px; }
  .doc-section { padding: 20px 16px; }
  .doc-title { font-size: 1.5rem; }
  .doc-meta-pill { font-size: 0.6875rem; }
}

@media (max-width: 400px) {
  .nav-name { display: none; }
}
