@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@300;400;500;600;700&family=Fredoka:wght@400;500;600;700&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:          #faf9f5;
  --text:        #141413;
  --text-muted:  #666;
  --border:      #ddd;
  --border-dark: #141413;

  --c-interactive: #255ba7;
  --c-misc:        #5b3f7f;
  --c-video:       #a72525;
  --c-audio:       #c47a1e;
  --c-visual:      #57973c;

  --font-display: 'Fredoka', sans-serif;
  --font-body:    'Inconsolata', monospace;

  --max-width: 680px;
  --nav-height: 80px;
}

/* ─── HONEYPOT (anti-spam) ───────────────────────────────── */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { opacity: 0.7; }

/* ─── HEADER / NAV ───────────────────────────────────────── */
header {
  padding: 0 40px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background-color: var(--bg);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.site-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.site-title:hover { opacity: 0.8; }

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-display);
  font-size: 17px;
}

nav a {
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s;
}

nav a:hover { opacity: 0.55; }

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo svg { width: 34px; height: 34px; }

.nav-suggest {
  font-weight: 600;
  border-bottom: 2px solid var(--text);
  padding-bottom: 1px;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

.hamburger svg { width: 24px; height: 24px; }

/* ─── PAGE BODY ──────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── PAGE HEADER (archive / form) ──────────────────────── */
.page-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-dark);
}

/* ─── ISSUE HEADER (current issue) ──────────────────────── */
.issue-header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-dark);
}

.issue-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.issue-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.issue-intro {
  font-size: 16px;
  color: var(--text-muted);
  font-style: italic;
  max-width: 560px;
}

/* ─── CATEGORY TAG ───────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 2px 10px 3px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  font-family: var(--font-body);
  text-transform: lowercase;
  vertical-align: middle;
  user-select: none;
}

.tag-interactive { background-color: var(--c-interactive); }
.tag-misc        { background-color: var(--c-misc); }
.tag-video       { background-color: var(--c-video); }
.tag-audio       { background-color: var(--c-audio); }
.tag-visual      { background-color: var(--c-visual); }

/* ─── CURRENT ISSUE ITEMS ────────────────────────────────── */
.item {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--border);
}

.item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.item-title-row h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

/* "Game of the Month" top-of-issue highlight */
.item.featured .item-title-row h2 {
  font-size: 28px;
}

.item-quote {
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.55;
}

.item-attribution {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.item-image {
  margin: 14px 0;
  border-radius: 6px;
  overflow: hidden;
  background-color: #e8e6e0;
  max-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-image img {
  width: 100%;
  object-fit: cover;
  max-height: 280px;
}

.item-description {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.65;
}

.item-description strong {
  font-weight: 600;
}

.btn-visit {
  display: inline-block;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  padding: 10px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 2px solid #000;
  transition: background-color 0.15s, color 0.15s;
  cursor: pointer;
}

.btn-visit:hover {
  background-color: transparent;
  color: #000;
  opacity: 1;
}

/* ─── ARCHIVE PAGE ───────────────────────────────────────── */
.archive-issue {
  margin-bottom: 56px;
}

.archive-issue-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-dark);
}

.archive-issue-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.archive-issue-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.archive-issue-intro {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* Archive accordion items */
.archive-card {
  border-bottom: 1px solid var(--border);
}

.archive-card:first-of-type {
  border-top: 1px solid var(--border);
}

.archive-card-toggle {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body);
  color: var(--text);
}

.archive-card-toggle:hover {
  background-color: rgba(0,0,0,0.03);
}

.archive-card-meta {
  flex: 1;
  min-width: 0;
}

.archive-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.archive-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.archive-card-preview {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.archive-card-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 3px;
  transition: transform 0.2s ease;
}

.archive-card.open .archive-card-chevron {
  transform: rotate(180deg);
}

.archive-card-body {
  display: none;
  padding: 4px 8px 28px;
}

.archive-card.open .archive-card-body {
  display: block;
}

.archive-card-body .item-quote    { margin-bottom: 4px; }
.archive-card-body .item-attribution { margin-bottom: 12px; }
.archive-card-body .item-image    { margin: 12px 0; }
.archive-card-body .item-description { margin-bottom: 18px; }

/* ─── FORM PAGE ──────────────────────────────────────────── */
.form-lead {
  font-size: 18px;
  margin-bottom: 36px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.suggestion-form {
  margin-bottom: 56px;
}

.form-field {
  margin-bottom: 30px;
}

.form-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-field .hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border-dark);
  background-color: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #555;
}

.form-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

.char-count {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.char-count.over { color: var(--c-video); }

.btn-submit {
  background-color: #000;
  color: #fff;
  border: 2px solid #000;
  padding: 12px 36px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background-color 0.15s, color 0.15s;
}

.btn-submit:hover {
  background-color: transparent;
  color: #000;
}

.form-success {
  display: none;
  background: #f0f8ec;
  border: 2px solid var(--c-visual);
  padding: 20px 24px;
  font-size: 15px;
  color: #2e6020;
  margin-top: 20px;
  font-family: var(--font-body);
}

/* ─── FAQ ACCORDION ──────────────────────────────────────── */
.faq-section {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 2px solid var(--border-dark);
}

.faq-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-toggle {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 8px 16px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.faq-toggle:hover { color: var(--text-muted); }

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-body {
  display: none;
  padding: 0 8px 20px 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.open .faq-body { display: block; }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-body);
}

footer a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
}

/* ─── LOADING / ERROR / EMPTY STATES ────────────────────── */
.loading-state {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 60px 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 15px;
}

.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--text-muted);
  animation: blink 1.2s infinite;
  flex-shrink: 0;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40%           { opacity: 1;   }
}

.notion-empty,
.notion-error {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.notion-empty-heading,
.notion-error-heading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.notion-error-heading { color: var(--c-video); }

.notion-empty-body,
.notion-error-body {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── TOAST NOTIFICATION ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #000;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 24px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}

.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 760px) {
  header {
    height: auto;
    min-height: 60px;
    padding: 14px 20px;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .header-inner {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .hamburger { display: flex; margin-left: auto; }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0 8px;
  }

  nav.open { display: flex; }

  .site-title { font-size: 19px; }

  main { padding: 32px 20px 64px; }

  .issue-header h1,
  .page-title      { font-size: 28px; }

  .item-title-row h2,
  .archive-card-title { font-size: 21px; }

  .archive-issue-header h2 { font-size: 22px; }

  .archive-card-preview { max-width: 100%; }
}

@media (max-width: 420px) {
  .issue-header h1,
  .page-title { font-size: 24px; }
}
