/* Aristeia Press — Design tokens + responsive overrides */

:root {
  /* Palette */
  --bg: #fafaf7;
  --ink: #0d0d0d;
  --ink2: #3a3a3a;
  --muted: #6a6a6a;
  --paper: #f1ebda;
  --accent: #9b2c2c;

  /* Type families */
  --serif: "Cormorant Garamond", Georgia, serif;
  --serif-body: Georgia, "Cormorant Garamond", serif;
  --sans: Inter, "Helvetica Neue", system-ui, sans-serif;

  /* Responsive type scale */
  --size-hero:    clamp(44px, 7.5vw, 96px);
  --size-section: clamp(38px, 5.5vw, 88px);
  --size-glyph:   clamp(80px, 18vw, 240px);
  --size-display: clamp(26px, 3vw, 56px);
  --size-card-title: clamp(20px, 2.2vw, 30px);
  --size-card-title-sm: clamp(17px, 1.8vw, 22px);
  --size-body-lg: clamp(17px, 1.4vw, 20px);
  --size-body:    clamp(15px, 1.2vw, 19px);
  --size-ui:      14px;
  --size-meta:    12px;
  --size-eyebrow: 12px;

  /* Spacing */
  --gutter:       clamp(24px, 4vw, 56px);
  --section-pad:  clamp(60px, 8vw, 120px);
  --max-width: 1280px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; }
input, textarea { font-family: var(--sans); outline: none; }

/* Site shell */
.ap-site { background: var(--bg); color: var(--ink); min-height: 100vh; }
.ap-page  { background: var(--bg); color: var(--ink); }

/* Input focus state */
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }

/* ─── Hover & transition states ─── */
.ap-cover-wrap { overflow: hidden; }
.ap-cover-img  { transition: transform 0.35s ease; }
.ap-book-card:hover .ap-cover-img { transform: scale(1.03); }

.ap-nav-link:hover { text-decoration: underline; text-underline-offset: 6px; }
.ap-nav-link.active { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }

.ap-index-row { cursor: pointer; }
.ap-index-row:hover .ap-index-title { color: var(--accent); }

.ap-btn-primary:hover { background: #1a1a1a !important; }
.ap-btn-ghost:hover   { background: var(--ink) !important; color: var(--bg) !important; }
.ap-chip:hover        { background: rgba(13,13,13,0.08); }
.ap-chip.active       { background: var(--ink); color: var(--bg); }
.ap-author-chip:hover { background: var(--ink); color: var(--bg); }

/* ─── Mobile nav ─── */
.ap-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.ap-hamburger span {
  display: block; width: 24px; height: 2px; background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.ap-nav-mobile {
  display: none;
  flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--ink);
  padding: 24px var(--gutter); gap: 20px;
  z-index: 200; font-size: 18px; font-weight: 500;
}
.ap-nav-mobile.open { display: flex; }

/* ─── Responsive layout overrides ─── */

/* Tablet (768–1023px) */
@media (max-width: 1023px) {
  .ap-grid-3  { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
  .ap-grid-4  { grid-template-columns: repeat(2, 1fr) !important; gap: 28px !important; }
  .ap-hero-grid { grid-template-columns: 1fr !important; }
  .ap-two-col { grid-template-columns: 1fr !important; gap: 32px !important; }
  .ap-coll-grid { grid-template-columns: 1fr !important; }
  .ap-mission { grid-template-columns: 1fr !important; gap: 40px !important; }
  .ap-book-hero { grid-template-columns: 1fr !important; }
  .ap-author-row { grid-template-columns: 1fr !important; gap: 32px !important; }
  .ap-rights-row { grid-template-columns: 1fr 1fr !important; }
  .ap-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .ap-catalog-index-row { grid-template-columns: 48px 1fr 1fr 1fr !important; }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .ap-grid-3  { grid-template-columns: 1fr !important; }
  .ap-grid-4  { grid-template-columns: 1fr 1fr !important; gap: 20px !important; row-gap: 40px !important; }
  .ap-catalog-index-row { grid-template-columns: 40px 1fr !important; }
  .ap-catalog-index-row .ap-idx-author,
  .ap-catalog-index-row .ap-idx-meta { display: none !important; }
  .ap-we-like-grid  { grid-template-columns: 1fr !important; }
  .ap-contact-grid  { grid-template-columns: 1fr !important; }
  .ap-footer-grid   { grid-template-columns: 1fr !important; }
  .ap-nav-links     { display: none !important; }
  .ap-hamburger     { display: flex !important; }
  .ap-newsletter-link { display: none !important; }
  .ap-rights-row { grid-template-columns: 1fr !important; }
  .ap-rights-row .ap-rights-avail { display: none !important; }
}
