/*
Theme Name: Wild Words
Theme URI: https://wildwords.wpengine.com
Description: A vocabulary of landscape. Custom theme for the Wild Words glossary.
Version: 1.0
Author: Adventure Journal
Author URI: https://adventure-journal.com
Text Domain: wildwords
*/

/* === RESET & VARIABLES === */
:root {
  --bg: #F5F0E6;
  --bg-warm: #EFEAD9;
  --text: #2C2C2C;
  --text-light: #5A5A52;
  --text-faint: #8A8A7E;
  --yellow: #B89B2F;
  --yellow-soft: rgba(184,155,47,0.15);
  --lichen-lime: #6B8C2A;
  --lichen-gray: #6E7164;
  --dark: #1F1F1F;
  --rule: #C4B99A;
}

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

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-family: 'Literata', Georgia, serif;
}

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

/* === NAV === */
.site-nav {
  background: var(--dark);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav .logo {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--bg);
  font-size: 18px;
}
.site-nav .logo span { color: var(--yellow); }
.site-nav .logo a { color: inherit; text-decoration: none; }
.nav-links {
  display: flex;
  gap: 20px;
}
.nav-links a {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--bg); }

/* === SINGLE WORD POST === */
.post {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

.headword-block {
  padding: 90px 0 0;
}
.headword {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 56px;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 0;
}
@media (min-width: 480px) {
  .headword { font-size: 72px; }
}
.pronunciation {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-top: 32px;
  margin-bottom: 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 48px;
}
.tags span,
.tags a {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--yellow-soft);
  color: var(--text-light);
  text-decoration: none;
  transition: background 0.2s;
}
.tags a:hover {
  background: rgba(184,155,47,0.28);
}

.accent-rule {
  width: 48px;
  height: 3px;
  background: var(--yellow);
  border: none;
  border-radius: 2px;
  margin: 36px 0 48px;
}

.definition {
  font-family: 'Literata', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 56px;
}
@media (min-width: 480px) {
  .definition { font-size: 19px; }
}
.definition em { font-style: italic; }

.etym-label,
.notes-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}
.etym-label { color: var(--yellow); }
.notes-label { color: var(--lichen-gray); }

.etymology {
  font-family: 'Literata', Georgia, serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-light);
  padding-left: 18px;
  border-left: 2.5px solid var(--yellow);
  margin-bottom: 56px;
}
.etymology em { font-style: italic; }

.notes {
  font-family: 'Literata', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 56px;
}
.notes em { font-style: italic; }

.reading-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--lichen-lime);
  margin-bottom: 12px;
}
.reading {
  font-family: 'Literata', Georgia, serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 56px;
}

/* Links in entry content */
.definition a,
.etymology a,
.notes a,
.reading a {
  color: var(--yellow);
  text-decoration: underline;
  text-decoration-color: rgba(184,155,47,0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}
.definition a:hover,
.etymology a:hover,
.notes a:hover,
.reading a:hover {
  text-decoration-color: var(--yellow);
}

/* End bug */
.end-bug {
  text-align: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 94px;
  color: var(--yellow);
  margin: 0 0 48px;
  letter-spacing: 0;
  line-height: 1;
}

.bottom-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 0 40px;
}

/* Word nav (prev/next) */
.word-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 56px;
}
.word-nav a {
  text-decoration: none;
  transition: opacity 0.2s;
}
.word-nav a:hover { opacity: 0.7; }
.word-nav .label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 4px;
}
.word-nav .adjacent-word {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  color: var(--text);
  display: block;
}
.word-nav .next { text-align: right; }

/* Random word button */
.random-btn {
  display: block;
  margin: 0 auto 64px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}
.random-btn:hover {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

/* === BROWSE / ARCHIVE === */
.archive-header {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 16px;
}
.archive-header h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 36px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}
.archive-header h1 span { color: var(--yellow); }
.archive-header p {
  font-family: 'Literata', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-light);
}

/* Letter nav */
.letter-nav {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 24px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.letter-nav a,
.letter-nav span {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}
.letter-nav a {
  color: var(--text);
  background: transparent;
}
.letter-nav a:hover {
  background: var(--yellow-soft);
  color: var(--yellow);
}
.letter-nav a.active {
  background: var(--yellow);
  color: #fff;
}
.letter-nav span {
  color: var(--rule);
}

/* Word list */
.word-list {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.word-list .letter-group {
  padding-top: 32px;
}
.word-list .letter-heading {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 32px;
  color: var(--yellow);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.word-list .word-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(196,185,154,0.4);
}
.word-list .word-item:last-child { border-bottom: none; }
.word-list .word-item a {
  text-decoration: none;
  display: block;
}
.word-list .word-item .word-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 4px;
  transition: color 0.2s;
}
.word-list .word-item a:hover .word-title {
  color: var(--yellow);
}
.word-list .word-item .word-preview {
  font-family: 'Literata', Georgia, serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-faint);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Search form */
.search-form {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.search-form input[type="text"] {
  width: 100%;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  background: var(--bg-warm);
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.search-form input[type="text"]:focus {
  border-color: var(--yellow);
}
.search-form input[type="text"]::placeholder {
  color: var(--text-faint);
}

/* === FOOTER === */
.site-footer {
  background: var(--dark);
  padding: 32px 24px;
  text-align: center;
}
.site-footer .footer-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  color: var(--bg);
  margin-bottom: 8px;
}
.site-footer .footer-logo span { color: var(--yellow); }
.site-footer p {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}
