/* ========================================
   DocPro Cloud — Shared Design System
   Design: Diana Reyes
   ======================================== */

/* ── RESET ── */

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

/* ── VARIABLES ── */

:root {
  --bg:          #0a0a0f;
  --surface:     #141420;
  --surface-alt: #1a1a2e;
  --primary:     #1a7fd4;
  --primary-dim: #155fa0;
  --accent:      #f59e0b;
  --accent-dim:  #d97706;
  --text:        #e8e8f0;
  --text-muted:  #8888a0;
  --text-dim:    #55556a;
  --border:      #2a2a3e;
  --border-light:#3a3a50;
  --error:       #ef4444;
  --success:     #22c55e;

  /* Team Colors */
  --carl:        #1a7fd4;
  --diana:       #e879a0;
  --anthony:     #22c55e;
  --abish:       #a78bfa;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', monospace;

  /* Layout */
  --content-width: 960px;
  --section-pad: 80px;
  --nav-height: 60px;
}

/* ── BASE ── */

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  min-height: 100vh;
}

/* ── TYPOGRAPHY ── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 3.2rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

h2 .dot { color: var(--primary); }
h1 .dot { color: var(--primary); }

pre, code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

pre {
  padding: 20px;
  overflow-x: auto;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

/* ── LABELS ── */

.label, .mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── LAYOUT UTILITIES ── */

.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: var(--section-pad) 0;
}

.section-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 40px;
}

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

.divider {
  width: 48px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 24px;
}

/* ── NAVIGATION ── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.site-nav .nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav .nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.site-nav .nav-logo span {
  color: var(--primary);
}

.site-nav .nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.site-nav .nav-links a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.site-nav .nav-links a:hover {
  color: var(--text);
}

.site-nav .nav-links a.active {
  color: var(--primary);
}

.site-nav .nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.site-nav .nav-login {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  text-decoration: none;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.site-nav .nav-login:hover {
  background: var(--accent-dim);
}

/* Hamburger button */
.site-nav .nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.site-nav .nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 1px;
}

.site-nav .nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav .nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.site-nav .nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile slide-in panel */
.site-nav .nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  right: -280px;
  width: 280px;
  height: calc(100vh - var(--nav-height));
  background: var(--surface);
  border-left: 1px solid var(--border);
  transition: right 0.3s ease;
  z-index: 999;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
}

.site-nav .nav-mobile.open {
  right: 0;
}

.site-nav .nav-mobile a {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav .nav-mobile a:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.site-nav .nav-mobile a.active {
  color: var(--primary);
}

.site-nav .nav-mobile .mobile-login {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  text-align: center;
  border-radius: 6px;
  padding: 12px 20px;
}

.site-nav .nav-mobile .mobile-login:hover {
  background: var(--accent-dim);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.nav-overlay.open {
  display: block;
}

/* ── FOOTER ── */

.site-footer {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer .footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.site-footer .footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.site-footer .footer-links {
  margin-bottom: 16px;
}

.site-footer .footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  margin: 0 12px;
  transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
  color: var(--text-muted);
}

.site-footer .footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0.7;
}

.site-footer .footer-disclaimer a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── FLOATING AUDIO PLAYER ── */

.audio-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  align-items: center;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 44px;
  padding: 0;
  overflow: hidden;
  user-select: none;
}

.audio-player:hover {
  border-color: var(--border-light);
}

.audio-player.active {
  width: 200px;
  padding: 0 16px 0 14px;
}

.audio-player .audio-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-player .audio-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease;
}

.audio-player.active .audio-icon svg {
  stroke: var(--text-muted);
}

.audio-player .audio-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.audio-player.active .audio-waveform {
  opacity: 1;
}

.audio-player .audio-waveform .bar {
  width: 3px;
  border-radius: 2px;
  animation: waveform 1.2s ease-in-out infinite;
}

.audio-player .audio-waveform .bar:nth-child(1) {
  height: 8px;
  background: var(--carl);
  animation-delay: 0s;
}

.audio-player .audio-waveform .bar:nth-child(2) {
  height: 14px;
  background: var(--diana);
  animation-delay: 0.15s;
}

.audio-player .audio-waveform .bar:nth-child(3) {
  height: 10px;
  background: var(--anthony);
  animation-delay: 0.3s;
}

.audio-player .audio-waveform .bar:nth-child(4) {
  height: 16px;
  background: var(--abish);
  animation-delay: 0.45s;
}

.audio-player .audio-waveform .bar:nth-child(5) {
  height: 6px;
  background: var(--carl);
  animation-delay: 0.6s;
}

.audio-player .audio-waveform .bar:nth-child(6) {
  height: 12px;
  background: var(--diana);
  animation-delay: 0.75s;
}

.audio-player .audio-waveform .bar:nth-child(7) {
  height: 9px;
  background: var(--anthony);
  animation-delay: 0.9s;
}

@keyframes waveform {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

.audio-player.paused .audio-waveform .bar {
  animation-play-state: paused;
}

/* ── RESPONSIVE BREAKPOINTS ── */

@media (max-width: 768px) {
  :root { --section-pad: 56px; }

  h1 { font-size: 2.2rem; }

  .content { padding: 0 20px; }

  /* Nav: show hamburger, hide desktop links */
  .site-nav .nav-links { display: none; }
  .site-nav .nav-login-desktop { display: none; }
  .site-nav .nav-hamburger { display: block; }
  .site-nav .nav-mobile { display: flex; }
}

@media (max-width: 480px) {
  :root { --section-pad: 40px; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .content { padding: 0 16px; }
  .site-nav .nav-inner { padding: 0 16px; }
}

/* ── PRINT ── */

@media print {
  :root {
    --bg: #fff; --surface: #f8f8fa; --surface-alt: #f0f0f4;
    --text: #1a1a1a; --text-muted: #444; --text-dim: #777;
    --border: #ddd; --primary: #1a7fd4; --accent: #d97706;
  }
  html { font-size: 13px; background: white; }
  body { background: white; }
  .site-nav { display: none; }
  .audio-player { display: none; }
  .site-footer { border-top: 1px solid #ddd; }
}
