/* ============================================================
   Misa June, Dark Romance Author Site
   Palette: near-black plum, wine/crimson accent, antique parchment text
   Type: Cormorant Garamond (display) + Inter (body)
   ============================================================ */

:root {
  --bg: #100b0e;            /* near-black plum */
  --bg-alt: #170f13;        /* section alternate */
  --surface: #1e141a;       /* cards */
  --surface-2: #26191f;     /* inputs */
  --line: #3a2831;          /* borders/dividers */
  --text: #ece3dd;          /* parchment */
  --text-muted: #b3a49e;    /* muted parchment, 7:1+ on bg */
  --accent: #b03a4a;        /* wine crimson */
  --accent-hover: #c74a5c;
  --accent-soft: rgba(176, 58, 74, 0.12);
  --gold: #c9a26d;          /* antique gold for eyebrows/details */
  --danger: #e07a8a;
  --radius: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: var(--gold); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem;
  border-radius: var(--radius); z-index: 1000; transition: top 150ms ease-out;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16, 11, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 72rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text); text-decoration: none;
}

.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  cursor: pointer; padding: 0.5rem; min-width: 44px; min-height: 44px;
}

.nav-menu {
  display: flex; align-items: center; gap: 1.75rem; list-style: none;
}
.nav-menu a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em;
  padding: 0.5rem 0; transition: color 150ms ease-out;
}
.nav-menu a:hover, .nav-menu a:focus-visible { color: var(--text); }
.nav-menu .nav-cta {
  color: var(--gold); border: 1px solid var(--line);
  padding: 0.45rem 1rem; border-radius: var(--radius);
}
.nav-menu .nav-cta:hover { border-color: var(--gold); }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  padding: 0.85rem 1.75rem; min-height: 48px;
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
  touch-action: manipulation;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--text); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline { color: var(--text); border-color: var(--line); background: var(--surface); flex: 1; }
.btn-outline:hover { border-color: var(--accent); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 1.25rem; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.container { max-width: 72rem; margin: 0 auto; }
.container-narrow { max-width: 46rem; }

.section-eyebrow {
  color: var(--gold); text-transform: uppercase;
  letter-spacing: 0.3em; font-size: 0.75rem; font-weight: 500;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 500;
  line-height: 1.15; margin-bottom: 1.25rem;
}

.section-lead { color: var(--text-muted); max-width: 40rem; margin-bottom: 2.5rem; }

/* ---------- Book feature ---------- */
.book-feature {
  display: grid; grid-template-columns: minmax(0, 340px) 1fr;
  gap: 3.5rem; align-items: start; margin-top: 2.5rem;
}

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

.cover-img {
  width: 100%; max-width: 340px; height: auto;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow);
}

.book-title { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; }
.book-meta { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0.5rem 0 1.25rem; }
.book-blurb { color: var(--text-muted); margin-bottom: 1.25rem; max-width: 36rem; }

.book-tagline { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; color: var(--gold); }

.book-warning {
  display: flex; gap: 0.5rem; align-items: flex-start;
  color: var(--text-muted); font-size: 0.85rem;
  margin-bottom: 2rem;
}
.book-warning svg { flex-shrink: 0; margin-top: 0.2rem; color: var(--gold); }

.buy-options { display: flex; flex-direction: column; gap: 0.9rem; max-width: 30rem; }
.buy-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---------- Gallery / Instagram ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin: 2.5rem 0 3rem;
}
.gallery-item {
  display: block; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 250ms ease-out, opacity 250ms ease-out;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.03); opacity: 0.9; }

.ig-embeds {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-bottom: 3rem;
}
.ig-embeds .instagram-media { min-width: 0 !important; margin: 0 !important; }

.ig-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: linear-gradient(135deg, var(--surface) 0%, #2a1620 100%);
  border: 1px solid rgba(176, 58, 74, 0.45); border-radius: var(--radius);
  padding: 2rem 2.25rem;
}
.ig-banner-text h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; margin-bottom: 0.35rem; }
.ig-banner-text p { color: var(--text-muted); font-size: 0.95rem; max-width: 32rem; }

@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; }
  .ig-banner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Content advisory bar (top of page) ---------- */
.advisory-bar { padding: 1.5rem 1.25rem 0; }
.advisory-bar .arc-warnings { margin-bottom: 0; }
.advisory-bar + .section { padding-top: 1rem; }

/* ---------- ARC warnings ---------- */
.arc-warnings {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 2rem;
}
.arc-warnings summary {
  cursor: pointer; padding: 1rem 1.25rem;
  font-weight: 500; font-size: 0.92rem; color: var(--gold);
  list-style-position: inside;
}
.arc-warnings summary:hover { color: var(--text); }
.arc-warnings[open] summary { border-bottom: 1px solid var(--line); }
.arc-warnings-body { padding: 1.25rem 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.arc-warnings-body p { margin-bottom: 0.9rem; }
.arc-warnings-body ul { margin: 0 0 1.1rem 1.2rem; }
.arc-warnings-body li { margin-bottom: 0.3rem; }
.arc-warnings-body strong { color: var(--text); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  display: grid; place-items: start center;
  padding: 1.25rem; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 40rem; width: 100%;
  padding: 2.5rem;
  margin: auto;
  animation: modal-in 200ms ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }

.modal-close {
  position: absolute; top: 0.85rem; right: 0.85rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; border-radius: 50%;
  transition: color 150ms ease-out, background 150ms ease-out;
}
.modal-close:hover, .modal-close:focus-visible { color: var(--text); background: var(--surface-2); }

.modal-title { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; line-height: 1.15; margin-bottom: 1rem; }
.modal-lead { color: var(--text-muted); margin-bottom: 2rem; }
.modal .stripe-panel { padding: 0; border: none; background: none; }

@media (max-width: 720px) {
  .modal { padding: 2rem 1.5rem; }
  .modal-title { font-size: 1.9rem; }
}

/* ---------- Notice ---------- */
.notice {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid rgba(176, 58, 74, 0.45);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem; margin-bottom: 2.5rem;
}
.notice svg { flex-shrink: 0; color: var(--danger); margin-top: 0.15rem; }
.notice p { font-size: 0.95rem; }

/* ---------- Sell sheet (bookstore PDF) ---------- */
.sellsheet {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 2.5rem;
}
.sellsheet-info { display: flex; align-items: center; gap: 1rem; }
.sellsheet-info svg { color: var(--gold); flex-shrink: 0; }
.sellsheet-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.sellsheet-note { color: var(--text-muted); font-size: 0.9rem; }
.sellsheet-actions { display: flex; gap: 0.75rem; }
.sellsheet-actions .btn { flex: 0 0 auto; padding-inline: 1.35rem; }

@media (max-width: 560px) {
  .sellsheet-actions { width: 100%; }
  .sellsheet-actions .btn { flex: 1; }
}

/* ---------- Forms ---------- */
.form { max-width: 40rem; }

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.4rem 1.5rem; margin-bottom: 1.75rem;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-wide { grid-column: 1 / -1; }

.field label, .label-text { font-size: 0.88rem; font-weight: 500; letter-spacing: 0.02em; }
.req { color: var(--danger); }
.optional { color: var(--text-muted); font-weight: 400; }

.field input, .field select, .field textarea {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem;
  padding: 0.75rem 0.9rem; min-height: 48px;
  transition: border-color 150ms ease-out;
  width: 100%;
}
.field textarea { min-height: 0; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7d6f72; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #55404a; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }

.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.82rem; }

.helper { color: var(--text-muted); font-size: 0.82rem; }

.check {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.92rem; cursor: pointer; min-height: 44px; padding-block: 0.35rem;
}
.check input { width: 18px; height: 18px; margin-top: 0.2rem; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.form-status { margin-top: 1rem; font-size: 0.95rem; color: var(--gold); min-height: 1.5em; }

/* Stripe checkout panel */
.stripe-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; max-width: 40rem;
}
.stripe-panel h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; margin-bottom: 0.5rem; }
.stripe-price { color: var(--gold); font-size: 1.05rem; font-weight: 600; margin-bottom: 1rem; }
.stripe-detail { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.5rem; }
.stripe-detail li { margin-left: 1.2rem; margin-bottom: 0.3rem; }
.secure-note {
  display: flex; gap: 0.5rem; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.82rem; margin-top: 0.9rem;
}
.secure-note svg { color: var(--gold); }

/* ---------- About / Newsletter ---------- */
.about p { color: var(--text-muted); max-width: 38rem; margin-bottom: 1rem; }
.about-note { color: var(--text); }

.newsletter { text-align: center; }
.newsletter .section-lead { margin-inline: auto; }
.newsletter-form {
  display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-inline: auto;
}
.newsletter-form input {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 1rem; padding: 0.75rem 1rem; min-height: 48px; min-width: 260px; flex: 1; max-width: 22rem;
}
.newsletter-form input:focus { border-color: var(--accent); outline: none; }

/* ---------- Social ---------- */
.social-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--gold); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  margin-top: 1rem; min-height: 44px;
  transition: color 150ms ease-out;
}
.social-link:hover, .social-link:focus-visible { color: var(--text); }

.footer-social { display: flex; justify-content: center; }
.footer-social a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--text-muted); border: 1px solid var(--line);
  transition: color 150ms ease-out, border-color 150ms ease-out;
}
.footer-social a:hover, .footer-social a:focus-visible { color: var(--gold); border-color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 1.25rem; }
.footer-inner { text-align: center; display: flex; flex-direction: column; gap: 0.6rem; }
.brand-footer { font-size: 1.3rem; }
.footer-contact { font-size: 0.9rem; }
.footer-contact a { color: var(--gold); text-decoration: none; }
.footer-contact a:hover { color: var(--text); }
.footer-note { color: var(--text-muted); font-size: 0.85rem; }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .book-feature { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-cover { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li a { display: block; padding: 0.9rem 1.5rem; }
  .nav-menu .nav-cta { border: none; padding: 0.9rem 1.5rem; }

  .section { padding: 4rem 1.25rem; }
  .form-grid { grid-template-columns: 1fr; }
  .buy-row { flex-direction: column; }
}
