/* The Fegatello — global stylesheet */

/* Self-hosted fonts */

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-500-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Franklin';
  src: url('/fonts/libre-franklin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Franklin';
  src: url('/fonts/libre-franklin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* ------ Design tokens ------ */
 
:root {
  /* Palette: cream paper, dark ink, single accent for kickers */
  --paper:      #f7f2e5;
  --ink:        #1a1a1a;
  --ink-soft:   #4a4a4a;
  --ink-muted:  #6b6b6b;
  --ink-faint:  #999999;
  --rule:       #2a2a2a;
  --rule-soft:  #b8b3a3;
  --accent:     #8b0000;
  --photo:      #d4cfc0;
  --photo-alt:  #c2b8a0;
 
  /* Type stacks (fallbacks are intentionally close in metrics) */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-serif:   'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans:    'Libre Franklin', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
 
  /* Layout */
  --max-width: 1100px;
  --gutter:    clamp(1rem, 3vw, 1.5rem);
}
 
 
/* ------ Reset & base ------ */
 
*, *::before, *::after { box-sizing: border-box; }
 
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
 
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
 
img { max-width: 100%; height: auto; display: block; }
 
a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
 
a:hover { color: var(--accent); }
 
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
 
 
/* ------ Accessibility ------ */
 
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  z-index: 100;
}
 
.skip-link:focus { top: 0; color: var(--paper); }
 
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
 
 
/* ------ Page container ------ */
 
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3rem;
}
 
 
/* ------ Masthead ------ */
 
.masthead {
  text-align: center;
  border-bottom: 3px double var(--rule);
  padding-bottom: 1rem;
}
 
.masthead__edition {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  margin: 0 0 0.375rem;
}
 
.masthead__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 9vw, 5rem);
  font-weight: 500;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
 
.masthead__title a,
.masthead__title a:hover { color: inherit; }
 
.masthead__motto {
  font-style: italic;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin: 0.625rem 0 0;
}
 
 
/* ------ Dateline ------ */
 
.dateline {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--rule);
}
 
@media (min-width: 600px) {
  .dateline {
    justify-content: space-between;
  }
}
 
 
/* ------ Primary navigation ------ */
 
.primary-nav {
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
  text-align: center;
}
 
.primary-nav__toggle {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--ink);
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
 
.primary-nav__toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
 
.primary-nav__chevron {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s ease;
}
 
.primary-nav__toggle[aria-expanded="true"] .primary-nav__chevron {
  transform: rotate(-135deg) translate(-1px, -1px);
}
 
.primary-nav__list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 0.5px solid var(--rule-soft);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}
 
.primary-nav__toggle[aria-expanded="true"] + .primary-nav__list {
  display: flex;
}
 
@media (min-width: 600px) {
  .primary-nav__toggle {
    display: none;
  }
 
  .primary-nav__list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0;
    border-top: 0;
  }
}
 
 
/* ------ Hero grid: lead story + sidebar ------ */
 
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 1.5rem;
}
 
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
  }
}
 
 
/* ------ Lead story ------ */
 
.kicker {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 0.375rem;
}
 
.lead-story__headline {
  font-size: clamp(1.625rem, 4vw, 2rem);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 0.625rem;
}
 
.deck {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 0.875rem;
  line-height: 1.4;
}
 
.lead-story__figure { margin: 0 0 0.625rem; }
 
.lead-story__figure figcaption {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.6875rem;
  color: var(--ink-muted);
  padding: 0.375rem 0 0;
}
 
.byline {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  margin: 0 0 0.625rem;
}
 
.lead-story__lede {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}
 
.lead-story__lede::first-letter {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 3.25rem);
  font-style: italic;
  float: left;
  line-height: 0.9;
  padding: 0.2rem 0.5rem 0 0;
  font-weight: 500;
}
 
 
/* ------ Photo placeholders (swap in real <img> later) ------ */
 
.photo-placeholder {
  background: var(--photo);
  aspect-ratio: 16 / 9;
  width: 100%;
}
 
.photo-placeholder--small { aspect-ratio: 4 / 3; }
.photo-placeholder--alt   { background: var(--photo-alt); }
 
 
/* ------ Sidebar ------ */
 
.sidebar {
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--ink-faint);
}
 
@media (min-width: 768px) {
  .sidebar {
    border-top: 0;
    border-left: 0.5px solid var(--ink-faint);
    padding: 0 0 0 1.25rem;
  }
}
 
.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule);
  margin: 0 0 1rem;
}
 
.top-story {
  padding-bottom: 0.875rem;
  margin-bottom: 0.875rem;
  border-bottom: 0.5px solid var(--rule-soft);
}
 
.top-story:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
 
.top-story h4 {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
  margin: 0 0 0.25rem;
  letter-spacing: -0.005em;
}
 
.top-story p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.4;
}
 
.top-story--opinion h4 { font-style: italic; }
 
 
/* ------ Section row (World, etc.) ------ */
 
.section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid var(--rule);
}
 
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
 
@media (min-width: 480px) {
  .story-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}
 
@media (min-width: 768px) {
  .story-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
 
.story-card__link { display: block; }
 
.story-card h4 {
  font-size: 0.9375rem;
  line-height: 1.2;
  font-weight: 500;
  margin: 0.625rem 0 0.25rem;
  letter-spacing: -0.005em;
}
 
.story-card p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.45;
}
 
 
/* ------ Footer ------ */
 
.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 3px double var(--rule);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-muted);
}
 
.site-footer p { margin: 0.375rem 0; }
.site-footer a { color: var(--ink-muted); }
 
 
/* ------ Print: render as a real paper would ------ */
 
@media print {
  body { background: white; }
  .skip-link, .primary-nav { display: none; }
}
 
