/* ============================================
   THE QALRIX JOURNAL — Intelligence Journal
   ============================================ */

:root {
  --red-primary: #B91C1C;
  --red-deep: #991B1B;
  --rose-accent: #FECACA;
  --paper-white: #FFFEFA;
  --ink-black: #111111;
  --border-gray: #D6D3D1;
  --text-muted: #57534E;
  --text-light: #78716C;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-section: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Source Serif Pro', Georgia, serif;
  --font-label: 'Inter', system-ui, sans-serif;

  --max-width: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-black);
  background-color: var(--paper-white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* Typography Utilities */
.label {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.label--red {
  color: var(--red-primary);
}

.headline-main {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-black);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-section);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-black);
}

.section-deck {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Rules & Dividers */
.masthead-rule,
.section-rule {
  border: none;
  border-top: 1px solid var(--border-gray);
  margin: 0;
}

.masthead-rule--double {
  border-top: 3px double var(--ink-black);
}

.masthead-rule--thick {
  border-top: 3px solid var(--ink-black);
}

.section-rule {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================
   Masthead
   ============================================ */
.masthead {
  text-align: center;
  padding: 1.5rem var(--gutter) 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.masthead-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-black);
  margin: 1rem 0 0.5rem;
  line-height: 1;
}

.masthead-subtitle {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.masthead-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0;
  padding: 0.75rem 0;
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-link {
  padding: 0.25rem 0.75rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: var(--red-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: var(--red-primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-sep {
  color: var(--border-gray);
  user-select: none;
}

/* ============================================
   Layout
   ============================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink-black);
}

/* ============================================
   Section 1: Front Page
   ============================================ */
.front-page {
  padding-top: 2rem;
}

.front-page-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.lead-deck {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.byline {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

/* Editorial Image Placeholder */
.editorial-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    135deg,
    #E7E5E4 0%,
    #D6D3D1 40%,
    #A8A29E 100%
  );
  border: 1px solid var(--border-gray);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.editorial-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

.editorial-image-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.editorial-image-caption {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  background: rgba(255, 254, 250, 0.85);
  padding: 0.25rem 0.5rem;
}

/* Featured Stories Sidebar */
.sidebar-title {
  font-family: var(--font-section);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--red-primary);
  margin-bottom: 1rem;
}

.story-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.story-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-gray);
}

.story-item:last-child {
  border-bottom: none;
}

.story-number {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red-primary);
  line-height: 1;
  flex-shrink: 0;
  width: 1.75rem;
}

.story-category {
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-primary);
  margin-bottom: 0.25rem;
}

.story-headline {
  font-family: var(--font-section);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  display: inline;
  background-image: linear-gradient(var(--red-primary), var(--red-primary));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.story-headline:hover {
  color: var(--red-primary);
  background-size: 100% 2px;
}

.story-meta {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ============================================
   Section 2: Featured Research
   ============================================ */
.columns-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-gray);
}

.column-article {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-right: 1px solid var(--border-gray);
}

.column-article:last-child {
  border-right: none;
  padding-right: 0;
}

.column-article + .column-article {
  padding-left: 1.5rem;
}

.article-category {
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-primary);
  margin-bottom: 0.5rem;
}

.article-headline {
  font-family: var(--font-section);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.article-headline a {
  background-image: linear-gradient(var(--red-primary), var(--red-primary));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.article-headline a:hover {
  color: var(--red-primary);
  background-size: 100% 2px;
}

.article-summary {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.article-meta {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ============================================
   Section 3: Global Insights
   ============================================ */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border-gray);
}

.insight-block {
  padding: 1.75rem;
  border-right: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
}

.insight-block:nth-child(2n) {
  border-right: none;
}

.insight-block:nth-last-child(-n+2) {
  border-bottom: none;
}

.insight-region {
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.insight-title {
  font-family: var(--font-section);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.25rem 0 0.75rem;
  color: var(--ink-black);
}

.insight-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.read-more {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--red-primary);
  position: relative;
  display: inline-block;
}

.read-more::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--red-primary);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.read-more:hover::after {
  transform: scaleX(1);
}

/* ============================================
   Section 4: Data Report
   ============================================ */
.data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 2px solid var(--ink-black);
}

.data-stat {
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border-gray);
  background: var(--paper-white);
}

.data-stat:last-child {
  border-right: none;
}

.data-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--red-primary);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.data-unit {
  font-size: 0.6em;
  vertical-align: super;
}

.data-label {
  font-family: var(--font-section);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-black);
  margin-bottom: 0.5rem;
}

.data-desc {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ============================================
   Section 5: Editor's Note
   ============================================ */
.editors-note {
  background-color: #FAFAF9;
  border-top: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.editors-note-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 0;
}

.editors-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--ink-black);
}

.editors-body p {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.drop-cap::first-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  margin: 0.1em 0.15em 0 0;
  color: var(--red-primary);
}

.editors-signature {
  font-family: var(--font-section);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-black);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray);
}

/* ============================================
   Section 6: Research Areas
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-gray);
}

.category-card {
  display: block;
  padding: 1.75rem;
  border-right: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
  transition: background-color 0.3s ease;
}

.category-card:nth-child(3n) {
  border-right: none;
}

.category-card:hover {
  background-color: var(--rose-accent);
}

.category-index {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.category-name {
  font-family: var(--font-section);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.category-card:hover .category-name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--red-primary);
}

.category-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   Section 7: Archive
   ============================================ */
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border-gray);
}

.timeline-year {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0.75rem;
  border-right: 1px solid var(--border-gray);
  transition: background-color 0.3s ease;
}

.timeline-year:last-child {
  border-right: none;
}

.timeline-year:hover {
  background-color: #FAFAF9;
}

.timeline-year--current {
  background-color: var(--rose-accent);
}

.timeline-year--current:hover {
  background-color: #FED7D7;
}

.year-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--red-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.year-label {
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.year-count {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-light);
}

/* ============================================
   Section 8: Subscribe Panel
   ============================================ */
.subscribe-panel {
  background-color: var(--red-primary);
  color: var(--paper-white);
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding: 4rem var(--gutter);
  text-align: center;
}

.subscribe-inner {
  max-width: 640px;
  margin: 0 auto;
}

.subscribe-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.subscribe-deck {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.subscribe-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn--primary {
  background-color: var(--paper-white);
  color: var(--red-primary);
  border-color: var(--paper-white);
}

.btn--primary:hover {
  background-color: transparent;
  color: var(--paper-white);
}

.btn--secondary {
  background-color: transparent;
  color: var(--paper-white);
  border-color: var(--paper-white);
}

.btn--secondary:hover {
  background-color: var(--paper-white);
  color: var(--red-primary);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-block {
  margin-bottom: 2rem;
}

.contact-block:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-primary);
  margin-bottom: 0.375rem;
}

.contact-block a {
  font-family: var(--font-section);
  font-size: 1rem;
  background-image: linear-gradient(var(--red-primary), var(--red-primary));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.contact-block a:hover {
  color: var(--red-primary);
  background-size: 100% 1px;
}

.contact-note {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Contact Form */
.contact-form {
  border: 1px solid var(--border-gray);
  padding: 2rem;
  background: #FAFAF9;
}

.form-title {
  font-family: var(--font-section);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--red-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-gray);
  background: var(--paper-white);
  color: var(--ink-black);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn--submit {
  background-color: var(--red-primary);
  color: var(--paper-white);
  border-color: var(--red-primary);
  width: 100%;
}

.btn--submit:hover {
  background-color: var(--red-deep);
  border-color: var(--red-deep);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 3px double var(--ink-black);
  background-color: #FAFAF9;
  padding: 3rem var(--gutter) 2rem;
  margin-top: 0;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-gray);
}

.footer-heading {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-black);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--red-primary);
  display: inline-block;
}

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

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
  display: inline-block;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--red-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.footer-links a:hover {
  color: var(--red-primary);
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-masthead {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

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

.reveal {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.reveal-delay-1 {
  animation-delay: 0.15s;
}

.reveal-delay-2 {
  animation-delay: 0.3s;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
  }

  .nav-link::after,
  .story-headline,
  .article-headline a,
  .read-more::after,
  .footer-links a::after {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .front-page-grid {
    grid-template-columns: 1fr;
  }

  .featured-stories {
    border-top: 2px solid var(--red-primary);
    padding-top: 1.5rem;
  }

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

  .column-article {
    border-right: none;
    border-bottom: 1px solid var(--border-gray);
    padding: 1.5rem 0;
  }

  .column-article + .column-article {
    padding-left: 0;
  }

  .column-article:last-child {
    border-bottom: none;
  }

  .data-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .data-stat:nth-child(2) {
    border-right: none;
  }

  .data-stat:nth-child(1),
  .data-stat:nth-child(2) {
    border-bottom: 1px solid var(--border-gray);
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-card:nth-child(3n) {
    border-right: 1px solid var(--border-gray);
  }

  .category-card:nth-child(2n) {
    border-right: none;
  }

  .timeline {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline-year:nth-child(3) {
    border-right: none;
  }

  .timeline-year:nth-child(1),
  .timeline-year:nth-child(2),
  .timeline-year:nth-child(3) {
    border-bottom: 1px solid var(--border-gray);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .masthead-top {
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
  }

  .nav-sep {
    display: none;
  }

  .masthead-nav {
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.375rem 0.5rem;
  }

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

  .insight-block {
    border-right: none;
  }

  .insight-block:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border-gray);
  }

  .insight-block:last-child {
    border-bottom: none;
  }

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

  .data-stat {
    border-right: none;
    border-bottom: 1px solid var(--border-gray);
  }

  .data-stat:last-child {
    border-bottom: none;
  }

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

  .category-card {
    border-right: none;
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-year {
    border-right: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
  }

  .timeline-year:nth-child(2n) {
    border-right: none;
  }

  .timeline-year:nth-child(5),
  .timeline-year:nth-child(6) {
    border-bottom: none;
  }

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

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

@media (max-width: 480px) {
  section {
    padding: 2rem 0;
  }

  .subscribe-panel {
    padding: 3rem var(--gutter);
  }

  .subscribe-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }

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

  .timeline-year {
    border-right: none;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 1rem 1.25rem;
  }

  .year-number {
    font-size: 1.25rem;
    margin-bottom: 0;
  }

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