/* ============================================
   ANTHONY BOLTON | AUTHOR WEBSITE
   Base Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Palette — Black + Dark Smoke Blue-Gray */
  --bg-primary:     #0b0c11;
  --bg-secondary:   #10121a;
  --bg-card:        #161924;
  --bg-card-hover:  #1c2130;
  --smoke:          #2d3348;
  --smoke-mid:      #3f4d66;
  --smoke-light:    #5a6b8a;
  --steel:          #8a9fc2;
  --steel-light:    #afc0d8;
  --accent:         #5d85b8;
  --accent-hover:   #7aa0d0;
  --accent-glow:    rgba(93, 133, 184, 0.18);

  /* Text */
  --text-primary:   #e4eaf5;
  --text-secondary: #96aac8;
  --text-muted:     #5a6b8a;
  --text-dim:       #3a4a62;

  /* Borders */
  --border:         rgba(93, 133, 184, 0.18);
  --border-strong:  rgba(93, 133, 184, 0.35);

  /* Typography */
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body:    'Crimson Text', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-xxl: 10rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md:   0 4px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg:   0 8px 48px rgba(0, 0, 0, 0.7);
  --shadow-book: 6px 6px 30px rgba(0, 0, 0, 0.75), 2px 2px 8px rgba(93, 133, 184, 0.12);
  --shadow-glow: 0 0 40px rgba(93, 133, 184, 0.12);

  /* Transitions */
  --transition:      0.25s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

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

a:hover {
  color: var(--accent-hover);
}

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

ul {
  list-style: none;
}

/* ============================================
   UTILITY
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--dark {
  background-color: var(--bg-secondary);
}

.section--card {
  background-color: var(--bg-card);
}

.text-center { text-align: center; }

.lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.75rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--smoke-mid);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-icon {
  font-size: 0.75rem;
  color: var(--steel);
  letter-spacing: 0.25em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 20px rgba(93, 133, 184, 0.35);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-glow);
}

.btn--ghost {
  background-color: transparent;
  color: var(--steel-light);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--steel);
}

.btn--lg {
  padding: 0.9rem 2.25rem;
  font-size: 0.9rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(11, 12, 17, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.nav__logo:hover {
  color: var(--steel-light);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__links a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-primary);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  transform: scaleX(1);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__toggle span {
  display: block;
  height: 1.5px;
  background-color: var(--text-secondary);
  transition: all var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 70% 50%, rgba(93, 133, 184, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(45, 51, 72, 0.3) 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  align-items: center;
  width: 100%;
  position: relative;
}

.hero__content {
  max-width: 580px;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero__title em {
  font-style: italic;
  color: var(--steel-light);
}

.hero__description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ============================================
   BOOK COVER DISPLAY
   ============================================ */
.book-feature {
  position: relative;
  display: flex;
  justify-content: center;
}

.book-feature__cover {
  width: 260px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-book);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.book-feature__cover:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 10px 10px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(93, 133, 184, 0.15);
}

/* Cover placeholder for when image isn't available */
.book-cover-placeholder {
  width: 260px;
  height: 390px;
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--smoke) 100%);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-book);
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}

.book-cover-placeholder__title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.book-cover-placeholder__author {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================
   BOOK CARD (for books page)
   ============================================ */
.book-single {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 2rem;
}

.book-single__cover img,
.book-single__cover .book-cover-placeholder {
  width: 240px;
}

.book-single__cover .book-cover-placeholder {
  height: 360px;
}

.book-single__meta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-single__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-primary);
}

.book-single__tagline {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--steel-light);
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.book-single__description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.book-single__details {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.book-detail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.book-detail__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.book-detail__value {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--steel-light);
}

.book-single__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-photo {
  position: relative;
}

.about-photo__img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: block;
  margin: 0 auto;
}

.about-photo__placeholder {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--smoke) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* ============================================
   STRIP / TAGLINE BAR
   ============================================ */
.strip {
  background-color: var(--smoke);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  overflow: hidden;
}

.strip__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  text-align: center;
}

.strip p {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel-light);
}

/* ============================================
   PAGE HERO (inner pages)
   ============================================ */
.page-hero {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(93, 133, 184, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  position: relative;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: var(--space-lg);
}

.footer__brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.footer__brand-tagline {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
}

.footer__bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer__heading {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__links a {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer__credit a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__credit a:hover {
  color: var(--steel);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.7s ease forwards;
}

.animate-fade-up--delay-1 { animation-delay: 0.15s; opacity: 0; }
.animate-fade-up--delay-2 { animation-delay: 0.3s;  opacity: 0; }
.animate-fade-up--delay-3 { animation-delay: 0.45s; opacity: 0; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__description {
    max-width: 100%;
  }

  .hero__actions {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .book-single {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-single__cover {
    display: flex;
    justify-content: center;
  }

  .book-single__tagline {
    text-align: left;
  }

  .book-single__actions {
    justify-content: center;
  }

  .book-single__details {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--space-md);
    gap: 1.25rem;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    font-size: 0.9rem;
  }

  .nav__toggle {
    display: flex;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__inner {
    padding: var(--space-lg) var(--space-md);
  }
}
