/*
 * The public archive in kanikosen.org's design. The tokens, nav, buttons, sections, and footer are
 * copied from kanikosen-web's style.css, which stays the source of truth: a change there is carried
 * here by hand. Nothing in the console's app.css applies to these pages.
 */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0a1628;
  --deep-blue: #0f2847;
  --ocean: #1a5276;
  --teal: #17a2b8;
  --light: #e8f4f8;
  --white: #ffffff;
  --text: #2c3e50;
  --text-light: #c5d5e0;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo-img {
  height: 100px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: #138496;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--teal);
}

.btn-outline:hover {
  background: var(--teal);
}

/* ── Sections ── */
.section {
  padding: 100px 0;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 20px;
  line-height: 1.2;
}

.section-intro {
  font-size: 1.125rem;
  color: #5a6c7d;
  margin-bottom: 48px;
}

/* ── Archive index ── */
/* Pages without a hero clear the fixed nav the way kanikosen.org's legal pages do. */
.archive-page,
.issue-page {
  padding-top: 160px;
}

.archive-list {
  list-style: none;
  border-top: 1px solid #d0e0ea;
}

.archive-item {
  padding: 28px 0;
  border-bottom: 1px solid #d0e0ea;
}

.archive-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5a6c7d;
  margin-bottom: 6px;
}

.archive-item h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  margin-bottom: 6px;
}

.archive-item h3 a {
  color: var(--deep-blue);
}

.archive-item h3 a:hover {
  color: var(--teal);
  text-decoration: none;
}

.archive-subtitle {
  color: #5a6c7d;
  max-width: 760px;
}

.archive-empty {
  color: #5a6c7d;
}

/* ── Issue page ── */
/* The reading column and the body rules follow the issue's own master HTML: 680px, 17px, the same
   heading, quote, code, and divider treatment the email carries. */
.issue-container {
  max-width: 728px;
  margin: 0 auto;
  padding: 0 24px;
}

.issue-back {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.issue-back::before {
  content: '\2190\00a0';
}

.issue-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 2.75rem);
  line-height: 1.2;
  color: var(--deep-blue);
  margin-bottom: 16px;
}

.issue-subtitle {
  font-size: 1.2rem;
  line-height: 1.55;
  color: #5a6c7d;
  margin-bottom: 8px;
}

.issue-rule {
  border: 0;
  border-top: 3px solid var(--teal);
  width: 64px;
  height: 3px;
  margin: 28px 0;
}

.issue-body {
  font-size: 17px;
  line-height: 1.7;
}

.issue-body > p:first-child {
  font-size: 19px;
  color: var(--ocean);
}

.issue-body p,
.issue-body ul,
.issue-body ol,
.issue-body table {
  margin: 0 0 20px;
}

.issue-body h2 {
  font-family: var(--font-display);
  color: var(--deep-blue);
  font-size: 25px;
  line-height: 1.3;
  margin: 36px 0 12px;
}

.issue-body h3 {
  font-family: var(--font-display);
  color: var(--deep-blue);
  font-size: 20px;
  line-height: 1.3;
  margin: 28px 0 10px;
}

.issue-body ul,
.issue-body ol {
  padding-left: 1.5em;
}

.issue-body li {
  margin-bottom: 14px;
}

.issue-body a {
  text-decoration: underline;
}

.issue-body blockquote {
  font-style: italic;
  color: var(--ocean);
  border-left: 3px solid var(--teal);
  padding-left: 16px;
  margin: 0 0 20px;
}

.issue-body blockquote p:last-child {
  margin-bottom: 0;
}

.issue-body code,
.issue-footer code {
  background: var(--light);
  color: var(--deep-blue);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
}

.issue-body hr {
  border: 0;
  border-top: 1px solid #d0e0ea;
  margin: 32px 0;
}

.issue-body table {
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.issue-body th,
.issue-body td {
  border: 1px solid #d0e0ea;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.issue-body th {
  background: var(--light);
  color: var(--deep-blue);
  font-weight: 600;
}

.issue-body img {
  margin: 0 auto 20px;
}

.issue-body .center {
  text-align: center;
}

.issue-footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #d0e0ea;
  font-size: 14px;
  line-height: 1.6;
  color: #5a6c7d;
}

.issue-footer p {
  margin-bottom: 14px;
}

.issue-footer strong {
  color: var(--deep-blue);
}

.issue-footer code {
  font-size: 13px;
}

.issue-all {
  margin-top: 28px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: var(--text-light);
  padding: 80px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-logo {
  height: 80px;
  width: auto;
  margin-bottom: -24px;
  margin-left: 0px;
}

.footer-brand h2 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 8px;
}

.footer h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.8rem;
  color: rgba(197, 213, 224, 0.6);
}

.footer-bottom p {
  margin-bottom: 6px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-content { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 22, 40, 0.98);
    padding: 20px 24px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .section { padding: 64px 0; }
  .archive-page,
  .issue-page { padding-top: 140px; }
  .issue-body { font-size: 16px; }
  .issue-body > p:first-child { font-size: 18px; }
}
