/* ============================================
   Spartacus Design — Matt Haag
   Warm, hand-crafted, gallery-forward.
   ============================================ */

:root {
  --bg: #faf5eb;
  --bg-alt: #f1e8d8;
  --bg-card: #ffffff;
  --ink: #2b2620;
  --ink-muted: #6b6152;
  --accent: #c85a3a;
  --accent-dark: #a8452a;
  --accent-soft: #e8b98f;
  --border: #e2d5bd;
  --shadow: rgba(43, 38, 32, 0.12);
  --max-width: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1812;
    --bg-alt: #241f18;
    --bg-card: #2a2419;
    --ink: #f2e9d8;
    --ink-muted: #b8ab8f;
    --border: #3a3226;
    --shadow: rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }

.section-kicker {
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.6em;
}

.section-heading { font-size: clamp(1.7rem, 3vw, 2.4rem); }

.lede {
  color: var(--ink-muted);
  font-size: 1.15rem;
  max-width: 640px;
}

.btn {
  display: inline-block;
  padding: 0.85em 1.8em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-solid:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 235, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(28, 24, 18, 0.9); }
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.nav-brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.brand-sub { font-size: 0.75rem; color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5em 1.2em;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--accent-dark); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 160px 0 110px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: saturate(1.1);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(250,245,235,0.55) 55%, var(--bg) 100%);
}
@media (prefers-color-scheme: dark) {
  .hero-bg::after { background: linear-gradient(180deg, var(--bg) 0%, rgba(28,24,18,0.6) 55%, var(--bg) 100%); }
}
.hero-content { position: relative; text-align: center; margin: 0 auto; max-width: 720px; }
.hero-eyebrow {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.8em;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 0.25em; }
.hero-lede { font-size: 1.2rem; color: var(--ink-muted); margin: 0 auto 2em; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Gallery ---- */
.gallery-group { margin-top: 48px; }
.gallery-heading { font-size: 1.5rem; margin-bottom: 0.8em; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gallery-item {
  padding: 0;
  border: none;
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--shadow);
  aspect-ratio: 4 / 3;
  transition: transform 0.25s ease;
}
.gallery-item:hover { transform: translateY(-4px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Books ---- */
.book-feature {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}
.book-feature--reverse { direction: rtl; }
.book-feature--reverse > * { direction: ltr; }
.book-feature-art img { border-radius: 12px; box-shadow: 0 12px 32px var(--shadow); }
.book-feature-text h3 { font-size: 1.9rem; }
.book-feature-text blockquote {
  margin: 0 0 1.4em;
  padding-left: 20px;
  border-left: 3px solid var(--accent-soft);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1.05rem;
}
.book-feature-text blockquote cite {
  display: block;
  margin-top: 0.6em;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
.book-note { color: var(--ink-muted); font-size: 0.9rem; }

.review-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 1.5em; }
.review { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.review p { margin: 0 0 0.5em; font-size: 0.95rem; }
.review-author { font-size: 0.82rem; color: var(--ink-muted); font-weight: 600; }

.book-gallery-row { display: flex; flex-direction: column; gap: 36px; margin-top: 32px; }
.book-gallery-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.book-gallery-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.book-gallery-strip img {
  height: 180px;
  width: auto;
  border-radius: 8px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  box-shadow: 0 4px 12px var(--shadow);
}

/* ---- Shop banner ---- */
.shop-banner { background: var(--ink); color: var(--bg); }
.shop-banner .section-heading, .shop-banner .section-kicker { color: var(--bg); }
.shop-banner .lede { color: rgba(250,245,235,0.7); }
.shop-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---- Newsletter ---- */
.signup-box { text-align: center; max-width: 620px; }
.signup-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 1.6em 0 0.8em; }
.signup-form input[type="email"] {
  flex: 1 1 280px;
  padding: 0.85em 1.2em;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}
.signup-form input[type="email"]:focus { outline: none; border-color: var(--accent); }
.signup-note { color: var(--ink-muted); font-size: 0.85rem; }
.hidden-field { position: absolute; left: -9999px; }

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--accent); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.22); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .book-feature, .book-feature--reverse { grid-template-columns: 1fr; direction: ltr; }
  .book-feature-art { max-width: 340px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: none;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 130px 0 80px; }
  section { padding: 64px 0; }
  .shop-banner-inner { flex-direction: column; align-items: flex-start; text-align: left; }
}
