/* Lord Otaku News — site chrome. Neutral, modern, ready for more than one series.
   STARCROSSED neon-harbor colors live in starcrossed.css and must stay scoped. */
:root {
  --paper: #f3f0e8;
  --paper-2: #e8e3d7;
  --paper-3: #fffdf8;
  --ink: #161513;
  --ink-soft: #3c3933;
  --muted: #6d6860;
  --rule: #d5d0c4;
  --accent: #1c313a;
  --copper: #b8481a;
  --copper-hover: #8e3411;
  --focus: #1c313a;
  --shadow: 0 1px 2px rgba(22, 21, 19, 0.06), 0 8px 24px rgba(22, 21, 19, 0.06);
  --radius: 14px;
  --header-h: 4.25rem;
  --max: 72rem;
  --measure: 42rem;
  --font-display: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --font-news: "Newsreader", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-ui: "Figtree", "Segoe UI", "Helvetica Neue", sans-serif;
  --ad-bg: #efeae0;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--copper);
  text-underline-offset: 0.16em;
}
a:hover { color: var(--copper-hover); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.85rem;
  z-index: 100;
  border-radius: 4px;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.logo:hover { color: var(--ink); }
.logo__mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
}
.logo__type {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0.18rem;
}
.logo__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.logo__news {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--copper);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    background: var(--paper-3);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 1rem 1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn--solid {
  background: var(--ink);
  color: var(--paper);
}
.btn--solid:hover { background: #000; color: var(--paper); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* —— Home: news lead —— */
.kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.top-stories {
  padding: 1.75rem 0 0.5rem;
}
.top-stories__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.25rem 1.5rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}
.story-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.story-card:hover .story-card__title { color: var(--copper); }
.story-card--lead .story-card__title {
  font-family: var(--font-news);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.story-card__title {
  font-family: var(--font-news);
  font-size: 1.25rem;
  font-weight: 560;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.story-card__excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--copper); }

@media (max-width: 860px) {
  .top-stories__grid { grid-template-columns: 1fr; }
  .story-card--lead { padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
}

/* News listing */
.page-head {
  padding: 2.2rem 0 1.2rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1.5rem;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 0.5rem;
}
.page-head p { margin: 0; color: var(--ink-soft); max-width: 38rem; }

.news-list {
  display: flex;
  flex-direction: column;
}
.news-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.news-item:hover .news-item__title { color: var(--copper); }
.news-item__title {
  font-family: var(--font-news);
  font-size: 1.35rem;
  font-weight: 560;
  line-height: 1.25;
  margin: 0 0 0.35rem;
}
.news-item__excerpt { margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: 0.3rem; }
}

.news-empty {
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.section-head a {
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink);
}
.section-head a:hover { color: var(--copper); }

/* Series catalog */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}
.series-tile {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  min-height: 10rem;
}
.series-tile:hover { border-color: var(--ink); }
.series-tile h2,
.series-tile h3 {
  font-family: var(--font-display);
  margin: 0.3rem 0 0.5rem;
  letter-spacing: 0.04em;
}
.series-tile--soon {
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
  background: transparent;
}
.status-pill {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid currentColor;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

/* Legal pages */
.prose {
  max-width: var(--measure);
  padding-bottom: 3.5rem;
}
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin: 2rem 0 0.6rem;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 2rem 0 0.5rem;
}
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 2rem 0 5.5rem;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}
.site-footer .logo__name { font-size: 0.95rem; }
.site-footer h2 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--copper); }
.site-footer p { color: var(--muted); font-size: 0.9rem; margin: 0.6rem 0 0; }
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* Ad placeholders — always labeled, never inside the comic scroll */
.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed #b9b2a4;
  color: var(--muted);
  text-align: center;
  padding: 1rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
}
.ad-slot__label { display: block; }
.ad-slot__note {
  display: block;
  margin-top: 0.25rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  font-size: 0.78rem;
}
.ad-slot--banner { margin: 1.5rem 0; min-height: 90px; display: grid; place-items: center; }
.ad-slot--footer { margin-top: 1.25rem; }

/* Cookie consent */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.2);
}
.consent[hidden] { display: none !important; }
.consent__inner {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  justify-content: space-between;
}
.consent p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.92rem;
  color: #ece7dc;
}
.consent a { color: #f0c9b0; }
.consent .btn--solid { background: var(--paper); color: var(--ink); }
.consent .btn--solid:hover { background: #fff; color: var(--ink); }
.consent .btn--ghost { color: var(--paper); border-color: #6a655c; }
.consent .btn--ghost:hover { border-color: var(--paper); color: var(--paper); }

.fetched-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
