/* ============================================================
   Wandering Golems — Nuovo
   Pure CSS, zero JavaScript
   ============================================================ */

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

:root {
  --bg-dark: #1e1e1e;
  --bg-card: rgba(38, 38, 38, 0.92);
  --orange: #ff8f41;
  --gold: #fddb3a;
  --cream: #f6f4e6;
  --text: #ccc;
  --text-dim: #999;
  --purple: #7963a9;
  --max-w: 760px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

/* ── Background ─────────────────────────────────────────────── */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("./WGBackground.webp") center / cover no-repeat;
  opacity: 0.35;
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
}

nav {
  display: flex;
  gap: 6px;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Page layout ────────────────────────────────────────────── */

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* ── Homepage ───────────────────────────────────────────────── */

.page-panel {
  background: rgba(30, 30, 30, 0.65);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 40px clamp(24px, 5vw, 56px) 48px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero {
  text-align: center;
  padding: 48px 0 56px;
}

.hero img {
  width: 240px;
  height: 240px;
  margin: 0 auto 0;
  display: block;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--orange);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--text);
  font-size: 1rem;
}

.sections {
  display: grid;
  gap: 28px;
}

.section-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 32px 36px;
  border-left: 3px solid var(--purple);
}

.section-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--orange);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

/* ── Recent posts (homepage) ─────────────────────────────────── */

.page-panel > .section-heading {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--orange);
  font-size: 1.3rem;
  margin: 48px 0 20px;
}

.recent-posts {
  display: grid;
  gap: 20px;
}

.recent-card {
  display: flex;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--purple);
  overflow: hidden;
  transition: border-color 0.3s, translate 0.3s, box-shadow 0.3s;
}

.recent-card:hover {
  border-color: var(--orange);
  translate: 4px 0;
  box-shadow: 0 4px 24px rgba(121, 99, 169, 0.15);
}

.recent-card-img {
  width: 200px;
  aspect-ratio: 1;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(30, 30, 30, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.recent-card-img img {
  width: auto;
  height: auto;
  min-width: 400px;
  min-height: 400px;
}

.recent-card-body {
  padding: 20px 24px;
  flex: 1;
}

.recent-card:hover .post-title {
  color: var(--orange);
}

.recent-card:hover .post-arrow {
  color: var(--orange);
}

@media (max-width: 600px) {
  .recent-card {
    flex-direction: column;
  }

  .recent-card img {
    width: 100%;
    height: 160px;
  }
}

.section-card p {
  color: var(--text);
  font-size: 0.95rem;
}

/* ── Blog listing ───────────────────────────────────────────── */

.page-title {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--orange);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  text-align: center;
  margin-bottom: 6px;
}

.page-sub {
  text-align: center;
  color: var(--text-dim);
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 48px;
}

.post-list {
  display: grid;
  gap: 20px;
}

.post-card {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 28px 32px;
  border-left: 3px solid var(--purple);
  transition: border-color 0.3s, translate 0.3s, box-shadow 0.3s;
}

.post-card:hover {
  border-color: var(--orange);
  translate: 4px 0;
  box-shadow: 0 4px 24px rgba(121, 99, 169, 0.15);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.post-date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}

.post-tag {
  font-size: 0.68rem;
  padding: 2px 10px;
  border: 1px solid var(--orange);
  color: var(--orange);
  border-radius: 20px;
  font-family: 'Lora', serif;
  font-style: italic;
}

.post-title {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--cream);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.post-card:hover .post-title {
  color: var(--orange);
}

.post-excerpt {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.65;
}

.post-arrow {
  display: inline-block;
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--orange);
  text-transform: uppercase;
  transition: color 0.2s;
}

.post-card:hover .post-arrow {
  color: var(--orange);
}

/* ── Article page ───────────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s, gap 0.2s;
}

.back-link:hover {
  color: var(--gold);
  gap: 10px;
}

.page-panel>h1 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--orange);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.3;
  margin-bottom: 24px;
}

.article-divider {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  margin-bottom: 28px;
}

.page-panel>p {
  color: #ddd;
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 18px;
}

.page-panel > img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: 24px 0;
}

.page-panel>h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--purple);
  font-size: 1.1rem;
  margin: 32px 0 12px;
}

.page-panel>blockquote {
  border-left: 3px solid var(--gold);
  margin: 24px 0;
  padding: 10px 20px;
  background: rgba(253, 219, 58, 0.04);
}

.page-panel>blockquote p {
  font-style: italic;
  color: var(--cream);
  margin: 0;
}

/* ── Get in touch ───────────────────────────────────────────── */

.get-in-touch {
  text-align: center;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.get-in-touch a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}

.get-in-touch a:hover {
  color: var(--purple);
}

/* ── Gallery ────────────────────────────────────────────────── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-card);
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(255, 143, 65, 0.12);
  border-color: var(--orange);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: rgba(30, 30, 30, 0.6);
}

/* ── CSS-only lightbox ──────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: fixed;
  inset: 0;
  z-index: -1;
  cursor: default;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 72vh;
  width: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 4px 4px 0 0;
}

.lightbox-info {
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: 0 0 4px 4px;
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.lightbox-desc {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.lightbox-link {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}

.lightbox-link:hover {
  color: var(--gold);
}

.lightbox .close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--cream);
  font-size: 2rem;
  text-decoration: none;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox .close-btn:hover {
  opacity: 1;
}

/* ── Footer ─────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

footer a {
  color: var(--orange);
  text-decoration: none;
}

footer a:hover {
  color: var(--gold);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }

  main {
    padding: 40px 16px 60px;
  }

  .hero {
    padding: 32px 0 40px;
  }

  .section-card,
  .post-card,
  .article {
    padding: 22px 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
