/* ============================================================
   Girona Town — dark theme
   ============================================================ */

:root {
  --bg: #0a0c12;
  --bg-2: #10131b;
  --bg-3: #171b26;
  --surface: #12151d;
  --surface-2: #191d28;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ece9e2;
  --text-muted: #9aa3b6;
  --text-faint: #6b7280;
  --accent: #e0a458;
  --accent-strong: #f2bf82;
  --accent-deep: #b97d33;
  --accent-glow: rgba(224, 164, 88, 0.16);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.65);
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #14100a;
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 6px 18px -6px var(--accent-glow);
}

.site-nav { display: flex; gap: 6px; }

.site-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover { color: var(--text); background: var(--bg-3); }
.site-nav a.active { color: var(--text); background: var(--bg-3); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 320px at 50% -10%, var(--accent-glow), transparent 70%),
    radial-gradient(700px 420px at 85% 110%, rgba(120, 90, 180, 0.10), transparent 70%);
}

.hero-eyebrow {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #14100a;
  box-shadow: 0 10px 30px -10px rgba(224, 164, 88, 0.5);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(224, 164, 88, 0.6);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }

.section-cats {
  background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2));
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
}

.section-count {
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-media img { transform: scale(1.06); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  flex: 1;
}

.card-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-glow);
  border: 1px solid rgba(224, 164, 88, 0.35);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-more {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Term / category cards ---------- */
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.term-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.term-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.term-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.term-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Page head (lists) ---------- */
.page-head {
  padding: 64px 0 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-2), transparent);
}

.page-title {
  margin: 8px 0 8px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.page-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

.empty {
  color: var(--text-muted);
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

/* ---------- Guide (single) ---------- */
.guide-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(700px 340px at 50% -20%, var(--accent-glow), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

.guide-title {
  margin: 14px 0 16px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
}

.guide-lede {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.meta-divider { opacity: 0.5; }

.guide-featured {
  margin: 40px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.guide-featured img { width: 100%; }

.guide-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  padding-top: 48px;
  padding-bottom: 72px;
  align-items: start;
}

/* TOC */
.toc {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.toc-title {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
}

.toc nav > ul,
.toc ul { list-style: none; margin: 0; padding: 0; }

.toc li { margin: 6px 0; }

.toc a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.toc a:hover { color: var(--accent); }

.toc ul ul { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 4px; }

/* Content typography */
.guide-content {
  min-width: 0;
  font-size: 1.03rem;
}

.guide-content h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 2.2em 0 0.7em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--border);
}

.guide-content h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
}

.guide-content h4 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.6em 0 0.5em;
}

.guide-content p { margin: 0 0 1.15em; }

.guide-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(224, 164, 88, 0.4);
  transition: border-color 0.15s ease;
}

.guide-content a:hover { border-color: var(--accent); }

.guide-content strong { color: var(--text); }

.guide-content ul, .guide-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.guide-content li { margin: 0.4em 0; }

.guide-content blockquote {
  margin: 1.5em 0;
  padding: 18px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}

.guide-content code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.guide-content img { border-radius: var(--radius-sm); margin: 1.5em 0; }

.guide-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* FAQ */
.faq {
  margin-top: 3.5em;
  padding-top: 2em;
  border-top: 1px solid var(--border);
}

.faq-heading {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 1em;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: background 0.15s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--bg-3); }

.faq-answer {
  padding: 0 22px 20px;
  color: var(--text-muted);
}

.faq-answer p { margin: 0; }

/* Guide back link */
.guide-back { margin-top: 3em; }

/* ---------- 404 ---------- */
.error-page {
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding: 80px 0;
}

.error-inner { text-align: center; }

.error-code {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-title {
  margin: 12px 0 12px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
}

.error-desc {
  max-width: 480px;
  margin: 0 auto 32px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 56px 0 40px;
}

.footer-inner { text-align: center; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-brand .brand-mark { width: 32px; height: 32px; font-size: 1.1rem; border-radius: 9px; }

.footer-tag {
  max-width: 560px;
  margin: 16px auto 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 26px;
  font-size: 0.92rem;
}

.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }

.footer-copy {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .guide-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .hero { padding: 88px 0 72px; }
  .section { padding: 56px 0; }
}


