/* =============================================================================
   DARK GLENN — Design System
   engineered • inevitable • quietly powerful
   ============================================================================= */

/* =============================================================================
   1. DESIGN TOKENS
   ============================================================================= */

:root {

  /* --- Color: Base --- */
  --dg-black:         #0a0a0b;
  --dg-void:          #111114;
  --dg-deep:          #16161a;
  --dg-surface:       #1e1e24;
  --dg-surface-raised:#26262e;
  --dg-border:        #2e2e38;
  --dg-border-subtle: #222228;

  /* --- Color: Text --- */
  --dg-text-primary:  #e8e6e0;
  --dg-text-secondary:#9a9890;
  --dg-text-muted:    #5a5858;
  --dg-text-inverse:  #0a0a0b;

  /* --- Color: Accent — Crimson --- */
  --dg-crimson:       #8b1a2a;
  --dg-crimson-bright:#b02235;
  --dg-crimson-glow:  rgba(139, 26, 42, 0.15);
  --dg-crimson-subtle:rgba(139, 26, 42, 0.08);

  /* --- Color: Accent — Gold --- */
  --dg-gold:          #7a6030;
  --dg-gold-bright:   #a07e3e;
  --dg-gold-subtle:   rgba(122, 96, 48, 0.12);

  /* --- Color: Accent — Cool --- */
  --dg-slate:         #3a4050;
  --dg-slate-bright:  #4e5668;

  /* --- Typography: Families --- */
  --dg-font-heading:  'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --dg-font-body:     'Inter', 'DM Sans', system-ui, sans-serif;
  --dg-font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --dg-font-label:    'Inter', system-ui, sans-serif;

  /* --- Typography: Scale --- */
  --dg-text-xs:       0.75rem;
  --dg-text-sm:       0.875rem;
  --dg-text-base:     1rem;
  --dg-text-lg:       1.125rem;
  --dg-text-xl:       1.25rem;
  --dg-text-2xl:      1.5rem;
  --dg-text-3xl:      1.875rem;
  --dg-text-4xl:      2.25rem;
  --dg-text-5xl:      3rem;
  --dg-text-6xl:      3.75rem;

  /* --- Typography: Weight --- */
  --dg-weight-light:  300;
  --dg-weight-regular:400;
  --dg-weight-medium: 500;
  --dg-weight-semibold:600;
  --dg-weight-bold:   700;

  /* --- Spacing --- */
  --dg-space-1:       0.25rem;
  --dg-space-2:       0.5rem;
  --dg-space-3:       0.75rem;
  --dg-space-4:       1rem;
  --dg-space-6:       1.5rem;
  --dg-space-8:       2rem;
  --dg-space-12:      3rem;
  --dg-space-16:      4rem;
  --dg-space-24:      6rem;
  --dg-space-32:      8rem;

  /* --- Layout --- */
  --dg-max-width:     1200px;
  --dg-content-width: 720px;
  --dg-sidebar-width: 280px;

  /* --- Borders --- */
  --dg-radius-sm:     2px;
  --dg-radius:        4px;
  --dg-radius-lg:     8px;

  /* --- Shadows --- */
  --dg-shadow-sm:     0 1px 3px rgba(0,0,0,0.6);
  --dg-shadow:        0 4px 12px rgba(0,0,0,0.7);
  --dg-shadow-lg:     0 12px 40px rgba(0,0,0,0.8);
  --dg-shadow-glow:   0 0 24px var(--dg-crimson-glow);

  /* --- Transitions --- */
  --dg-transition-fast:  150ms ease;
  --dg-transition:       250ms ease;
  --dg-transition-slow:  400ms ease;

}

/* =============================================================================
   2. BASE RESET
   ============================================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--dg-black);
  color: var(--dg-text-primary);
  font-family: var(--dg-font-body);
  font-size: var(--dg-text-base);
  font-weight: var(--dg-weight-regular);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--dg-text-primary);
  text-decoration: none;
  transition: color var(--dg-transition-fast);
}

a:hover {
  color: var(--dg-crimson-bright);
}

/* =============================================================================
   3. TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--dg-font-heading);
  font-weight: var(--dg-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--dg-text-primary);
  margin-top: 0;
  margin-bottom: var(--dg-space-4);
}

h1 { font-size: var(--dg-text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--dg-text-4xl); }
h3 { font-size: var(--dg-text-3xl); }
h4 { font-size: var(--dg-text-2xl); }
h5 { font-size: var(--dg-text-xl);  font-family: var(--dg-font-body); font-weight: var(--dg-weight-semibold); }
h6 { font-size: var(--dg-text-lg);  font-family: var(--dg-font-body); font-weight: var(--dg-weight-semibold); }

p {
  margin-top: 0;
  margin-bottom: var(--dg-space-4);
  color: var(--dg-text-secondary);
}

strong, b {
  font-weight: var(--dg-weight-semibold);
  color: var(--dg-text-primary);
}

blockquote {
  border-left: 2px solid var(--dg-crimson);
  padding: var(--dg-space-4) var(--dg-space-6);
  margin: var(--dg-space-8) 0;
  background: var(--dg-crimson-subtle);
  font-family: var(--dg-font-heading);
  font-style: italic;
  font-size: var(--dg-text-lg);
  color: var(--dg-text-primary);
}

/* --- Labels & Overlines --- */
.dg-label {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  font-weight: var(--dg-weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dg-text-muted);
}

.dg-overline {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  font-weight: var(--dg-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dg-crimson-bright);
}

/* =============================================================================
   4. LAYOUT
   ============================================================================= */

.dg-container {
  width: 100%;
  max-width: var(--dg-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--dg-space-6);
  padding-right: var(--dg-space-6);
}

.dg-content {
  max-width: var(--dg-content-width);
}

/* GeneratePress overrides */
.site-header,
#masthead {
  background-color: var(--dg-black) !important;
  border-bottom: 1px solid var(--dg-border-subtle);
}

.site-content,
#content {
  background-color: var(--dg-black);
}

.site-footer,
#colophon {
  background-color: var(--dg-void);
  border-top: 1px solid var(--dg-border-subtle);
  color: var(--dg-text-muted);
}

/* =============================================================================
   5. NAVIGATION
   ============================================================================= */

.main-navigation,
.nav-primary {
  background: transparent !important;
}

.main-navigation a,
.nav-primary a {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-sm);
  font-weight: var(--dg-weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-secondary) !important;
  padding: var(--dg-space-2) var(--dg-space-4) !important;
  transition: color var(--dg-transition-fast);
}

.main-navigation a:hover,
.nav-primary a:hover,
.main-navigation .current-menu-item > a {
  color: var(--dg-text-primary) !important;
}

/* =============================================================================
   6. SITE LOGO / TITLE
   ============================================================================= */

.site-title,
.site-title a {
  font-family: var(--dg-font-heading);
  font-size: var(--dg-text-2xl);
  font-weight: var(--dg-weight-bold);
  letter-spacing: 0.04em;
  color: var(--dg-text-primary) !important;
}

.site-description {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dg-text-muted);
}

/* =============================================================================
   7. CARDS & SURFACES
   ============================================================================= */

.dg-card {
  background: var(--dg-surface);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-radius);
  overflow: hidden;
  transition: border-color var(--dg-transition), box-shadow var(--dg-transition);
}

.dg-card:hover {
  border-color: var(--dg-crimson);
  box-shadow: var(--dg-shadow-glow);
}

.dg-card__image {
  aspect-ratio: 2/3;
  overflow: hidden;
}

.dg-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dg-transition-slow);
}

.dg-card:hover .dg-card__image img {
  transform: scale(1.04);
}

.dg-card__body {
  padding: var(--dg-space-4);
}

.dg-card__title {
  font-family: var(--dg-font-heading);
  font-size: var(--dg-text-lg);
  font-weight: var(--dg-weight-bold);
  margin-bottom: var(--dg-space-2);
  color: var(--dg-text-primary);
}

.dg-card__meta {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  letter-spacing: 0.08em;
  color: var(--dg-text-muted);
}

/* =============================================================================
   8. BADGES & TAGS
   ============================================================================= */

.dg-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--dg-space-1);
  padding: var(--dg-space-1) var(--dg-space-2);
  border-radius: var(--dg-radius-sm);
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  font-weight: var(--dg-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dg-badge--members {
  background: var(--dg-crimson);
  color: var(--dg-text-primary);
}

.dg-badge--free {
  background: var(--dg-surface-raised);
  color: var(--dg-text-secondary);
  border: 1px solid var(--dg-border);
}

.dg-badge--explicit {
  background: transparent;
  color: var(--dg-crimson-bright);
  border: 1px solid var(--dg-crimson);
}

/* =============================================================================
   9. BUTTONS
   ============================================================================= */

.dg-btn,
.button,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--dg-space-2);
  padding: var(--dg-space-3) var(--dg-space-6);
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-sm);
  font-weight: var(--dg-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--dg-radius-sm);
  cursor: pointer;
  transition: background-color var(--dg-transition-fast), box-shadow var(--dg-transition-fast);
}

.dg-btn--primary {
  background: var(--dg-crimson);
  color: var(--dg-text-primary);
}

.dg-btn--primary:hover {
  background: var(--dg-crimson-bright);
  box-shadow: var(--dg-shadow-glow);
  color: var(--dg-text-primary);
}

.dg-btn--ghost {
  background: transparent;
  color: var(--dg-text-secondary);
  border: 1px solid var(--dg-border);
}

.dg-btn--ghost:hover {
  border-color: var(--dg-crimson);
  color: var(--dg-text-primary);
}

/* PMPro button override */
.pmpro_btn,
.pmpro-checkout .pmpro_submit {
  background: var(--dg-crimson) !important;
  color: var(--dg-text-primary) !important;
  border: none !important;
  font-family: var(--dg-font-label) !important;
  font-weight: var(--dg-weight-semibold) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: var(--dg-radius-sm) !important;
  transition: background-color var(--dg-transition-fast) !important;
}

.pmpro_btn:hover,
.pmpro-checkout .pmpro_submit:hover {
  background: var(--dg-crimson-bright) !important;
}

/* =============================================================================
   10. FORMS
   ============================================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  background: var(--dg-surface);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-radius-sm);
  color: var(--dg-text-primary);
  font-family: var(--dg-font-body);
  font-size: var(--dg-text-base);
  padding: var(--dg-space-3) var(--dg-space-4);
  width: 100%;
  transition: border-color var(--dg-transition-fast);
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--dg-crimson);
  box-shadow: 0 0 0 2px var(--dg-crimson-subtle);
}

::placeholder {
  color: var(--dg-text-muted);
}

label {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-sm);
  font-weight: var(--dg-weight-medium);
  letter-spacing: 0.04em;
  color: var(--dg-text-secondary);
  display: block;
  margin-bottom: var(--dg-space-2);
}

/* =============================================================================
   11. DIVIDERS & STRUCTURE
   ============================================================================= */

hr,
.dg-divider {
  border: none;
  border-top: 1px solid var(--dg-border-subtle);
  margin: var(--dg-space-8) 0;
}

.dg-divider--crimson {
  border-top-color: var(--dg-crimson);
  opacity: 0.4;
}

/* =============================================================================
   12. HERO / FEATURED AREAS
   ============================================================================= */

.dg-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dg-void);
}

.dg-hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.dg-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--dg-black) 0%,
    rgba(10,10,11,0.6) 50%,
    transparent 100%
  );
}

.dg-hero__content {
  position: relative;
  z-index: 1;
  padding: var(--dg-space-16) var(--dg-space-6);
  max-width: var(--dg-max-width);
  margin: 0 auto;
  width: 100%;
}

.dg-hero__eyebrow {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  font-weight: var(--dg-weight-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dg-crimson-bright);
  margin-bottom: var(--dg-space-4);
}

.dg-hero__title {
  font-family: var(--dg-font-heading);
  font-size: clamp(2.5rem, 6vw, var(--dg-text-6xl));
  font-weight: var(--dg-weight-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--dg-text-primary);
  margin-bottom: var(--dg-space-6);
  max-width: 700px;
}

.dg-hero__subtitle {
  font-size: var(--dg-text-lg);
  color: var(--dg-text-secondary);
  max-width: 520px;
  margin-bottom: var(--dg-space-8);
}

/* =============================================================================
   13. GRID SYSTEMS
   ============================================================================= */

.dg-grid {
  display: grid;
  gap: var(--dg-space-6);
}

.dg-grid--comics {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.dg-grid--series {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.dg-grid--featured {
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {
  .dg-grid--featured {
    grid-template-columns: 1fr;
  }

  h1 { font-size: var(--dg-text-4xl); }
  h2 { font-size: var(--dg-text-3xl); }
}

/* =============================================================================
   14. AGE GATE / CONTENT WARNING
   ============================================================================= */

.dg-age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dg-black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: var(--dg-space-8);
}

.dg-age-gate__logo {
  font-family: var(--dg-font-heading);
  font-size: var(--dg-text-4xl);
  color: var(--dg-text-primary);
  margin-bottom: var(--dg-space-12);
}

.dg-age-gate__warning {
  font-family: var(--dg-font-label);
  font-size: var(--dg-text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dg-crimson-bright);
  margin-bottom: var(--dg-space-4);
}

.dg-age-gate__title {
  font-family: var(--dg-font-heading);
  font-size: var(--dg-text-2xl);
  color: var(--dg-text-primary);
  margin-bottom: var(--dg-space-4);
  max-width: 480px;
}

.dg-age-gate__sub {
  color: var(--dg-text-muted);
  font-size: var(--dg-text-sm);
  max-width: 360px;
  margin-bottom: var(--dg-space-8);
}

.dg-age-gate__actions {
  display: flex;
  gap: var(--dg-space-4);
  align-items: center;
}

/* =============================================================================
   15. MEMBER-GATED CONTENT
   ============================================================================= */

.dg-paywall {
  position: relative;
  overflow: hidden;
}

.dg-paywall__blur {
  filter: blur(16px);
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
}

.dg-paywall__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--dg-black) 60%
  );
}

.dg-paywall__cta {
  text-align: center;
  padding: var(--dg-space-8);
}

/* =============================================================================
   16. SCROLLBAR
   ============================================================================= */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--dg-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dg-crimson);
}

/* =============================================================================
   17. SELECTION
   ============================================================================= */

::selection {
  background: var(--dg-crimson);
  color: var(--dg-text-primary);
}

