/* No Trees to Hold the Sky — Joe Eddie
   Northern Plains literary aesthetic */

:root {
  --paper: #f5f0e8;
  --paper-dark: #e8e0d4;
  --ink: #1a1814;
  --ink-muted: #4a453d;
  --ink-light: #6b6459;
  --accent: #8b4513;
  --accent-warm: #a0522d;
  --sky: #2c3e50;
  --border: rgba(26, 24, 20, 0.12);
  --shadow: rgba(26, 24, 20, 0.08);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  position: relative;
  min-height: 100vh;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  gap: 1.5rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-highlight {
  color: var(--accent) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero-cover {
  margin-bottom: 2rem;
}

.hero-cover img {
  width: 200px;
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  box-shadow: 0 25px 50px -12px var(--shadow), 0 0 0 1px var(--border);
}

.book-cover-placeholder {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 300px;
  background: linear-gradient(145deg, var(--ink) 0%, var(--sky) 100%);
  box-shadow: 0 25px 50px -12px var(--shadow), 0 0 0 1px var(--border);
  padding: 1.5rem;
  text-align: center;
}

.cover-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--paper);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.cover-author {
  font-size: 0.8rem;
  color: var(--paper-dark);
  font-style: italic;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.hero-title {
  margin: 0 0 1rem;
}

.hero-title-main {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-title-by {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--ink-muted);
  margin: 0;
  font-weight: 400;
}

/* Preorder section */
.preorder {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 1.5rem 5rem;
  text-align: center;
}

.preorder-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(245, 240, 232, 0.4);
  margin-bottom: 1.5rem;
}

.preorder-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.preorder-bundle {
  font-size: 0.85em;
  font-weight: 500;
  opacity: 0.9;
}

.preorder-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent-warm);
  margin: 0 0 1rem;
}

.preorder-subline {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.preorder-tagline {
  margin: 2rem 0;
}

.preorder-tagline p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  margin: 0;
  color: var(--paper-dark);
}

.bundle-promo-image {
  margin: 2.5rem auto;
  max-width: 520px;
}

.bundle-promo-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.bundle-includes {
  text-align: left;
  max-width: 400px;
  margin: 0 auto 2rem;
  padding: 0;
  list-style: none;
}

.bundle-includes li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.bundle-includes li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-warm);
}

.muted {
  opacity: 0.8;
  font-size: 0.95em;
}

.bundle-mug-preview {
  margin: 1.5rem auto 2rem;
  max-width: 140px;
}

.bundle-mug-preview img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.shipping-note,
.limited-note {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0.5rem 0;
}

.cta-button {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

/* Quote block */
.quote-block {
  padding: 4rem 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}

.quote-block blockquote {
  margin: 0;
  padding: 0;
  border: none;
}

.quote-block p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* About book */
.about-book {
  padding: 2rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.about-book-content {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.about-author-portrait {
  width: 160px;
  min-width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 8px 24px var(--shadow), 0 0 0 1px var(--border);
}

.about-book-content > div {
  flex: 1;
  min-width: 0;
}

.about-book p {
  margin: 0 0 1rem;
}

.about-tagline {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 1.5rem !important;
}

/* Specs */
.specs {
  background: var(--paper-dark);
  padding: 3rem 1.5rem;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.5rem;
  max-width: 400px;
  text-align: center;
}

.spec-list li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
}

.spec-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Book only link */
.book-only {
  padding: 2rem 1.5rem 4rem;
  text-align: center;
}

.book-only a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.book-only a:hover {
  color: var(--accent-warm);
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-light);
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 3rem 1rem 4rem;
  }

  .preorder {
    padding: 3rem 1rem 4rem;
  }

  .quote-block {
    padding: 3rem 1rem;
  }

  .about-book-content {
    flex-direction: column;
    align-items: center;
  }

  .about-author-portrait {
    width: 140px;
    min-width: 140px;
    height: 140px;
  }
}

/* Press page */
.press-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.press-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.press-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.press-subtitle {
  font-size: 1rem;
  color: var(--ink-muted);
  margin: 0;
}

.press-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.press-asset {
  background: var(--paper-dark);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.press-asset-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1rem;
}

.press-asset-link:hover .press-asset-download {
  color: var(--accent) !important;
}

.press-asset-img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 12px var(--shadow);
}

.press-asset-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.press-asset-download {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s;
}

.press-contact {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.press-contact a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.press-contact a:hover {
  color: var(--accent-warm);
}

@media (max-width: 768px) {
  .press-main {
    padding: 3rem 1rem 4rem;
  }

  .press-assets {
    grid-template-columns: 1fr;
  }
}

/* Print */
@media print {
  .grain-overlay,
  .site-header,
  .nav-toggle,
  .cta-button {
    display: none !important;
  }

  body {
    background: white;
  }

  .preorder {
    background: #333;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
