/* ==========================================================================
   Dr. Elena Vance — A Daily Guide of Sexual Wellness for Modern Men and Women
   Refined clinical-wellness editorial palette inspired by the Men's teal/gold
   compass cover and Women's warm ivory/dusty-rose moon-phase cover.
   Zero external CDN dependencies for fast LCP and strict CSP compliance.
   ========================================================================== */

:root {
  --bg: #FBF8F4;
  --bg-alt: #F2ECE4;
  --surface: #FFFFFF;
  --surface-tint: #FAF6F1;
  --ink: #1B2829;
  --ink-soft: #4A5A5B;
  --ink-muted: #6C7A7B;
  --border: #E4DDD4;
  --border-strong: #CEC4B8;

  --teal: #16383A;
  --teal-hover: #0F292B;
  --teal-soft: #E8F1F1;
  --gold: #B67D24;
  --gold-soft: #FBF3E4;
  --rose: #9E4D57;
  --rose-soft: #F9ECEE;
  --amazon: #E88B14;
  --amazon-hover: #CA760C;

  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, Cambria, serif;
  --font-sans: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(22, 56, 58, 0.05);
  --shadow-md: 0 12px 30px rgba(22, 56, 58, 0.09);
  --shadow-book: 8px 14px 28px rgba(22, 56, 58, 0.22), 2px 4px 8px rgba(22, 56, 58, 0.1);
  --max-width: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: var(--radius-sm);
}

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

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.22;
  margin-top: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.12rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--bg-alt);
  color: var(--ink);
}

.site-nav .nav-cta {
  background: var(--teal);
  color: #fff;
  margin-left: 6px;
}

.site-nav .nav-cta:hover {
  background: var(--teal-hover);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.2;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

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

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

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

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

.btn-rose:hover {
  background: #823C45;
  color: #fff;
}

.btn-amazon {
  background: var(--amazon);
  color: #1F1610;
}

.btn-amazon:hover {
  background: var(--amazon-hover);
  color: #1F1610;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.86rem;
}

/* Hero Section */
.hero {
  padding: 54px 0 44px;
  background:
    radial-gradient(ellipse 50% 58% at 86% 18%, rgba(22, 56, 58, 0.11), transparent 64%),
    radial-gradient(ellipse 46% 52% at 62% 84%, rgba(224, 177, 94, 0.22), transparent 66%),
    radial-gradient(ellipse 42% 55% at 10% 80%, rgba(158, 77, 87, 0.12), transparent 64%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 38px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.eyebrow-rose {
  color: var(--rose);
  background: var(--rose-soft);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--ink);
}

.stat-label {
  font-size: 0.84rem;
  color: var(--ink-muted);
}

/* Dual Cover Hero Showcase */
.hero-visual-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dual-cover-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 0 4px;
}

.stage-book {
  width: 175px;
  aspect-ratio: 2 / 3;
  border-radius: 4px 12px 12px 4px;
  overflow: hidden;
  box-shadow: var(--shadow-book);
  border: 1px solid rgba(22, 56, 58, 0.14);
  transition: transform 0.2s ease;
  background: var(--surface);
}

.stage-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-book-left {
  transform: rotate(-3deg);
}

.stage-book-right {
  transform: rotate(3deg);
}

.stage-book:hover {
  transform: translateY(-6px) scale(1.03);
}

/* Summary Box & GEO TL;DR */
.summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}

.summary-box h2 {
  font-size: 1.12rem;
  margin-bottom: 12px;
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.summary-list li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  font-size: 0.91rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.summary-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.summary-key {
  font-weight: 700;
  color: var(--ink-muted);
}

.geo-tldr {
  background: linear-gradient(135deg, #FFFFFF 0%, #F7FAF9 100%);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 20px;
  margin: 0 0 22px;
  box-shadow: var(--shadow-sm);
}

.geo-tldr-rose {
  background: linear-gradient(135deg, #FFFFFF 0%, #FDF7F7 100%);
  border-left-color: var(--rose);
}

.geo-tldr-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}

.geo-tldr-rose .geo-tldr-label {
  color: var(--rose);
}

.geo-tldr p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink);
}

.asin-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  background: var(--bg-alt);
  color: var(--ink-soft);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Bands & Grids */
.band {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.band-white {
  background: var(--surface);
}

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

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

.section-header h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  margin-bottom: 6px;
}

.section-sub {
  color: var(--ink-soft);
  margin: 0;
  max-width: 68ch;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Book Showcase Cards (Men's & Women's Flagship Editions) */
.guide-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-card-men {
  border-top: 5px solid var(--teal);
}

.guide-card-women {
  border-top: 5px solid var(--rose);
}

.guide-card-top {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.guide-cover-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px 10px 10px 4px;
  box-shadow: var(--shadow-book);
  border: 1px solid rgba(22, 56, 58, 0.12);
}

.guide-card h3 {
  font-size: 1.38rem;
  margin: 4px 0 8px;
}

.guide-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.guide-card h3 a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.guide-tagline {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--gold);
  margin: 0 0 8px;
}

.guide-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

.feature-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.feature-bullets li {
  margin-bottom: 6px;
}

.guide-editions-mini {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.87rem;
  color: var(--ink-soft);
}

.guide-editions-mini strong {
  color: var(--ink);
}

.card-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

/* Info Cards */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card h3 {
  font-size: 1.16rem;
  margin: 0;
}

.info-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.card-kicker {
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.card-kicker-rose {
  color: var(--rose);
}

.card-kicker-gold {
  color: var(--gold);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table.facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

table.facts-table th,
table.facts-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.facts-table tr:last-child th,
table.facts-table tr:last-child td {
  border-bottom: none;
}

table.facts-table thead th {
  background: var(--teal);
  color: #FFFFFF;
  font-weight: 700;
}

table.facts-table tbody th {
  background: var(--surface-tint);
  color: var(--ink);
  font-weight: 700;
}

/* Book Detail Page */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.breadcrumb li::after {
  content: "›";
  margin-left: 8px;
}

.breadcrumb li:last-child::after {
  content: "";
  margin-left: 0;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.book-hero {
  padding: 36px 0 48px;
  border-bottom: 1px solid var(--border);
}

.book-hero-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.book-hero-cover {
  width: 100%;
  max-width: 265px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px 12px 12px 4px;
  box-shadow: var(--shadow-book);
  border: 1px solid rgba(22, 56, 58, 0.14);
}

.prose-section {
  padding: 44px 0;
}

.prose-section h2 {
  font-size: 1.55rem;
  margin-bottom: 12px;
}

.prose-section p {
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/* FAQ Accordions */
.faq-list {
  display: grid;
  gap: 12px;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

details.faq-item summary {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--teal);
  flex-shrink: 0;
}

details.faq-item[open] summary::after {
  content: "−";
}

details.faq-item .faq-answer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
}

details.faq-item .faq-answer p {
  margin: 0;
}

/* Footer */
.site-footer {
  background: var(--teal);
  color: #E3ECEC;
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer h2, .site-footer h3 {
  color: #FFFFFF;
  font-size: 1.08rem;
  margin-bottom: 12px;
}

.site-footer p {
  color: #C7D7D8;
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #E3ECEC;
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #F4C878;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: #A9BEC0;
}

.mb-lg {
  margin-bottom: 32px;
}

.mt-lg {
  margin-top: 28px;
}

.actions-compact {
  margin-bottom: 0;
  margin-top: 10px;
}

@media (max-width: 920px) {
  .hero-grid,
  .two-col-grid,
  .book-hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .guide-card-top {
    grid-template-columns: 120px minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .guide-card-top {
    grid-template-columns: 1fr;
  }

  .guide-cover-img {
    max-width: 190px;
  }

  .summary-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
