/* ===================================================
   Crimson Wall — Enhanced Main Stylesheet
   Theme: white + crimson red with modern aesthetics
   =================================================== */

/* Enhanced CSS Variables */
:root {
  /* Base Colors */
  --bg:        #ffffff;
  --bg-alt:    #f8f9fa;
  --surface:   #f1f3f5;
  --border:    #dee2e6;
  --accent:    #c0001a;
  --accent-h:  #960014;
  --accent-light: #e63946;
  --text:      #1a1a1a;
  --text-muted:#6c757d;
  --white:     #ffffff;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #c0001a 0%, #8b0010 50%, #66000d 100%);
  --gradient-accent: linear-gradient(135deg, #c0001a 0%, #e63946 100%);
  --gradient-subtle: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.02) 100%);

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:   0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl:   0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(192,0,26,0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 8px 16px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 8px 16px rgba(192,0,26,0.12), 0 16px 32px rgba(192,0,26,0.08);

  /* Typography */
  --radius:    8px;
  --radius-lg: 12px;
  --max-w:     1200px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:      'SF Mono', 'Consolas', 'Monaco', monospace;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Transitions - Subtle and natural */
  --transition-instant: 0.15s ease-out;
  --transition-fast: 0.25s ease-out;
  --transition-base: 0.35s ease-out;
  --transition-slow: 0.5s ease-out;
  --transition-smooth: 0.4s ease-out;
}

/* Subtle Scroll Animations - Natural Fade-ins */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes gentleFade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes subtleRise {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle Scroll Animation Classes - Natural Fade-ins */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.gentle-fade {
  opacity: 0;
  animation: gentleFade 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.subtle-rise {
  opacity: 0;
  animation: subtleRise 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Subtle Staggered Animation Delays - Very short */
.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.08s; }
.fade-in-up:nth-child(3) { animation-delay: 0.11s; }
.fade-in-up:nth-child(4) { animation-delay: 0.14s; }
.fade-in-up:nth-child(5) { animation-delay: 0.17s; }
.fade-in-up:nth-child(6) { animation-delay: 0.2s; }
.fade-in-up:nth-child(7) { animation-delay: 0.23s; }
.fade-in-up:nth-child(8) { animation-delay: 0.26s; }
.fade-in-up:nth-child(9) { animation-delay: 0.29s; }
.fade-in-up:nth-child(10) { animation-delay: 0.32s; }
.fade-in-up:nth-child(11) { animation-delay: 0.35s; }
.fade-in-up:nth-child(12) { animation-delay: 0.38s; }

.gentle-fade:nth-child(1) { animation-delay: 0.06s; }
.gentle-fade:nth-child(2) { animation-delay: 0.09s; }
.gentle-fade:nth-child(3) { animation-delay: 0.12s; }
.gentle-fade:nth-child(4) { animation-delay: 0.15s; }
.gentle-fade:nth-child(5) { animation-delay: 0.18s; }
.gentle-fade:nth-child(6) { animation-delay: 0.21s; }
.gentle-fade:nth-child(7) { animation-delay: 0.24s; }
.gentle-fade:nth-child(8) { animation-delay: 0.27s; }

.subtle-rise:nth-child(1) { animation-delay: 0.04s; }
.subtle-rise:nth-child(2) { animation-delay: 0.08s; }
.subtle-rise:nth-child(3) { animation-delay: 0.12s; }
.subtle-rise:nth-child(4) { animation-delay: 0.16s; }
.subtle-rise:nth-child(5) { animation-delay: 0.2s; }
.subtle-rise:nth-child(6) { animation-delay: 0.24s; }
.subtle-rise:nth-child(7) { animation-delay: 0.28s; }
.subtle-rise:nth-child(8) { animation-delay: 0.32s; }

/* In-View Animation Trigger */
.in-view {
  opacity: 1;
  transform: none;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base), border-color var(--transition-base);
}

/* Improved Selection */
::selection {
  background: rgba(192,0,26,0.2);
  color: var(--text);
}

::-moz-selection {
  background: rgba(192,0,26,0.2);
  color: var(--text);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

main {
  flex: 1;
}

/* Header & Navigation */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-smooth), backdrop-filter var(--transition-smooth);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(15px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--spacing-md);
  max-width: var(--max-w);
  margin: 0 auto;
  gap: var(--spacing-sm);
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform var(--transition-smooth), color var(--transition-base);
}

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

.site-logo:hover {
  text-decoration: none;
  color: var(--text);
  transform: scale(1.03);
}

/* Primary Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-smooth), left var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link:hover::before {
  width: 80%;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-glow);
}

.nav-link:hover::before {
  opacity: 0;
}

.nav-item:hover .nav-link {
  background: var(--accent);
  color: var(--white);
}

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 0.5rem 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: all var(--transition-base);
}

.nav-item:hover .dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-base);
  position: relative;
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a:hover {
  background: var(--bg-alt);
  color: var(--accent);
  text-decoration: none;
  padding-left: 1.25rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--radius);
  transition: background var(--transition-smooth);
}

.nav-toggle:hover {
  background: var(--surface);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-smooth);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Page Hero */
.page-hero {
  background: var(--bg);
  border-bottom: 3px solid var(--accent);
  padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--gradient-overlay);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero h1 span.accent {
  color: var(--accent);
}

.page-hero .page-hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

.page-hero .breadcrumb {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.page-hero .breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.page-hero .breadcrumb a:hover {
  color: var(--accent);
}

/* Home Hero */
.home-hero {
  background: var(--gradient-hero);
  padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: float 6s ease-in-out infinite;
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
}

.home-hero .container {
  position: relative;
  z-index: 1;
}

.home-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.home-hero h1 em {
  font-style: normal;
  color: rgba(255,255,255,0.9);
}

.home-hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin: 0 auto 2rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

.hero-cta {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn,
a.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  transition: all var(--transition-smooth);
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn::before,
a.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before,
a.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover,
a.btn:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  text-decoration: none !important;
}

.btn:active,
a.btn:active {
  transform: translateY(0);
}

.btn-outline,
a.btn-outline {
  background: transparent;
  color: var(--white) !important;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: none;
}

.btn-outline:hover,
a.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* Services Grid */
.services-section {
  padding: var(--spacing-2xl) var(--spacing-md);
  background: var(--bg);
}

.services-section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Main Content */
.page-content {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.content-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.content-wrap h1,
.content-wrap h2,
.content-wrap h3,
.content-wrap h4 {
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

.content-wrap h1 {
  font-size: 2.25rem;
  margin-top: 0;
  font-weight: 700;
}

.content-wrap h2 {
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.content-wrap h3 {
  font-size: 1.25rem;
  color: var(--accent);
}

.content-wrap p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.content-wrap ul,
.content-wrap ol {
  margin: 1rem 0 1.5rem 1.75rem;
}

.content-wrap li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.content-wrap img {
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.content-wrap figure {
  margin: 2rem 0;
}

.content-wrap figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

.content-wrap blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
  box-shadow: var(--shadow-sm);
}

.content-wrap pre {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.content-wrap code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  color: #b00015;
}

.content-wrap pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.content-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-wrap th {
  background: var(--bg-alt);
  color: var(--text);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
}

.content-wrap td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.content-wrap tr:hover td {
  background: rgba(192,0,26,0.04);
}

.content-wrap hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5rem 0;
  background: var(--gradient-accent);
  height: 2px;
}

.content-wrap strong {
  color: var(--text);
  font-weight: 600;
}

.content-wrap a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-fast);
}

.content-wrap a:hover {
  color: var(--accent-h);
  border-bottom-color: var(--accent-h);
}

/* Blog Layouts */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-md);
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}

.post-list {
  list-style: none;
}

.post-list-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.post-list-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.post-list-item h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.post-list-item h2 a {
  color: var(--text);
  transition: color var(--transition-fast);
}

.post-list-item h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-meta span + span::before {
  content: ' · ';
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  transition: all var(--transition-smooth);
}

.tag:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: scale(1.02);
}

/* Sidebar */
.sidebar .widget {
  margin-bottom: 2rem;
}

.sidebar .widget-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.sidebar ul li:hover {
  padding-left: 0.5rem;
  color: var(--accent);
}

.sidebar ul li:last-child {
  border-bottom: none;
}

/* Single Post */
.post-header {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-lg);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text);
  max-width: 800px;
  margin: 0 auto 1rem;
  font-weight: 700;
}

.post-header .post-meta {
  justify-content: center;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.post-body {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

/* Link Preview Cards */
.link-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.link-preview:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.link-preview a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
}

.link-preview strong {
  color: var(--text);
  font-size: 0.95rem;
}

.link-preview span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto 2.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition-smooth);
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--accent);
  text-decoration: none;
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: var(--text);
  transition: color var(--transition-fast);
}

.contact-info a:hover {
  color: var(--accent);
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.mt-0 {
  margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .primary-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent);
    padding: 1rem;
    gap: 0;
    box-shadow: var(--shadow-lg);
  }

  .primary-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .dropdown {
    position: static;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
    opacity: 1;
    transform: none;
  }

  .nav-item:hover .dropdown {
    display: none;
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }
}

/* ====================================================
   Content Styles (About, Blog Articles, Services)
   ==================================================== */

/* About Page Hero */
.hero {
  background: var(--gradient-hero);
  color: var(--white);
  padding: var(--spacing-2xl) var(--spacing-md);
  margin: calc(-1 * var(--spacing-2xl)) calc(-1 * var(--spacing-md)) var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

/* Section Wrappers */
.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text);
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

/* Feature Items */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-item {
  text-align: center;
  padding: var(--spacing-md);
  transition: transform var(--transition-smooth);
}

.feature-item:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
  color: var(--white);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
}

.feature-item:hover .feature-icon {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(192,0,26,0.3);
}

.feature-item h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  margin: 2rem 0;
  box-shadow: var(--shadow-card);
}

.cta-section h2 {
  color: var(--text);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* Blog Article Styles */
.crimson-article {
  line-height: 1.8;
}

.crimson-article h1,
.crimson-article h2,
.crimson-article h3 {
  color: var(--accent);
  font-weight: 600;
}

.crimson-article h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5em;
  margin-bottom: 0.75em;
}

.crimson-article a {
  color: var(--accent);
  border-bottom: 1px solid rgba(192,0,26,0.3);
  transition: all var(--transition-fast);
}

.crimson-article a:hover {
  border-bottom-color: var(--accent);
}

.crimson-article strong {
  color: var(--text);
  font-weight: 600;
}

/* Intro Quote */
.intro-quote {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

/* Key Finding */
.key-finding {
  background: rgba(192,0,26,0.06);
  border: 1px solid rgba(192,0,26,0.2);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Code Block */
.code-block {
  background: #f8f9fa;
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

/* Prompt Box */
.prompt-box {
  background: var(--white);
  border: 2px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Section Highlight */
.section-highlight {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Stats Box */
.stats-box {
  background: var(--gradient-accent);
  color: var(--white);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.stats-box h3 {
  color: var(--white);
  margin-top: 0;
  font-weight: 600;
}

/* Author Bio */
.author-bio {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

/* Chart Container */
.chart-container {
  margin: 2rem 0;
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Comment */
.comment {
  border-left: 3px solid var(--border);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ====================================================
   Service Page Components
   ==================================================== */

/* Service Lead */
.service-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 720px;
}

/* Benefit Grid */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0 2.5rem;
}

.benefit-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius);
  transition: all var(--transition-smooth);
}

.benefit-item:hover {
  background: var(--bg-alt);
  transform: translateX(4px);
}

.benefit-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(192,0,26,0.08);
  border: 1px solid rgba(192,0,26,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all var(--transition-base);
}

.benefit-item:hover .benefit-icon {
  background: var(--accent);
  color: var(--white);
  transform: scale(1.08);
  box-shadow: var(--shadow-glow);
}

.benefit-icon svg {
  width: 24px;
  height: 24px;
}

.benefit-item h4 {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.benefit-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Process List */
.process-list {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 2.5rem;
}

.process-list li {
  counter-increment: step;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: all var(--transition-smooth);
}

.process-list li:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
  transform: translateX(4px);
}

.process-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.process-list li strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.process-list li p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Service Card Icon */
.service-card-icon {
  width: 56px;
  height: 56px;
  background: rgba(192,0,26,0.08);
  border: 1px solid rgba(192,0,26,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
  transition: all var(--transition-base);
}

.service-card:hover .service-card-icon {
  background: var(--accent);
  color: var(--white);
  transform: scale(1.1);
}

.service-card-icon svg {
  width: 28px;
  height: 28px;
}

/* Stats Strip */
.stats-strip {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-xl) var(--spacing-md);
}

.stats-strip .container {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  max-width: var(--max-w);
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  transition: transform var(--transition-base);
}

.stat-item:hover {
  transform: scale(1.05);
}

.stat-item .stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item .stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Page CTA */
.page-cta {
  background: var(--gradient-hero);
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  margin-top: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.page-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.page-cta .container {
  position: relative;
  z-index: 1;
}

.page-cta h2 {
  color: var(--white);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-cta p {
  color: rgba(255,255,255,0.9);
  max-width: 520px;
  margin: 0 auto 1.75rem;
  font-size: 1rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

.page-cta .btn-outline {
  border-color: rgba(255,255,255,0.6);
  font-size: 1rem;
  padding: 0.85rem 2.25rem;
}

.page-cta .btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Check List */
.check-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.check-list li {
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2,6 5,9 10,3' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-sm);
}

/* Callout */
.callout {
  background: rgba(192,0,26,0.05);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.callout p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.callout strong {
  color: var(--accent);
  font-weight: 600;
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip .container {
    gap: 2rem;
  }

  .stat-item .stat-number {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .page-cta,
  .hero-cta,
  .nav-toggle {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .content-wrap {
    max-width: 100%;
  }

  a {
    color: var(--text);
    text-decoration: underline;
  }

  .service-card,
  .post-list-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--border);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
