/* =========================================================
   SPENSERMAG — Editorial Magazine Stylesheet
   System fonts only. No external assets, no frameworks.
   ========================================================= */

:root{
  --bg: #f7f1e8;
  --paper: #fffaf2;
  --ink: #171512;
  --muted: #6d665c;
  --gold: #b58a42;
  --terracotta: #a35435;
  --olive: #6f7351;
  --line: #e5d9c7;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1180px;
  --radius: 2px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol{ margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4{
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
}

h1{ font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2{ font-size: clamp(1.4rem, 3vw, 2rem); }
h3{ font-size: 1.2rem; }

p{ margin: 0 0 1.1em; }

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

.eyebrow{
  display: inline-block;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: .6em;
}

.section{ padding: 56px 0; }
.section--tight{ padding: 36px 0; }
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 30px;
}
.section-head h2{ margin: 0; }
.section-head .link-more{
  font-size: .85rem;
  font-weight: 600;
  color: var(--terracotta);
  white-space: nowrap;
}

/* ================= Header ================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,241,232,.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.logo span{ color: var(--terracotta); }
.logo-img{
  height: 30px;
  width: auto;
  display: block;
}
.footer-grid .logo-img{ height: 26px; }

.nav-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after{
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}
.nav-toggle{ flex-direction: column; gap: 4px; }
.nav-toggle span{ margin: 0; }

.main-nav{
  display: none;
  width: 100%;
}
.main-nav.is-open{ display: block; }
.main-nav ul{
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 10px;
}
.main-nav a{
  display: block;
  padding: 10px 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.main-nav a.active{ color: var(--terracotta); }

@media (min-width: 860px){
  .nav-toggle{ display: none; }
  .main-nav{ display: block; width: auto; }
  .main-nav ul{
    flex-direction: row;
    gap: 26px;
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
  }
  .main-nav a{
    padding: 6px 0;
    border-bottom: 2px solid transparent;
  }
  .main-nav a:hover, .main-nav a.active{
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
  }
}

/* ================= Breadcrumb ================= */
.breadcrumb{
  font-size: .78rem;
  color: var(--muted);
  padding: 14px 0 0;
}
.breadcrumb a{ color: var(--muted); }
.breadcrumb a:hover{ color: var(--terracotta); }
.breadcrumb .sep{ margin: 0 6px; color: var(--line); }

/* ================= Hero ================= */
.hero{
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero-inner{ max-width: 780px; }
.hero p.lede{
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 640px;
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.btn{
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
  border: 1px solid var(--ink);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary{
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover{ background: var(--terracotta); border-color: var(--terracotta); }
.btn-ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover{ border-color: var(--ink); }

/* ================= Cards & Grid ================= */
.grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
@media (min-width: 640px){
  .grid--2{ grid-template-columns: repeat(2, 1fr); }
  .grid--3{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px){
  .grid--3{ grid-template-columns: repeat(3, 1fr); }
}

.card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(23,21,18,.04);
  transition: box-shadow .15s ease, transform .15s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover{
  box-shadow: 0 6px 20px rgba(23,21,18,.07);
  transform: translateY(-2px);
}
.card .thumb{
  height: 150px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  overflow: hidden;
}
.card .thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card .cat{
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 8px;
}
.card h3{ margin-bottom: 8px; }
.card p{
  color: var(--muted);
  font-size: .93rem;
  margin-bottom: 0;
  flex-grow: 1;
}
.card .meta{
  margin-top: 14px;
  font-size: .75rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

/* ================= Featured Story ================= */
.featured{
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: var(--radius);
}
@media (min-width: 780px){
  .featured{ grid-template-columns: 1.1fr 1fr; align-items: center; padding: 34px; }
}
.featured .thumb{
  height: 220px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.featured .thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 780px){
  .featured .thumb{ order: 2; height: 100%; min-height: 260px; }
}

/* ================= Editor's Note ================= */
.editor-note{
  background: linear-gradient(180deg, var(--paper), var(--bg));
  border: 1px solid var(--line);
  border-left: 4px solid var(--terracotta);
  padding: 28px;
  border-radius: var(--radius);
}
.editor-note .signature{
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

/* ================= Newsletter ================= */
.newsletter{
  background: var(--ink);
  color: var(--paper);
  padding: 44px 0;
  border-radius: var(--radius);
}
.newsletter .container{
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.newsletter h2{ color: var(--paper); }
.newsletter p{ color: #cfc7ba; max-width: 520px; }
.newsletter-form{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}
.newsletter-form input[type="email"]{
  flex: 1 1 220px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #4a453d;
  background: #211f1b;
  color: var(--paper);
  font-family: var(--sans);
  font-size: .92rem;
}
.newsletter-form .btn-primary{
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--paper);
}
.newsletter-form .btn-primary:hover{ background: var(--gold); border-color: var(--gold); }
.newsletter small{ color: #9a927f; }

/* ================= Category strip ================= */
.cat-strip{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px){
  .cat-strip{ grid-template-columns: repeat(5, 1fr); }
}
.cat-strip a{
  display: block;
  text-align: center;
  padding: 20px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .88rem;
}
.cat-strip a:hover{ border-color: var(--terracotta); color: var(--terracotta); }

/* ================= Article ================= */
.article-header{
  padding: 44px 0 20px;
  border-bottom: 1px solid var(--line);
}
.article-header h1{ max-width: 820px; }
.article-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .82rem;
  color: var(--muted);
  margin-top: 14px;
}
.article-hero{
  max-width: 820px;
  margin: 28px auto 0;
  padding: 0 20px;
}
.article-hero img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--line);
  display: block;
}
.article-body{
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 10px;
  font-size: 1.05rem;
}
.article-body h2{ margin-top: 1.6em; }
.article-body h3{ margin-top: 1.3em; }
.article-body p{ margin-bottom: 1.3em; }
.article-body blockquote{
  margin: 2em 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.article-body .drop{
  float: left;
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: .8;
  padding: 6px 8px 0 0;
  color: var(--terracotta);
  font-weight: 700;
}
.article-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
  margin: 20px auto 0;
  padding: 0 20px 50px;
}
.tag{
  font-size: .76rem;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
}

/* ================= About / static pages ================= */
.prose{
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 20px 10px;
}
.prose h2{ margin-top: 1.5em; }
.value-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 26px 0;
}
@media (min-width: 640px){
  .value-grid{ grid-template-columns: repeat(2, 1fr); }
}
.value-grid .item{
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px 20px;
  border-radius: var(--radius);
}

/* ================= Contact form (static display only) ================= */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}
@media (min-width: 860px){
  .contact-grid{ grid-template-columns: 1fr 1fr; }
}
.form-static .field{ margin-bottom: 16px; }
.form-static label{
  display: block;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-static input, .form-static textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
}
.form-static textarea{ min-height: 130px; resize: vertical; }
.notice{
  font-size: .82rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px dashed var(--line);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-top: 16px;
}
.contact-info .item{
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.contact-info .item h3{ margin-bottom: 4px; }
.contact-info .item p{ color: var(--muted); margin-bottom: 0; }

/* ================= Footer ================= */
.site-footer{
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 46px 0 24px;
  margin-top: 40px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 780px){
  .footer-grid{ grid-template-columns: 2fr 1fr 1fr; }
}
.footer-grid h4{
  font-family: var(--sans);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-grid .logo{ margin-bottom: 10px; }
.footer-grid p{ color: var(--muted); font-size: .92rem; max-width: 340px; }
.footer-grid ul li{ margin-bottom: 8px; }
.footer-grid ul a{ font-size: .92rem; color: var(--ink); }
.footer-grid ul a:hover{ color: var(--terracotta); }
.footer-bottom{
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--muted);
}

/* ================= Utility ================= */
.mt-0{ margin-top: 0; }
.text-center{ text-align: center; }
.small{ font-size: .85rem; color: var(--muted); }
