/*
Theme Name: Rissy's Reading Room
Theme URI: https://rissysreadingroom.com/
Author: Rissy's Reading Room
Description: Editorial book review theme for Rissy's Reading Room.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: rissys-reading-room
*/

:root {
  color-scheme: light;
  --ink: #171614;
  --muted: #6d655d;
  --paper: #fbf7ef;
  --cream: #f3eadb;
  --line: rgba(23, 22, 20, 0.14);
  --rose: #b04d57;
  --plum: #4a2b42;
  --moss: #586a47;
  --gold: #c6913d;
  --charcoal: #211d1b;
  --shadow: 0 22px 70px rgba(32, 25, 19, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: #fff;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled,
.site-header.menu-open {
  background: rgba(251, 247, 239, 0.94);
  color: var(--ink);
  box-shadow: 0 10px 40px rgba(23, 22, 20, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: currentColor;
  font-size: 0.72rem;
  opacity: 0.72;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 0.92rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: min(780px, 92vh);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--charcoal);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 12, 10, 0.86), rgba(16, 12, 10, 0.44) 44%, rgba(16, 12, 10, 0.18)),
    linear-gradient(0deg, rgba(16, 12, 10, 0.58), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 36px));
  margin: 0 0 clamp(54px, 9vw, 104px) clamp(18px, 7vw, 88px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0c36f;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.96;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(4rem, 11vw, 8.9rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 5vw, 5.4rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 1.8vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

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

.button.primary {
  background: var(--rose);
  color: #fff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.ticker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--charcoal);
  color: #fff;
  scrollbar-width: none;
}

.ticker span {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
}

.section {
  padding: clamp(64px, 9vw, 112px) clamp(18px, 5vw, 72px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: clamp(24px, 5vw, 70px);
  align-items: stretch;
}

.feature-panel {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.feature-panel p {
  max-width: 760px;
  font-size: 1.06rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--rose);
  font-weight: 800;
}

.text-link::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

.stat-strip {
  display: grid;
  gap: 14px;
}

.stat-strip div {
  padding: 24px;
  border-left: 4px solid var(--rose);
  background: #fffaf2;
  box-shadow: 0 12px 34px rgba(32, 25, 19, 0.06);
}

.stat-strip strong {
  display: block;
  color: var(--plum);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.2rem;
  line-height: 1;
}

.stat-strip span {
  color: var(--muted);
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.review-tools {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.search-box input {
  width: min(340px, 82vw);
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--ink);
  outline: none;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-tabs button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 18px 46px rgba(32, 25, 19, 0.08);
}

.cover-art {
  position: relative;
  min-height: 280px;
  padding: 18px;
  overflow: hidden;
  background: var(--cover-bg);
}

.cover-art::before {
  content: "";
  position: absolute;
  inset: 18px 54px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), transparent);
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.14);
}

.cover-art::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 70px;
  height: 110px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(9deg);
}

.cover-art span {
  position: relative;
  z-index: 1;
  display: block;
  width: min-content;
  max-width: 220px;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 0.92;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.22);
}

.post-content {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stars {
  color: var(--gold);
}

.post-content p {
  margin-bottom: 0;
}

.post-card button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--rose);
  font-weight: 800;
  cursor: pointer;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(28px, 6vw, 84px);
  background: #fffaf2;
}

.shelf-list {
  display: grid;
  gap: 14px;
}

.shelf-list article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.shelf-list span {
  color: var(--rose);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.shelf-list p {
  margin-bottom: 0;
}

.club-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  background: var(--plum);
  color: #fff;
}

.club-section p {
  color: rgba(255, 255, 255, 0.78);
}

.club-card {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.club-card label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 800;
}

.club-card input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  outline: none;
}

.form-note {
  min-height: 24px;
  margin: 0;
  font-size: 0.9rem;
}

.newsletter {
  max-width: 1180px;
}

.newsletter h2 {
  max-width: 1000px;
}

.newsletter p {
  max-width: 720px;
  font-size: 1.06rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.site-footer p {
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 10, 0.72);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.68fr) 1fr;
  width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.92);
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 10px;
  width: 17px;
  height: 2px;
  background: var(--ink);
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.modal-cover {
  min-height: 520px;
}

.modal-body {
  padding: clamp(26px, 5vw, 52px);
}

.modal-body h2 {
  font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.rating-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}

.rating-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rating-list dt {
  color: var(--muted);
  font-weight: 800;
}

.rating-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .intro-grid,
  .split-section,
  .club-section {
    grid-template-columns: 1fr;
  }

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

  .review-tools {
    justify-items: start;
  }

  .filter-tabs {
    justify-content: flex-start;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    right: 12px;
    left: 12px;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow);
  }

  .site-header.menu-open .nav-links {
    display: grid;
  }

  .nav-links a {
    padding: 14px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 720px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(16, 12, 10, 0.84), rgba(16, 12, 10, 0.34)),
      linear-gradient(90deg, rgba(16, 12, 10, 0.52), rgba(16, 12, 10, 0.18));
  }

  h1 {
    font-size: clamp(3.5rem, 17vw, 5.6rem);
  }

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

  .cover-art {
    min-height: 250px;
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-cover {
    min-height: 300px;
  }

  .site-footer {
    flex-direction: column;
  }
}
