/*
Theme Name: Great Lakes Ledger
Theme URI: https://greatlakesledger.com
Description: Premium editorial theme for Great Lakes Ledger — bathymetric design system.
Author: Great Lakes Ledger
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: greatlakesledger
*/

/* ==========================================================================
   DESIGN SYSTEM — ported 1:1 from approved mockup (gll-redesign-spec.html)
   Fonts upgraded: Fraunces (display) + Newsreader (body/dek) + Inter (utility)
   ========================================================================== */

:root {
  --ground: #F5F6F4;
  --paper: #FFFFFF;
  --text: #13201E;
  --muted: #5C6B66;
  --hair: #D7DCD7;
  --accent: #0C6B72;
  --copper: #B5651D;
  --env: #0C6B72;
  --space: #3B3A7A;
  --health: #2D6A4F;
  --tech: #B5651D;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
canvas { display: block; width: 100%; height: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- utility bar ---------- */
.util {
  border-bottom: 1px solid var(--hair);
  background: var(--ground);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(1.1);
}
.util .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  font-family: var(--sans);
}
.util .date {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.util nav { display: flex; gap: 26px; }
.util nav a {
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  transition: color .15s;
}
.util nav a:hover { color: var(--accent); }
.util nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transition: right .22s ease;
}
.util nav a:hover::after { right: 0; color: var(--accent); }
.util .search {
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.util .search a {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.util .search .dot {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.util .search .dot::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
  right: -4px;
  bottom: 0;
}

/* ---------- masthead ---------- */
.masthead {
  text-align: center;
  padding: 40px 0 26px;
  border-bottom: 2px solid var(--text);
}
.masthead .mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}
.masthead .mark .rule { height: 1px; width: 64px; background: var(--hair); }
.masthead .mark .lakes { width: 38px; height: 24px; opacity: .85; }
.masthead h1 {
  font-family: var(--display);
  font-size: clamp(40px, 7.2vw, 82px);
  line-height: .94;
  margin: 0;
  font-weight: 600;
  letter-spacing: -.015em;
}
.masthead h1 .amp {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.masthead .tag {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 16px;
}

/* ---------- kickers / shared ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  display: inline-block;
}
.byline {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--muted);
  text-transform: uppercase;
}
.byline strong { color: var(--text); font-weight: 600; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--hair);
}
.hero .lead {
  padding: 54px 56px 54px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero .lead .kicker { color: var(--env); margin-bottom: 22px; }
.hero .lead h2 {
  font-family: var(--display);
  font-size: clamp(34px, 4.3vw, 56px);
  line-height: 1.02;
  margin: 0 0 22px;
  font-weight: 600;
  letter-spacing: -.015em;
}
.hero .lead h2 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 92%;
  transition: background-size .3s;
}
.hero .lead h2 a:hover { background-size: 100% 2px; }
.hero .lead .dek {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: #33433E;
  margin: 0 0 28px;
  max-width: 30em;
}
.hero .visual {
  position: relative;
  min-height: 460px;
  border-left: 1px solid var(--hair);
  overflow: hidden;
}
.hero .visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .visual canvas {
  position: absolute;
  inset: 0;
}
.hero .visual .cap {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  z-index: 2;
  mix-blend-mode: difference;
}

/* ---------- section head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--text);
  padding-bottom: 12px;
  margin: 54px 0 28px;
}
.section-head h3 {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
}
.section-head .more {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .15s;
}
.section-head .more:hover { color: var(--accent); }

/* ---------- latest rail ---------- */
.latest {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 54px;
}
.latest .item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.latest .item .thumb {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
}
.latest .item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.latest .item h4 {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.12;
  margin: 2px 0 0;
  font-weight: 600;
  letter-spacing: -.01em;
}
.latest .item h4 a { transition: color .15s; }
.latest .item:hover h4 a { color: var(--accent); }
.latest .item .dek {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* ---------- river grid ---------- */
.river {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px 36px;
  margin-bottom: 54px;
}
.story {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 13px;
  border-top: 1px solid var(--hair);
  padding-top: 20px;
}
.story .thumb {
  aspect-ratio: 3/2;
  position: relative;
  overflow: hidden;
  margin-bottom: 2px;
}
.story .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story h4 {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.16;
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em;
}
.story h4 a { transition: color .15s; }
.story:hover h4 a { color: var(--accent); }
.story .dek { font-size: 15px; color: var(--muted); line-height: 1.45; margin: 0; }
.story.wide { grid-column: span 6; }
.story.text-only { grid-column: span 4; }
.story.text-only .num {
  font-family: var(--display);
  font-size: 13px;
  color: var(--copper);
  font-weight: 700;
}

/* ---------- newsletter ---------- */
.news {
  background: var(--accent);
  color: #EAF4F3;
  margin-top: 64px;
}
.news .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 50px 28px;
}
.news h3 {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.04;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
}
.news p { margin: 0; font-size: 16px; color: rgba(255,255,255,.82); max-width: 34em; }
.news form {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
}
.news input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 15px 16px;
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
}
.news input::placeholder { color: rgba(255,255,255,.6); }
.news button {
  border: 0;
  background: #fff;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 22px;
  cursor: pointer;
  transition: background .15s;
}
.news button:hover { background: #EAF4F3; }

/* ---------- footer ---------- */
footer.site { background: #0C2B2E; color: #9FB4B0; font-family: var(--sans); }
footer.site .wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 56px 28px 30px;
}
footer.site .brand h4 {
  font-family: var(--display);
  font-size: 26px;
  color: #fff;
  margin: 0 0 10px;
  font-weight: 600;
}
footer.site .brand p { font-size: 14px; line-height: 1.5; margin: 0; max-width: 26em; }
footer.site h5 {
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5E7C77;
  margin: 0 0 16px;
  font-weight: 600;
}
footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
footer.site ul a { font-size: 14px; color: #C6D6D2; transition: color .15s; }
footer.site ul a:hover { color: #fff; }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
footer.site .legal .wrap {
  display: flex;
  justify-content: space-between;
  padding: 18px 28px;
  font-size: 12px;
  color: #5E7C77;
  letter-spacing: .04em;
}

/* tag chip overlaid on visuals */
.tagchip {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(2px);
  padding: 6px 10px;
  border-radius: 2px;
}

/* load animation */
.fade { opacity: 0; transform: translateY(14px); animation: gll-up .7s cubic-bezier(.2,.7,.2,1) forwards; }
.fade.d1 { animation-delay: .05s; }
.fade.d2 { animation-delay: .13s; }
.fade.d3 { animation-delay: .20s; }
@keyframes gll-up { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; opacity: 1; transform: none; } }

/* ---------- single article ---------- */
.article-wrap { max-width: 38rem; margin: 0 auto; padding: 0 28px; }
.article-header { padding: 54px 0 32px; }
.article-header .kicker { margin-bottom: 18px; }
.article-header h1 {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.04;
  margin: 0 0 18px;
  font-weight: 600;
  letter-spacing: -.015em;
}
.article-header .dek {
  font-size: 21px;
  line-height: 1.45;
  color: #33433E;
  margin: 0 0 22px;
}
.article-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 36px;
}
.article-meta strong { color: var(--text); font-weight: 600; }
.article-featured {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto 48px;
  padding: 0 28px;
}
.article-featured .feat-img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.article-featured .feat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-featured .feat-img-wrap canvas {
  position: absolute;
  inset: 0;
}
.article-body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  color: var(--text);
}
.article-body p { margin: 0 0 1.4em; }
.article-body h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 2em 0 .6em;
  line-height: 1.2;
}
.article-body h3 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  margin: 1.6em 0 .5em;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 2em 0;
  font-style: italic;
  color: #33433E;
}

/* related section */
.related { background: var(--paper); padding: 54px 0; margin-top: 64px; border-top: 2px solid var(--text); }
.related .wrap .section-head { margin-top: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 36px; }

/* ---------- archive / category ---------- */
.archive-header { padding: 48px 0 24px; border-bottom: 2px solid var(--text); margin-bottom: 36px; }
.archive-header .kicker { margin-bottom: 10px; }
.archive-header h1 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 0 0 16px;
  line-height: 1.02;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 54px;
}
.card-grid .story { border-top: 0; }

/* ---------- search / 404 ---------- */
.search-form-wrap { padding: 64px 0; text-align: center; }
.search-form-wrap h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 24px;
}
.search-form-wrap p { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.search-form-wrap .search-field {
  border: 1px solid var(--hair);
  background: var(--paper);
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  width: min(420px, 100%);
  border-radius: 2px;
  color: var(--text);
}
.search-form-wrap .search-submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  margin-left: 8px;
  transition: background .15s;
}
.search-form-wrap .search-submit:hover { background: #0a5c63; }
.search-results-list { margin-top: 48px; }

/* ---------- pagination ---------- */
.pagination {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 24px 0 48px;
  color: var(--muted);
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  color: var(--text);
  transition: background .15s, color .15s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero .lead { padding: 36px 0 30px; order: 2; }
  .hero .visual { order: 1; border-left: 0; min-height: 300px; }
  .latest { grid-template-columns: 1fr; gap: 30px; }
  .story, .story.wide, .story.text-only { grid-column: span 12; }
  .news .wrap, footer.site .wrap { grid-template-columns: 1fr; gap: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-featured { padding: 0; }
  .article-wrap { padding: 0 20px; }
}
@media (max-width: 600px) {
  .util .date { display: none; }
  .util .search span:not(.dot) { display: none; }
  .masthead { padding: 28px 0 18px; }
  .section-head { margin: 36px 0 20px; }
}
