/* ============================================
   Romance Drop — Shared Styles
   Color Palette:
     Primary accent (rose):  #e11d48
     Hover (berry):          #9f1239
     Background (warm white): #faf5f0
     Text (charcoal):        #1c1917
     Muted text:             #78716c
     Card bg:                #ffffff
     Border:                 #e7e5e4
   ============================================ */

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

:root {
  --rose: #e11d48;
  --berry: #9f1239;
  --warm-white: #faf5f0;
  --charcoal: #1c1917;
  --muted: #78716c;
  --card-bg: #ffffff;
  --border: #e7e5e4;
  --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--rose);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ---- Layout ---- */

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

.section {
  padding: 3rem 0;
}

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

/* ---- Header / Nav ---- */

.header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
}

.logo:hover {
  color: var(--charcoal);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

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

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--rose);
}

/* ---- Hero ---- */

.hero {
  text-align: center;
  padding: 4rem 0 2.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.hero-title span {
  color: var(--rose);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

/* ---- Search Bar ---- */

.search-wrap {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.search-bar {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar::placeholder {
  color: var(--muted);
  font-size: 0.95rem;
}

.search-bar:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}

/* ---- Cards Grid ---- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 540px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1080px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- Trope Card ---- */

.trope-card {
  display: block;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--charcoal);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.trope-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--rose);
  color: var(--charcoal);
}

.trope-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.trope-card__tagline {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 0;
}

/* ---- Book Card ---- */

.book-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.book-card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rose);
  background: rgba(225, 29, 72, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.book-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.book-card__author {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.book-card__pitch {
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

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

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

.btn--ghost {
  background: transparent;
  color: var(--rose);
  border: 2px solid var(--rose);
}

.btn--ghost:hover {
  background: var(--rose);
  color: #fff;
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

.btn--full {
  width: 100%;
}

/* ---- Email Capture ---- */

.email-section {
  text-align: center;
  padding: 4rem 0;
}

.email-section h2 {
  margin-bottom: 0.75rem;
}

.email-section p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.email-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  flex-direction: column;
}

@media (min-width: 540px) {
  .email-form {
    flex-direction: row;
  }
}

.email-form input[type="email"] {
  flex: 1;
  padding: 0.8rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.15s ease;
}

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

.email-form input[type="email"]::placeholder {
  color: var(--muted);
}

/* ---- Section Headers ---- */

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ---- Footer ---- */

.footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
}

.footer a:hover {
  color: var(--rose);
}

/* ---- Page Header (for non-homepage) ---- */

.page-header {
  text-align: center;
  padding: 3rem 0 1.5rem;
}

.page-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---- Utility ---- */

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ---- Responsive Adjustments ---- */

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .section {
    padding: 2rem 0;
  }

  .hero {
    padding: 2.5rem 0 1.5rem;
  }

  .email-section {
    padding: 2.5rem 0;
  }

  .page-header {
    padding: 2rem 0 1rem;
  }
}
