/* Cunning Folk Media — Website Stylesheet */
/* fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Space+Mono:wght@400;700&display=swap');

/* ── RESET & BASE ──────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

:root {
  --bg-dark:      #0a0a0f;
  --bg-darker:    #050508;
  --bg-card:      #0f0f14;
  --text-light:   #e8e0d0;
  --text-muted:   #9a9088;
  --accent-red:   #8b1a1a;
  --accent-orange:#c4522a;
  --accent-gold:  #c9a84c;
  --border:       #1e1e26;
  --border-hover: #3a3a48;
  --transition:   0.25s ease;
  --max-width:    1200px;
  --gap:          2rem;
}

body {
  font-family: 'EB Garamond', Georgia, serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.75;
  font-size: 17px;
  overflow-x: hidden;
}

/* grain texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.6;
}
body > * { position: relative; z-index: 1; }

/* ── TYPOGRAPHY ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.15; color: var(--text-light); }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent-gold); margin-bottom: 0.75rem; }
p  { margin-bottom: 1.25rem; }
a  { color: var(--accent-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-orange); }
blockquote { border-left: 3px solid var(--accent-gold); padding-left: 1.25rem; font-style: italic; color: var(--text-light); margin: 1.5rem 0; }
time { font-family: 'Space Mono', monospace; font-size: 0.8rem; }

/* ── SCROLL REVEAL ─────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.revealed { opacity: 1; transform: none; }

/* ── CTA BUTTONS ───────────────────────────────────────────────────────────── */
.cta-button {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.cta-primary  { background: var(--accent-red);  border-color: var(--accent-red);  color: var(--text-light); }
.cta-primary:hover  { background: transparent; color: var(--accent-red); }
.cta-secondary { background: transparent; border-color: var(--border-hover); color: var(--text-light); }
.cta-secondary:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.cta-disabled { background: transparent; border-color: var(--border); color: var(--text-muted); cursor: default; pointer-events: none; }

/* ── HEADER ────────────────────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  background-color: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
header.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }

.header-container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 2rem;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}

/* logo */
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-mark { flex-shrink: 0; }
.logo-text {
  font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 800;
  color: var(--text-light); letter-spacing: -0.01em; white-space: nowrap;
}

/* nav */
nav { display: flex; gap: 2.5rem; align-items: center; }
nav a {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.1em; position: relative; transition: color var(--transition);
}
nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--accent-gold); transition: width var(--transition);
}
nav a:hover { color: var(--text-light); }
nav a:hover::after { width: 100%; }

/* hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text-light); transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── HERO ───────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 2rem;
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(139,26,26,0.07) 0%, transparent 65%);
  border-bottom: 1px solid var(--border);
}
.hero-ornament {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  opacity: 0.08; pointer-events: none;
  animation: slow-spin 80s linear infinite;
}
@keyframes slow-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero-content { position: relative; max-width: 760px; }
.hero-content .reveal { opacity: 1; transform: none; } /* hero reveals on load */

.tagline {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.2em;
  margin-bottom: 1.25rem;
}
.hero h1 { letter-spacing: -0.02em; }
.mission {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted); max-width: 600px; margin: 0 auto 2.5rem;
  line-height: 1.8;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── FEATURED BOOK ─────────────────────────────────────────────────────────── */
.featured-section {
  background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem;
}
.featured-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 300px 1fr; gap: 4rem; align-items: center;
}
.featured-cover { position: relative; }
.featured-cover img { width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px var(--border); }
.featured-cover-placeholder {
  width: 100%; aspect-ratio: 2/3;
  background: linear-gradient(135deg, #1a1a22 0%, #0f0f14 100%);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.featured-cover-text {
  font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700;
  color: var(--accent-gold); text-align: center; line-height: 1.3;
}
.featured-label {
  font-family: 'Space Mono', monospace; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--accent-orange); display: block; margin-bottom: 1rem;
}
.featured-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.5rem; }
.featured-subtitle { color: var(--text-muted); font-style: italic; font-size: 1.1rem; margin-bottom: 1.5rem; }
.featured-hook {
  font-size: 1.3rem; font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--text-light); border-left-color: var(--accent-red); margin-bottom: 1.5rem;
}
.featured-desc { font-size: 1rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 2rem; }
.featured-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── LAYOUT WRAPPER ────────────────────────────────────────────────────────── */
main { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }

/* ── BOOKS GRID ────────────────────────────────────────────────────────────── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem; margin-top: 2rem;
}
.book-card {
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.book-card:hover {
  border-color: var(--border-hover); transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.book-cover {
  width: 100%; aspect-ratio: 3/2; overflow: hidden;
  background: linear-gradient(135deg, #141419 0%, #0d0d12 100%);
  border-bottom: 1px solid var(--border);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.cover-placeholder span {
  font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700;
  color: var(--accent-gold); text-align: center; line-height: 1.3; opacity: 0.5;
}
.book-info { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.book-title { font-size: 1.4rem; margin-bottom: 0.4rem; }
.book-subtitle { font-style: italic; color: var(--text-muted); font-size: 0.93rem; margin-bottom: 0.75rem; line-height: 1.5; }
.book-author { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.book-description { font-size: 0.93rem; line-height: 1.7; color: var(--text-light); margin-bottom: 1.5rem; flex: 1; }
.book-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.book-pillar {
  padding: 0.3rem 0.7rem; background: rgba(201,168,76,0.1); color: var(--accent-gold);
  font-family: 'Space Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.book-status {
  padding: 0.3rem 0.7rem;
  font-family: 'Space Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-forthcoming { background: rgba(139,26,26,0.2); color: #d44; }
.status-available   { background: rgba(201,168,76,0.15); color: var(--accent-gold); }
.status-in-progress { background: rgba(196,82,42,0.15); color: var(--accent-orange); }
.book-cta {
  display: block; margin-top: auto; padding: 0.6rem 1rem; text-align: center;
  background: transparent; border: 1px solid var(--border-hover); color: var(--text-light);
  font-family: 'Space Mono', monospace; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.06em; transition: all var(--transition);
}
.book-cta:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.book-cta-disabled {
  display: block; margin-top: auto; padding: 0.6rem 1rem; text-align: center;
  color: var(--text-muted); font-family: 'Space Mono', monospace;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--border); cursor: default;
}

/* ── ABOUT ──────────────────────────────────────────────────────────────────── */
.about-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; margin-top: 2rem;
}
.about-text p { font-size: 1.05rem; }

/* pillars */
.pillars-container { padding-top: 0.5rem; }
.pillars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.pillar-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 2px solid var(--pillar-color, var(--accent-gold));
  transition: border-color var(--transition);
}
.pillar-item:hover { border-color: var(--pillar-color, var(--accent-gold)); }
.pillar-number {
  font-family: 'Space Mono', monospace; font-size: 0.75rem; font-weight: 700;
  color: var(--pillar-color, var(--accent-gold)); flex-shrink: 0; padding-top: 1px;
}
.pillar-name { font-size: 0.85rem; line-height: 1.4; color: var(--text-light); }

/* ── IMPRINTS ───────────────────────────────────────────────────────────────── */
.imprints-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 2rem; margin-top: 2rem; }
.imprint-card {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 2.5rem; transition: border-color var(--transition);
}
.imprint-card:hover { border-color: var(--accent-orange); }
.imprint-card h3 { color: var(--accent-gold); font-size: 1.8rem; margin-bottom: 1rem; }
.imprint-card p  { line-height: 1.8; color: var(--text-light); }

/* ── NEWS ───────────────────────────────────────────────────────────────────── */
.news-list { display: grid; gap: 0; margin-top: 2rem; }
.news-item { padding: 2rem 0 2rem 1.5rem; border-left: 2px solid var(--border); margin-bottom: 0; }
.news-item + .news-item { border-top: 1px solid var(--border); }
.news-date { color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 0.5rem; }
.news-headline { font-size: 1.35rem; margin-bottom: 0.75rem; }
.news-body { font-size: 0.95rem; line-height: 1.75; color: var(--text-muted); margin: 0; }

/* ── SUBMISSION ─────────────────────────────────────────────────────────────── */
.submission-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 2rem; align-items: start; }
.submission-checklist {
  background: var(--bg-card); border: 1px solid var(--border); padding: 1.75rem; margin-top: 1.75rem;
}
.submission-checklist ul { margin: 0.75rem 0 1.25rem 1rem; }
.submission-checklist ul li { margin-bottom: 0.5rem; font-size: 0.95rem; position: relative; padding-left: 0.5rem; }
.submission-checklist ul li::before { content: '—'; position: absolute; left: -1rem; color: var(--accent-gold); }
.response-note { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.submission-pillar-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pillar-tag {
  padding: 0.3rem 0.7rem; border: 1px solid; border-color: var(--border);
  font-family: 'Space Mono', monospace; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}
.pillar-tag:hover { color: var(--text-light); }

/* ── NEWSLETTER ─────────────────────────────────────────────────────────────── */
.newsletter-container {
  background: linear-gradient(135deg, rgba(139,26,26,0.08) 0%, rgba(196,82,42,0.05) 100%);
  border: 1px solid var(--border); padding: 4rem 3rem; text-align: center;
}
.newsletter-ornament {
  font-size: 1.5rem; color: var(--accent-gold); opacity: 0.4;
  display: block; margin-bottom: 1rem; letter-spacing: 0.3em;
}
.newsletter-container h2 { border: none; padding: 0; }
.newsletter-subtext { color: var(--text-muted); margin-bottom: 2rem; font-size: 1rem; }
.newsletter-form { display: flex; gap: 0; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 0.8rem 1rem;
  background: var(--bg-dark); border: 1px solid var(--border); border-right: none;
  color: var(--text-light); font-family: 'EB Garamond', serif; font-size: 1rem;
  transition: border-color var(--transition);
}
.newsletter-form input:focus { outline: none; border-color: var(--accent-gold); }
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form button {
  padding: 0.8rem 1.5rem; background: var(--accent-gold); color: var(--bg-dark);
  border: 1px solid var(--accent-gold);
  font-family: 'Space Mono', monospace; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.newsletter-form button:hover { background: var(--accent-orange); border-color: var(--accent-orange); }

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
footer { background: var(--bg-darker); border-top: 1px solid var(--border); padding: 4rem 0 2rem; margin-top: 5rem; }
.footer-container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 2rem 3rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-section h4 { margin-bottom: 1rem; }
.footer-section p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent-gold); }
.footer-bottom {
  max-width: var(--max-width); margin: 0 auto; padding: 2rem 2rem 0;
  text-align: center; color: var(--text-muted); font-size: 0.82rem;
}
.footer-bottom p { margin-bottom: 0.3rem; }
.footer-meta { font-family: 'Space Mono', monospace; font-size: 0.72rem; opacity: 0.5; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .featured-inner { grid-template-columns: 220px 1fr; gap: 2.5rem; }
  .about-content  { grid-template-columns: 1fr; gap: 2.5rem; }
  .pillars-grid   { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-container { padding: 0 1.25rem; }
  nav {
    display: none; position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(5,5,8,0.98); backdrop-filter: blur(10px);
    flex-direction: column; gap: 0; padding: 0;
    border-bottom: 1px solid var(--border);
  }
  nav.active { display: flex; }
  nav a { padding: 1rem 1.5rem; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
  nav a::after { display: none; }
  .hamburger { display: flex; }
  .featured-inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .featured-cover { max-width: 260px; margin: 0 auto; }
  .featured-ctas { justify-content: center; }
  blockquote { text-align: left; }
  .submission-container { grid-template-columns: 1fr; gap: 2rem; }
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { border-right: 1px solid var(--border); border-bottom: none; }
  main { padding: 0 1.25rem; }
  section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .books-grid { grid-template-columns: 1fr; }
  .imprints-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .newsletter-container { padding: 2.5rem 1.5rem; }
}
