/* Robert J. Cottle — Author Website */

:root {
  --navy: #1a2332;
  --navy-deep: #0f1623;
  --navy-light: #2a3548;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --gold-muted: #a8861f;
  --cream: #f8f6f1;
  --cream-dark: #ede9e0;
  --text: #2c2c2c;
  --text-muted: #5a5a5a;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(15, 22, 35, 0.12);
  --shadow-lg: 0 12px 48px rgba(15, 22, 35, 0.18);
  --radius: 8px;
  --radius-lg: 16px;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-muted) 100%);
  color: var(--navy-deep);
  box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 24px rgba(201, 162, 39, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn-book {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

.btn-book:hover {
  background: var(--navy-light);
  box-shadow: var(--shadow);
}

.btn-large {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(15, 22, 35, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-series {
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-author {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--gold-light);
}

.nav-cta {
  background: var(--gold) !important;
  color: var(--navy-deep) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--gold-light) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15, 22, 35, 0.97) 0%, rgba(26, 35, 50, 0.92) 50%, rgba(15, 22, 35, 0.95) 100%),
    radial-gradient(ellipse at 70% 50%, rgba(201, 162, 39, 0.08) 0%, transparent 60%);
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  color: var(--white);
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
}

.hero-covers {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-float {
  position: absolute;
  width: 180px;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s ease;
}

.cover-1 {
  transform: rotate(-8deg) translateX(-80px);
  z-index: 1;
}

.cover-2 {
  transform: rotate(2deg) translateY(-10px);
  z-index: 3;
  width: 200px;
}

.cover-3 {
  transform: rotate(10deg) translateX(80px);
  z-index: 2;
}

.hero-covers:hover .cover-1 { transform: rotate(-12deg) translateX(-90px) translateY(-8px); }
.hero-covers:hover .cover-2 { transform: rotate(0deg) translateY(-20px) scale(1.02); }
.hero-covers:hover .cover-3 { transform: rotate(14deg) translateX(90px) translateY(-8px); }

/* Trust bar */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  padding: 1.75rem 0;
}

.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.trust-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.trust-item span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Section headers */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Books */
.books {
  padding: 5rem 0;
  background: var(--cream);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.book-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid transparent;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 162, 39, 0.2);
}

.book-featured {
  grid-column: 1 / -1;
  grid-template-columns: 200px 1fr;
  background: linear-gradient(135deg, var(--white) 0%, #faf8f3 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
}

.book-cover-link img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.book-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-muted);
  background: rgba(201, 162, 39, 0.12);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.book-body h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
  line-height: 1.25;
}

.book-tagline {
  font-style: italic;
  color: var(--gold-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.book-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.library-cta {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem 2rem;
  background: var(--navy);
  border-radius: var(--radius-lg);
  color: var(--white);
}

.library-cta h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

/* About */
.about {
  padding: 5rem 0;
  background: var(--white);
}

.about-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-content h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.about-publisher {
  margin-top: 1.5rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cream-dark);
  color: var(--navy) !important;
}

.book-review {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}

.book-review p {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.55;
}

.book-review-stars {
  font-style: normal !important;
  color: var(--gold-muted);
  letter-spacing: 0.15em;
  font-size: 0.95rem !important;
}

.book-review cite {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: normal;
}

/* Updates */
.updates {
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.updates-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.updates-content h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.updates-content p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

.signup-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-row input[type="email"] {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  background: var(--cream);
  transition: border-color 0.2s;
}

.form-row input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.form-success {
  padding: 1.5rem;
  background: rgba(201, 162, 39, 0.1);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 500;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-series {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.footer-author {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.8125rem;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-covers {
    height: 300px;
    margin-top: 1rem;
  }

  .cover-float {
    width: 130px;
  }

  .cover-2 {
    width: 150px;
  }

  .trust-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-featured {
    grid-template-columns: 160px 1fr;
  }

  .about-inner {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card,
  .book-featured {
    grid-template-columns: 110px 1fr;
    padding: 1.25rem;
    gap: 1rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    max-width: 240px;
    margin: 0 auto;
  }

  .form-row {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-covers {
    display: none;
  }
}

@media (max-width: 480px) {
  .book-card,
  .book-featured {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-cover-link {
    max-width: 140px;
    margin: 0 auto;
  }

  .trust-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Blog — SEO discovery engine */
.blog-list,
.blog-article {
  padding: calc(var(--header-height) + 2rem) 0 4rem;
}

.blog-list h1,
.blog-article h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.blog-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 42rem;
}

.blog-meta {
  font-size: 0.9rem;
  color: var(--gold-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.blog-article .container {
  max-width: 42rem;
}

.blog-article p {
  margin-bottom: 1.25rem;
}

.blog-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.blog-index {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.blog-index a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 0.5rem;
  display: block;
}

.blog-index a:hover {
  color: var(--gold-muted);
}