/* OffCoder website — custom styles. Tailwind handles 95% of layout; this file
   is for things Tailwind doesn't do well (prose, scrollbar, selection, etc.) */

/* Brand tokens — synced from branding/colors/palette.css */
:root {
  --atlas-50:  #FBF9F4;
  --atlas-100: #EDE7D8;
  --atlas-200: #CBD5E1;
  --atlas-400: #94A3B8;
  --atlas-600: #5B7A99;
  --atlas-800: #334155;
  --atlas-900: #0F172A;

  --ember-100: #ECE5D5;
  --ember-200: #E8C4A0;
  --ember-400: #D89868;
  --ember-600: #C2683A;
  --ember-800: #8A4520;

  /* Dark-mode surface tokens (warm slate, slightly cooler than atlas-900) */
  --bg:        #0A0F1A;
  --bg-card:   #10172A;
  --bg-high:   #1A2333;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--atlas-50);
  /* Subtle ambient gradient — adds depth without being noisy */
  background-image:
    radial-gradient(at 20% 0%, rgba(194, 104, 58, 0.08) 0px, transparent 40%),
    radial-gradient(at 80% 100%, rgba(91, 122, 153, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth transition default — applies to common interactive properties only.
   Not transition-all (= expensive); just colors + opacity + transform. */
a, button, [role="button"] {
  transition-property: color, background-color, border-color, opacity, transform, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tiny lift on primary CTAs — feels alive without being noisy */
a.btn-lift:hover, button.btn-lift:hover {
  transform: translateY(-1px);
}

/* Selection — ember tint */
::selection {
  background: rgba(194, 104, 58, 0.35);
  color: var(--atlas-50);
}

/* Scrollbar — minimal, dark */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--atlas-800);
  border-radius: 6px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--atlas-600); }

/* Honor user motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Prose (legal pages) ───────────────────────────────────────── */
.prose {
  color: var(--atlas-200);
  line-height: 1.7;
  max-width: 70ch;
}
.prose h1 {
  font-size: 2.25rem; font-weight: 500; color: var(--atlas-50);
  margin-top: 0; margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
.prose h2 {
  font-size: 1.5rem; font-weight: 500; color: var(--atlas-50);
  margin-top: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.015em;
}
.prose h3 {
  font-size: 1.125rem; font-weight: 500; color: var(--atlas-50);
  margin-top: 2rem; margin-bottom: 0.75rem;
}
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose a {
  color: var(--ember-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.prose a:hover { color: var(--ember-200); }
.prose strong { color: var(--atlas-50); font-weight: 500; }
.prose code {
  background: var(--bg-high);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--ember-200);
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--atlas-800);
  margin: 2.5rem 0;
}
.prose blockquote {
  border-left: 3px solid var(--ember-400);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--atlas-100);
  background: var(--bg-card);
  border-radius: 0 6px 6px 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.prose th, .prose td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--atlas-800);
  text-align: left;
}
.prose th {
  background: var(--bg-card);
  font-weight: 500;
  color: var(--atlas-50);
}

/* ─── Subtle decorative class for content sections ───────────────── */
.section-divider {
  border-top: 1px solid var(--atlas-800);
}
