/* =========================================================
   Travellers Media — editorial design system
   Ink + paper base, signal-red accent, Fraunces + Inter
   ========================================================= */

:root {
  --ink: #15181c;
  --ink-soft: #2b2f33;
  --paper: #faf8f3;
  --paper-dim: #f1eee5;
  --signal: #c1272d;
  --signal-dark: #96181d;
  --gold: #b8863b;
  --slate: #565b61;
  --line: #dcd7cc;
  --line-dark: #3a3e42;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

::selection { background: var(--signal); color: var(--paper); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------- Masthead ---------------- */

.masthead { background: var(--paper); }

.masthead-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 28px 24px 18px;
  border-bottom: 4px solid var(--ink);
}

.wordmark-logo { height: 46px; width: auto; }

.masthead-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--slate);
  line-height: 1.6;
}
.masthead-place { color: var(--signal); font-weight: 600; }

.mainnav {
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.mainnav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 52px;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  flex: 1;
  flex-wrap: wrap;
}
.nav-list a {
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  padding: 16px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--signal); }

.nav-search { display: flex; align-items: center; background: rgba(255,255,255,.08); border-radius: 4px; padding: 6px 10px; }
.nav-search input {
  background: transparent; border: 0; color: var(--paper); font-family: var(--sans);
  font-size: 13px; width: 150px; outline: none;
}
.nav-search input::placeholder { color: #9a9d9f; }
.nav-search button { background: none; border: 0; color: var(--paper); cursor: pointer; display: flex; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px 0; }
.nav-toggle span { width: 22px; height: 2px; background: var(--paper); display: block; }

/* ---------------- Hero / lead story ---------------- */

.lead-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.lead-story .lead-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-dim); }
.lead-story .lead-image img { width: 100%; height: 100%; object-fit: cover; }

.tag-chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--signal);
  padding: 5px 10px;
}
.lead-story .lead-image .tag-chip { position: absolute; top: 14px; left: 14px; }

.lead-story h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.12;
  margin: 20px 0 12px;
}
.lead-story h1 a { color: var(--ink); }
.lead-story h1 a:hover { color: var(--signal); }

.lead-story .excerpt { font-size: 17px; color: var(--ink-soft); margin: 0 0 14px; max-width: 62ch; }

.byline { font-size: 13px; color: var(--slate); }
.byline strong { color: var(--ink); font-weight: 600; }

.secondary-stories { display: flex; flex-direction: column; gap: 22px; }
.secondary-story { display: flex; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.secondary-story:last-child { border-bottom: 0; padding-bottom: 0; }
.secondary-story .thumb { width: 96px; height: 72px; flex-shrink: 0; overflow: hidden; background: var(--paper-dim); }
.secondary-story .thumb img { width: 100%; height: 100%; object-fit: cover; }
.secondary-story h3 { font-family: var(--serif); font-size: 17px; line-height: 1.28; font-weight: 600; margin: 0 0 6px; }
.secondary-story h3 a:hover { color: var(--signal); }
.secondary-story .tag-chip { font-size: 10px; padding: 3px 7px; margin-bottom: 6px; background: transparent; color: var(--signal); padding-left: 0; }

/* ---------------- Section blocks ---------------- */

.section-block { max-width: var(--wrap); margin: 0 auto; padding: 40px 24px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.section-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0; }
.section-head .see-all { font-size: 13px; font-weight: 600; color: var(--signal); }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--paper-dim); margin-bottom: 12px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .tag-chip { font-size: 10px; padding: 3px 7px; margin-bottom: 8px; }
.card h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0 0 8px; }
.card h3 a:hover { color: var(--signal); }
.card .excerpt { font-size: 14px; color: var(--slate); margin: 0 0 8px; }
.card .byline { font-size: 12px; }

/* ---------------- Single post ---------------- */

.post-header { max-width: 760px; margin: 40px auto 0; padding: 0 24px; }
.post-header .tag-chip { margin-bottom: 16px; }
.post-header h1 { font-family: var(--serif); font-size: 44px; font-weight: 600; line-height: 1.12; margin: 0 0 18px; }
.post-header .byline { font-size: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 30px; }

.post-featured-image { max-width: var(--wrap); margin: 0 auto 40px; padding: 0 24px; }
.post-featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.post-body { max-width: 720px; margin: 0 auto; padding: 0 24px 60px; font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.post-body p { margin: 0 0 22px; }
.post-body h2 { font-family: var(--serif); font-size: 28px; margin: 40px 0 16px; color: var(--ink); }
.post-body h3 { font-family: var(--serif); font-size: 22px; margin: 32px 0 14px; color: var(--ink); }
.post-body img { margin: 30px 0; width: 100%; }
.post-body blockquote {
  font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.5;
  border-left: 3px solid var(--signal); margin: 32px 0; padding: 4px 0 4px 24px; color: var(--ink);
}
.post-body a { color: var(--signal-dark); text-decoration: underline; }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 26px; }

.related-block { max-width: var(--wrap); margin: 0 auto 60px; padding: 0 24px; }

/* ---------------- Category / archive header ---------------- */

.page-header { max-width: var(--wrap); margin: 0 auto; padding: 44px 24px 20px; }
.page-header h1 { font-family: var(--serif); font-size: 36px; font-weight: 600; border-bottom: 4px solid var(--signal); display: inline-block; padding-bottom: 10px; margin: 0; }
.page-header .lede { color: var(--slate); margin-top: 14px; font-size: 15px; }

.list-grid { max-width: var(--wrap); margin: 0 auto; padding: 20px 24px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.empty-state { max-width: var(--wrap); margin: 0 auto; padding: 60px 24px; color: var(--slate); text-align: center; }

.pagination { display: flex; justify-content: center; gap: 10px; padding: 20px 24px 60px; }
.pagination a, .pagination span { font-size: 13px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--ink); }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------------- Static pages ---------------- */

.static-page { max-width: 720px; margin: 0 auto; padding: 44px 24px 70px; }
.static-page h1 { font-family: var(--serif); font-size: 38px; margin: 0 0 24px; border-bottom: 4px solid var(--signal); padding-bottom: 14px; }
.static-page p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }

.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 30px; max-width: 520px; }
.contact-form label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }
.contact-form input, .contact-form textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); background: #fff;
}
.contact-form button {
  align-self: flex-start; background: var(--signal); color: #fff; border: 0;
  padding: 13px 28px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.contact-form button:hover { background: var(--signal-dark); }
.form-notice { background: var(--paper-dim); border-left: 3px solid var(--gold); padding: 12px 16px; font-size: 14px; }

/* ---------------- Footer ---------------- */

.sitefooter { background: var(--ink); color: #cfd2d4; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 50px 24px 30px; }
.footer-logo { height: 34px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-about p { font-size: 14px; line-height: 1.7; color: #a7abad; max-width: 40ch; }
.footer-links h3, .footer-contact h3 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #fff; margin: 0 0 14px; }
.footer-links ul, .footer-contact ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { font-size: 14px; color: #a7abad; }
.footer-links a:hover, .footer-contact a:hover { color: var(--signal); }
.footer-bottom { display: flex; justify-content: space-between; padding: 20px 24px; border-top: 1px solid var(--line-dark); font-size: 12px; color: #7d8082; }
.footer-bottom a { color: #7d8082; }
.footer-bottom a:hover { color: var(--paper); }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .lead-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .list-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .masthead-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .masthead-meta { align-items: flex-start; }
  .nav-toggle { display: flex; }
  .nav-search { order: 3; width: 100%; margin: 10px 0; }
  .nav-search input { width: 100%; }
  .nav-list {
    display: none; flex-direction: column; width: 100%; gap: 0;
  }
  .nav-list.open { display: flex; }
  .nav-list a { border-bottom: 1px solid var(--line-dark); width: 100%; }
  .mainnav-inner { flex-wrap: wrap; padding: 10px 0; }
  .lead-story h1 { font-size: 30px; }
  .post-header h1 { font-size: 30px; }
  .card-grid { grid-template-columns: 1fr; }
  .list-grid { grid-template-columns: 1fr; }
}
