/* ============================================================
   SCRIPTORIUM STUDIO — MASTER LUXURY DESIGN SYSTEM
   Theme: The Royal Vellum & Velvet Library (High-Depth Editorial)
   Palette: Velvet Charcoal, Warm Vellum, Champagne Gold, Oxide Burgundy
   ============================================================ */

:root {
  /* Chromatic Architecture — Rich Layered Palette */
  --velvet-base: #0E0D10;         /* Deep Velvet Charcoal Base */
  --velvet-surface: #16141A;      /* Elevated Velvet Slate */
  --velvet-card: #1D1A22;         /* Rich Card Velvet */
  --velvet-highlight: #26222D;    /* Interactive Raised Velvet */
  
  --vellum-pure: #FAF7F2;         /* Crisp Warm Vellum */
  --vellum-creme: #F3EEE4;        /* Aged Cream Parchment */
  --vellum-muted: #D5CEC2;        /* Soft Linen Stone */
  --vellum-dark: #9E9689;         /* Editorial Caption Grey */

  /* Luxury Accents */
  --burgundy: #7D3034;            /* Core Diagnostic Burgundy */
  --burgundy-bright: #9E3D42;     /* Radiant Signal Burgundy */
  --burgundy-glow: rgba(125, 48, 52, 0.25);
  
  --gold-antique: #C5A059;        /* Antique Champagne Gold */
  --gold-light: #E5C583;          /* Bright Foil Gold */
  --gold-glow: rgba(197, 160, 89, 0.18);
  --gold-border: rgba(197, 160, 89, 0.28);

  /* Legacy & Semantic Aliases */
  --ink: var(--velvet-base);
  --ink-deep: #080709;
  --ink-surface: var(--velvet-surface);
  --ink-raised: var(--velvet-card);
  --ink-border: rgba(255, 255, 255, 0.08);
  --ivory: var(--vellum-pure);
  --ivory-warm: var(--vellum-creme);
  --stone: var(--vellum-muted);
  --stone-dark: var(--vellum-dark);

  /* Typography Scales */
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation Shadows & Ambient Glows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);
  --shadow-gold: 0 8px 32px rgba(197, 160, 89, 0.12);
  --shadow-burgundy: 0 8px 32px rgba(125, 48, 52, 0.2);

  /* Border Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Layout Widths */
  --max-w-narrow: 800px;
  --max-w-content: 1140px;
  --max-w-wide: 1320px;

  /* Transitions */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;
}

/* Base Styles & Ambient Background */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--velvet-base);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(125, 48, 52, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(197, 160, 89, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #0E0D10 0%, #131116 100%);
  background-attachment: fixed;
  color: var(--vellum-pure);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography Master Scale */
h1, h2, h3, h4, h5 {
  font-family: var(--font-editorial);
  font-weight: 400;
  color: var(--vellum-pure);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.hero-display {
  font-family: var(--font-editorial);
  font-size: clamp(3.4rem, 7.5vw, 6.8rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--vellum-pure);
}

.hero-display .italic {
  font-style: italic;
  color: var(--gold-light);
  font-weight: 300;
}

.body-lead {
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  line-height: 1.8;
  color: var(--vellum-muted);
  font-weight: 300;
}

.body-editorial {
  font-family: var(--font-editorial);
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--vellum-creme);
}

.caption {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vellum-dark);
}

.eyebrow-editorial {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-antique);
  background: rgba(197, 160, 89, 0.08);
  border: 1px solid var(--gold-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.folio-number {
  font-family: var(--font-editorial);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  color: var(--gold-antique);
  font-style: italic;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-sm {
  padding: 3.5rem 0;
}

/* Luxury Editorial Plates & Cards */
.editorial-plate {
  background-color: var(--velvet-surface);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: all var(--duration-normal) var(--ease-editorial);
  backdrop-filter: blur(12px);
}

.editorial-plate::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color var(--duration-normal);
}

.editorial-plate:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold), var(--shadow-lg);
}

.editorial-plate-featured {
  background: linear-gradient(165deg, rgba(38, 34, 45, 0.9) 0%, rgba(22, 20, 26, 0.95) 100%);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-gold), var(--shadow-lg);
}

.card {
  background-color: var(--velvet-card);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--duration-normal);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.card-featured {
  border-left: 3px solid var(--burgundy);
  background: linear-gradient(135deg, rgba(125, 48, 52, 0.08) 0%, var(--velvet-card) 100%);
}

/* Buttons with High-End Editorial Polish */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-editorial);
  border: 1px solid transparent;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--vellum-pure) 0%, var(--vellum-creme) 100%);
  color: var(--velvet-base);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(250, 247, 242, 0.15);
}

.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250, 247, 242, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--vellum-pure);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--gold-border);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-antique) 100%);
  color: #0E0D10;
  font-weight: 600;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(197, 160, 89, 0.35);
}

.btn-lg {
  padding: 1.05rem 2.2rem;
  font-size: 0.9375rem;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
}

/* Badges & Indicators */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--vellum-muted);
}

.badge-burgundy {
  background: rgba(125, 48, 52, 0.16);
  border-color: rgba(125, 48, 52, 0.4);
  color: #E58D91;
}

.badge-gold {
  background: rgba(197, 160, 89, 0.12);
  border-color: var(--gold-border);
  color: var(--gold-light);
}

.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.priority-dot.high {
  background-color: var(--burgundy-bright);
  box-shadow: 0 0 8px var(--burgundy-bright);
}

.priority-dot.medium {
  background-color: var(--gold-antique);
}

.priority-dot.low {
  background-color: var(--vellum-muted);
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Visual Signatures: The Signal Line */
.signal-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(197, 160, 89, 0.4) 50%, transparent 100%);
  position: relative;
  margin: 3rem 0;
}

.signal-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--burgundy);
  box-shadow: 0 0 12px var(--burgundy-bright);
}

/* Metric Cards with Score Bars */
.metric-card {
  background: var(--velvet-surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.metric-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vellum-dark);
  display: block;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-family: var(--font-editorial);
  font-size: 2.2rem;
  color: var(--vellum-pure);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.score-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-antique) 0%, var(--vellum-pure) 100%);
  border-radius: var(--radius-full);
}

.score-bar-fill.burgundy {
  background: linear-gradient(90deg, var(--burgundy) 0%, var(--burgundy-bright) 100%);
}

/* Forms & Inputs */
.input, .textarea, .select {
  background: var(--velvet-surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  color: var(--vellum-pure);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  padding: 0.85rem 1.2rem;
  width: 100%;
  transition: all var(--duration-fast);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold-border);
  box-shadow: 0 0 12px var(--gold-glow);
}
