/* ============================================
   MEDIEVAL NAME GENERATOR — STYLESHEET
   Aesthetic: Dark parchment / illuminated manuscript
   ============================================ */

:root {
  --ink:        #1a1208;
  --parchment:  #f5ead0;
  --parchment2: #ede0bc;
  --gold:       #c9922a;
  --gold-light: #e8b84b;
  --crimson:    #8b1a1a;
  --stone:      #3d2e1e;
  --stone-light:#5a4535;
  --bg-dark:    #120d07;
  --bg-mid:     #1e1508;
  --text-body:  #2d1f10;
  --text-muted: #6b5236;
  --border:     rgba(201,146,42,0.3);
  --shadow:     0 4px 32px rgba(0,0,0,0.5);

  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body:    'Crimson Pro', Georgia, serif;

  --radius: 4px;
  --max-w: 1100px;
  --max-narrow: 740px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-dark);
  overflow-x: hidden;
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--stone); border-radius: 4px; }

/* ── UTILITY ────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--max-narrow); }

/* ── NAV ────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18,13,7,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--gold-light);
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }
.logo-crest { font-size: 1.4rem; }
.logo-text {
  font-family: var(--font-heading); font-size: 0.78rem;
  line-height: 1.3; letter-spacing: 0.05em;
}
.logo-text em { font-style: italic; color: var(--gold); font-size: 0.88em; }
.nav-links {
  display: flex; gap: 0; list-style: none;
  margin-left: auto;
}
.nav-links a {
  display: block; padding: 0.5rem 1.1rem;
  font-family: var(--font-heading); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--parchment2);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold-light); border-color: var(--gold); }
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--gold-light); font-size: 1.4rem; cursor: pointer;
  margin-left: auto;
}

/* ── RUNE STRIP ─────────────────────────────── */
.rune-strip {
  background: var(--stone);
  color: var(--gold);
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0.6;
}
.rune-strip--bottom { opacity: 0.4; }

/* ── HERO ────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--bg-dark);
  text-align: center;
  overflow: hidden;
}
.page-hero { position: relative; background: var(--bg-dark); text-align: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,146,42,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 20% 50%, rgba(139,26,26,0.08) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding: 4.5rem 1.5rem 3.5rem; }
.hero-eyebrow {
  font-family: var(--font-heading); font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.1;
  color: var(--parchment);
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
  margin-bottom: 0.75rem;
}
.hero-title span {
  display: block;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, #a07020 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--parchment2);
  max-width: 560px; margin: 0 auto;
  font-style: italic; opacity: 0.9;
}

/* ── TOOL SECTION ────────────────────────────── */
.tool-section { background: var(--parchment); padding: 3.5rem 0 5rem; }

.tool-card {
  background: #fdf7ea;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.6);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--gold), var(--crimson));
}
.tool-header { text-align: center; margin-bottom: 2rem; }
.tool-header h2 {
  font-family: var(--font-heading); font-size: 1.6rem;
  color: var(--stone); margin-bottom: 0.25rem;
}
.tool-header p { color: var(--text-muted); font-style: italic; }

.tool-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.control-group label {
  display: block;
  font-family: var(--font-heading); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 0.4rem;
}
.select-wrap {
  position: relative;
}
.select-wrap select {
  width: 100%; padding: 0.65rem 2.5rem 0.65rem 0.9rem;
  appearance: none; -webkit-appearance: none;
  background: white;
  border: 1px solid rgba(201,146,42,0.4);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem;
  color: var(--stone);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,146,42,0.15);
}
.select-arrow {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%); pointer-events: none;
  color: var(--gold); font-size: 0.85rem;
}

.btn-generate {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 1rem;
  background: linear-gradient(135deg, var(--crimson) 0%, #6b1212 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--gold-light);
  font-family: var(--font-heading); font-size: 1rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(139,26,26,0.4);
}
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(139,26,26,0.55); }
.btn-generate:active { transform: translateY(0); }
.btn-icon { font-size: 1.1rem; }
.btn-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-generate:hover .btn-shimmer { transform: translateX(100%); }

.results-area {
  margin-top: 1.75rem;
  min-height: 100px;
}
.results-empty { text-align: center; color: var(--text-muted); font-style: italic; padding: 2rem 0; }

.results-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.result-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeUp 0.35s ease both;
}
.result-name {
  font-family: var(--font-heading); font-size: 1.15rem;
  color: var(--stone);
}
.result-copy {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.2rem 0.6rem;
  font-size: 0.78rem; color: var(--text-muted); cursor: pointer;
  transition: all 0.2s;
}
.result-copy:hover { background: var(--gold); color: white; border-color: var(--gold); }
.result-copy.copied { background: #2d6a2d; color: white; border-color: #2d6a2d; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.copy-bar {
  display: flex; gap: 0.75rem; margin-top: 1rem;
}
.btn-copy, .btn-regen {
  flex: 1; padding: 0.6rem;
  border-radius: var(--radius); cursor: pointer;
  font-family: var(--font-heading); font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 0.2s;
}
.btn-copy { background: var(--stone); color: var(--gold-light); border: 1px solid var(--stone); }
.btn-copy:hover { background: var(--stone-light); }
.btn-regen { background: none; color: var(--stone); border: 1px solid var(--border); }
.btn-regen:hover { background: var(--parchment2); }

/* ── HOW IT WORKS ────────────────────────────── */
.how-it-works {
  margin-bottom: 3rem;
  padding: 2.5rem;
  background: var(--parchment2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.how-it-works h2 {
  font-family: var(--font-heading); font-size: 1.4rem;
  color: var(--stone); margin-bottom: 1.75rem;
  text-align: center;
}
.steps { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; counter-reset: step; }
.steps li { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--stone); color: var(--gold-light);
  border-radius: 50%; font-family: var(--font-heading);
  font-size: 0.85rem;
}
.steps strong { display: block; font-family: var(--font-heading); color: var(--stone); font-size: 0.95rem; margin-bottom: 0.15rem; }
.steps p { color: var(--text-body); font-size: 0.97rem; }

/* ── ABOUT ────────────────────────────────────── */
.about-section { margin-bottom: 3rem; }
.about-section h2 {
  font-family: var(--font-heading); font-size: 1.4rem;
  color: var(--stone); margin-bottom: 1.25rem;
}
.about-grid { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: start; }
.about-text p { margin-bottom: 1rem; color: var(--text-body); }
.about-facts { display: flex; flex-direction: column; gap: 0.75rem; }
.fact-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--stone); color: var(--parchment);
  padding: 1rem 1.5rem; border-radius: var(--radius);
  min-width: 120px; text-align: center;
}
.fact-num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-light); }
.fact-label { font-family: var(--font-heading); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-top: 0.1rem; }

/* ── BLOG CTA ─────────────────────────────────── */
.blog-cta { margin-bottom: 1rem; }
.blog-cta-inner {
  display: flex; align-items: center; gap: 2rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--stone) 0%, var(--bg-mid) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--parchment);
}
.blog-cta-text h2 {
  font-family: var(--font-heading); font-size: 1.4rem;
  color: var(--gold-light); margin-bottom: 0.5rem;
}
.blog-cta-text p { font-size: 1rem; opacity: 0.85; margin-bottom: 1.25rem; }
.blog-cta-deco { font-size: 4rem; opacity: 0.3; flex-shrink: 0; }
.btn-outline {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold-light);
  font-family: var(--font-heading); font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--gold); color: var(--stone); }

/* ── BLOG INDEX ──────────────────────────────── */
.blog-index-section { background: var(--parchment); padding: 3.5rem 0 5rem; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.blog-card {
  background: #fdf7ea;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover:not(.blog-card--placeholder) {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.blog-card--placeholder { opacity: 0.55; }
.blog-card-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.blog-tag {
  font-family: var(--font-heading); font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--stone); color: var(--gold-light);
  padding: 0.2rem 0.6rem; border-radius: 2px;
}
.blog-card time { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.blog-card h2 {
  font-family: var(--font-heading); font-size: 1.05rem;
  color: var(--stone); line-height: 1.4;
}
.blog-card h2 a { text-decoration: none; color: inherit; }
.blog-card h2 a:hover { color: var(--crimson); }
.blog-card p { font-size: 0.95rem; color: var(--text-body); flex: 1; }
.read-more {
  font-family: var(--font-heading); font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--crimson); text-decoration: none;
  align-self: flex-start;
  transition: color 0.2s;
}
.read-more:hover { color: var(--stone); }
.read-more--disabled { color: var(--text-muted); cursor: default; }

.back-cta {
  text-align: center; padding: 2.5rem;
  background: var(--parchment2); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.back-cta p { font-style: italic; color: var(--text-muted); margin-bottom: 1rem; }

/* ── POST PAGE ────────────────────────────────── */
.post-main { background: var(--parchment); padding: 3rem 0 5rem; }
.breadcrumb { margin-bottom: 2rem; }
.breadcrumb ol { list-style: none; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.breadcrumb li { font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb li + li::before { content: '›'; margin-right: 0.5rem; }
.breadcrumb a { color: var(--crimson); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.post { }
.post-header { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.post-header h1 {
  font-family: var(--font-heading); font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--stone); line-height: 1.25; margin-bottom: 1rem;
}
.post-intro { font-size: 1.15rem; font-style: italic; color: var(--stone-light); }

.post-body h2 {
  font-family: var(--font-heading); font-size: 1.3rem;
  color: var(--stone); margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem; border-top: 1px solid var(--border);
}
.post-body p { margin-bottom: 1.1rem; color: var(--text-body); }
.post-body blockquote {
  border-left: 3px solid var(--gold); padding: 0.75rem 1.5rem;
  margin: 1.5rem 0; background: var(--parchment2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p { margin: 0; font-style: italic; }
.post-body blockquote cite { font-size: 0.85rem; color: var(--text-muted); font-style: normal; }

.placeholder-notice {
  background: #fff8e1; border: 1px solid #f5c842;
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
  font-size: 0.9rem; margin-bottom: 2rem; color: #5a4500;
}

.post-cta-box {
  margin-top: 3rem; padding: 2rem;
  background: linear-gradient(135deg, var(--stone), var(--bg-mid));
  border-radius: var(--radius); text-align: center;
  border: 1px solid var(--border);
}
.post-cta-box h3 {
  font-family: var(--font-heading); font-size: 1.25rem;
  color: var(--gold-light); margin-bottom: 0.5rem;
}
.post-cta-box p { color: var(--parchment2); margin-bottom: 1.25rem; font-size: 0.97rem; }
.btn-generate-small {
  display: inline-block; padding: 0.7rem 1.75rem;
  background: var(--crimson); color: var(--gold-light);
  font-family: var(--font-heading); font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
}
.btn-generate-small:hover { background: #a02020; transform: translateY(-1px); }

.post-nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-nav-back {
  font-family: var(--font-heading); font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--crimson); text-decoration: none;
}
.post-nav-back:hover { color: var(--stone); }

/* ── PAGE HERO (blog pages) ──────────────────── */
.page-hero { position: relative; background: var(--bg-dark); text-align: center; overflow: hidden; }
.page-hero .hero-content { padding: 3rem 1.5rem 2.5rem; }
.page-hero .hero-title { font-size: clamp(1.8rem, 5vw, 3.2rem); }

/* ── FOOTER ───────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1rem; justify-content: space-between;
}
.footer-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-heading); font-size: 0.82rem;
  color: var(--gold-light); letter-spacing: 0.06em;
}
.footer-links { display: flex; gap: 1rem; list-style: none; }
.footer-links a {
  font-family: var(--font-heading); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-dark); border-bottom: 1px solid var(--border); padding: 1rem 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1.5rem; border-bottom: none; }
  .nav-toggle { display: block; }
  .nav-inner { position: relative; }

  .about-grid { grid-template-columns: 1fr; }
  .about-facts { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .blog-cta-inner { flex-direction: column; text-align: center; }
  .blog-cta-deco { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .tool-card { padding: 1.5rem; }
  .copy-bar { flex-direction: column; }
}

@media (max-width: 480px) {
  .tool-controls { grid-template-columns: 1fr; }
  .hero-content { padding: 3rem 1rem 2.5rem; }
}
