/* === CSS Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === CSS Custom Properties === */
:root {
  --color-body-bg: #ffffff;
  --color-body-text: #999999;
  --color-heading: #333333;
  --color-content-text: #272727;
  --color-emphasis: #000000;
  --color-border: #272727;
  --color-branding: #999999;
  --color-nav-text: #000000;
  --color-footer-bg: #ffffff;
  --color-line: #e0e0e0;

  --font-body: 'Georgia', 'Times New Roman', Times, serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui: 'Lato', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* === Base Styles === */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-body-text);
  background-color: var(--color-body-bg);
  line-height: 1.6;
}

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

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

a:hover {
  opacity: 0.7;
}

/* === Typography === */
h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 400;
  color: var(--color-heading);
  line-height: 1.8;
}

h2 {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 400;
  color: var(--color-content-text);
  line-height: 1.8;
}

h3 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-branding);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1.8;
}

p {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-content-text);
  line-height: 1.6;
  letter-spacing: 0.17px;
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

em {
  font-style: italic;
}

blockquote {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-content-text);
  line-height: 1.6;
  padding: 20px 30px;
  margin: 20px 0;
  border-left: 3px solid var(--color-line);
  font-style: italic;
}

blockquote p {
  margin-bottom: 0.8em;
}

/* === Header === */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 40px;
  position: relative;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-content-text);
  transition: 0.3s;
}

.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(5px, -5px);
}

.site-branding {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-branding);
  text-decoration: none;
}

.site-branding:hover {
  opacity: 0.7;
}

/* === Mobile Navigation Overlay === */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.97);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.nav-overlay.active {
  display: flex;
}

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

.nav-overlay nav a {
  display: block;
  font-family: var(--font-heading);
  font-size: 37px;
  font-weight: 400;
  color: var(--color-nav-text);
  text-decoration: none;
  padding: 10px 0;
  line-height: 1.6;
}

.nav-overlay nav a:hover {
  opacity: 0.5;
}

/* === Main Content === */
.page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px 60px;
}

.page-content-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px 60px;
}

/* === Two Column Layout === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 30px 0;
}

.two-col img {
  width: 100%;
  height: auto;
}

/* === Buttons === */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--color-border);
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: 300px;
  padding: 21px 34px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--color-border);
  color: #fff;
  opacity: 1;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 30px 0;
}

/* === Book Title Section === */
.book-title-section {
  text-align: center;
  padding: 20px 0 10px;
}

.book-title-section h1 {
  margin-bottom: 10px;
}

.book-title-section .subtitle {
  font-family: var(--font-body);
  font-size: 17px;
  font-style: italic;
  color: var(--color-emphasis);
  margin-bottom: 10px;
}

.book-title-section .publisher {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-content-text);
}

/* === Gallery === */
.gallery-stacked {
  display: flex;
  align-items: flex-end;
  gap: 0;
  overflow-x: auto;
  padding: 20px 0;
}

.gallery-stacked img {
  height: 400px;
  width: auto;
  flex-shrink: 0;
}

/* === Footer === */
.site-footer {
  padding: 40px;
  text-align: center;
  border-top: 1px solid var(--color-line);
  margin-top: 40px;
}

.site-footer a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-content-text);
  text-decoration: none;
}

.site-footer a:hover {
  opacity: 0.7;
}

/* === Review Page Styles === */
.review-page h2 {
  margin-bottom: 10px;
}

.review-page p {
  margin-bottom: 20px;
}

.review-page img {
  margin: 20px 0;
}

.review-page .gallery-images img {
  margin-bottom: 10px;
}

/* === Press Links Page === */
.press-links p {
  font-size: 17px;
  margin-bottom: 15px;
}

.press-links a {
  color: var(--color-content-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.press-links a:hover {
  border-bottom-color: var(--color-content-text);
  opacity: 1;
}

/* === Purchase Page === */
.purchase-page {
  text-align: center;
}

.purchase-page .button-row {
  flex-direction: column;
  align-items: center;
}

.purchase-page img {
  max-width: 400px;
  margin: 30px auto;
}

/* === Excerpts Page === */
.excerpts-page h1 {
  margin-top: 40px;
  margin-bottom: 10px;
}

.excerpts-page h2 {
  margin-top: 30px;
  margin-bottom: 10px;
}

.excerpts-page h3 {
  margin-bottom: 20px;
}

.excerpts-page .links-section {
  margin-bottom: 20px;
}

.excerpts-page .links-section a {
  display: block;
  font-style: italic;
  margin-bottom: 5px;
  word-break: break-all;
}

/* === About Page === */
.about-page p {
  margin-bottom: 1.2em;
}

/* === Responsive === */
@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 20px;
  }

  .page-content,
  .page-content-wide {
    padding: 0 20px 40px;
  }

  .nav-overlay nav a {
    font-size: 28px;
  }

  .button-row {
    flex-direction: column;
    align-items: center;
  }

  .gallery-stacked img {
    height: 280px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .gallery-stacked img {
    height: 200px;
  }

  .site-header {
    padding: 15px;
  }

  .page-content,
  .page-content-wide {
    padding: 0 15px 30px;
  }
}
