/* ==========================================================================
   DEAD SUGAR DADDY — BASE DESIGN SYSTEM & TOKENS
   Aesthetic: Noir, Minimalist, Editorial, Mature, Distraction-Free
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Syne:wght@700;800&display=swap');

:root {
  /* Color Palette — Deep Noir & Royal Purple */
  --bg-primary: #0a0a0c;
  --bg-surface: #111116;
  --bg-overlay: rgba(10, 10, 12, 0.94);
  --bg-panel: #0d0d10;
  
  --text-primary: #f2f2f5;
  --text-secondary: #9c9ca6;
  --text-muted: #5e5e68;
  --text-inverse: #0a0a0c;

  --accent-crimson: #a855f7; /* Primary Theme Accent: Electric Purple / Viola */
  --accent-crimson-subtle: rgba(168, 85, 247, 0.18);
  --accent-purple: #a855f7;
  --accent-purple-light: #c084fc;
  --accent-purple-hover: #9333ea;
  --accent-purple-glow: rgba(168, 85, 247, 0.35);
  --accent-purple-subtle: rgba(168, 85, 247, 0.18);
  --border-subtle: #1c1c24;
  --border-active: #3c2a52;
  
  /* Typography */
  --font-display: 'Cinzel', serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Syne', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout & Viewport */
  --reading-max-width: 600px;
  --site-max-width: 720px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--accent-crimson);
  outline-offset: 3px;
}

/* Common Layout Containers */
.site-container {
  width: 100%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Minimalist Shared Header (Non-reader pages) */
.editorial-header {
  padding: 1.75rem 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  max-width: var(--site-max-width);
  margin: 0 auto;
  width: 100%;
}

.brand-mark {
  display: flex;
  flex-direction: column;
}

.brand-mark-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brand-mark-sub {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-crimson);
  font-weight: 500;
  margin-top: 1px;
}

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

.header-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--text-primary);
}

/* Minimal Editorial Footer */
.editorial-footer {
  margin-top: auto;
  padding: 3.5rem 1.25rem calc(2.5rem + var(--safe-bottom));
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.footer-inner {
  max-width: var(--site-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 600px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-link {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

@media (min-width: 600px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

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