/* hsr.fyi Design System */

:root {
  /* Primary - Coral */
  --coral: #E85D4C;
  --coral-light: #FF7A6B;
  --coral-dark: #C94535;
  
  /* Secondary - Teal */
  --teal: #1A5F5A;
  --teal-light: #2A7A74;
  --teal-dark: #0F3D3A;
  
  /* Neutrals */
  --cream: #FDF8F5;
  --warm-white: #FFFCFA;
  --charcoal: #2D2A26;
  --warm-gray: #6B6560;
  --light-gray: #E8E4E0;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Typography */
  --font-serif: 'Instrument Serif', serif;
  --font-sans: 'DM Sans', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-med: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.text-coral { color: var(--coral); }
.text-teal { color: var(--teal-dark); }
.text-muted { color: var(--warm-gray); }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(253, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 101, 96, 0.1);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--coral);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transform: skewX(-5deg);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--coral);
}

.nav-links a.active {
  color: var(--coral);
}

.nav-cta {
  background: var(--teal);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 1rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--coral);
  color: white;
}

.btn-primary:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 93, 76, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.btn-secondary:hover {
  background: var(--teal);
  color: white;
}

.btn-small {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  color: var(--teal-dark);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--warm-gray);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.tag {
  display: inline-block;
  background: var(--coral);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Page Header */
.page-header {
  padding: 10rem 2rem 4rem;
  background: var(--warm-white);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: linear-gradient(135deg, var(--coral-light) 0%, var(--coral) 50%, var(--coral-dark) 100%);
  transform: skewX(-12deg);
  opacity: 0.06;
  z-index: 0;
}

.page-header .container,
.page-header .container-narrow {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  color: var(--teal-dark);
  margin-bottom: 1rem;
}

.page-header .lead {
  font-size: 1.25rem;
  color: var(--warm-gray);
  max-width: 640px;
}

/* Content Sections */
.section {
  padding: var(--space-3xl) var(--space-lg);
}

.section-teal {
  background: var(--teal-dark);
  color: white;
}

.section-white {
  background: var(--warm-white);
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: var(--space-lg);
  transition: all var(--transition-med);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(45, 42, 38, 0.1);
  border-color: var(--coral-light);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--cream), var(--light-gray));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

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

.card p {
  font-size: 0.95rem;
  color: var(--warm-gray);
  line-height: 1.5;
}

.card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--coral);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Prose Content */
.prose {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--charcoal);
}

.prose h2 {
  color: var(--teal-dark);
  margin: 2.5rem 0 1rem;
}

.prose h3 {
  color: var(--teal-dark);
  margin: 2rem 0 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose a {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--coral-dark);
}

.prose ul, .prose ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid var(--coral);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--warm-gray);
}

.prose .callout {
  background: var(--warm-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid var(--teal);
}

.prose .callout-title {
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 0.5rem;
}

.prose strong {
  color: var(--charcoal);
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

/* Stat Boxes */
.stat-box {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(45, 42, 38, 0.08);
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--coral-light));
}

.stat-box .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warm-gray);
  margin-bottom: 0.5rem;
}

.stat-box .value {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--teal-dark);
  line-height: 1;
}

.stat-box .context {
  color: var(--warm-gray);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background: var(--teal-dark);
  color: white;
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  opacity: 0.7;
  font-size: 0.95rem;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  opacity: 0.6;
  font-family: var(--font-sans);
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  opacity: 0.8;
  font-size: 0.95rem;
  transition: opacity var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 968px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .page-header {
    padding: 8rem 1.5rem 3rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}
