/* =========================================================
   Allison Baum Gates — personal site
   Palette drawn from the "Beyond the Pitch" cover:
   indigo + bright blue + highlighter yellow on warm off-white
   Display: Fraunces  ·  Body: Inter
   ========================================================= */

:root {
  --indigo:      #272358;
  --indigo-deep: #1a1740;
  --blue:        #2ba3de;
  --blue-deep:   #1f6aad;
  --yellow:      #ffe14d;
  --bg:          #faf8f2;
  --bg-card:     #fffdf7;
  --ink:         #17161c;
  --muted:       #5c596f;
  --line:        #e7e2d6;
  --maxw:        1120px;
  --measure:     720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- Display type ---------- */
h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 540;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--indigo);
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-variation-settings: "opsz" 60; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 560; }

p { margin: 0 0 1.1em; }
.lede { font-size: 1.18rem; color: var(--muted); }

/* eyebrow / kicker */
.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 1.1rem;
}

/* highlighter motif — the signature element */
.hl {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}
.hl::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.12em;
  right: -0.12em;
  bottom: 0.02em;
  height: 0.62em;
  background: var(--yellow);
  /* loose, hand-drawn marker edge */
  border-radius: 0.5em 0.7em 0.55em 0.8em;
  transform: rotate(-1.2deg) skewX(-3deg);
  opacity: 0.92;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }
.brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--indigo);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand span { color: var(--blue-deep); }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: 0.96rem; font-weight: 500;
  padding: 4px 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 6px;
  background: var(--yellow); border-radius: 4px; transition: right 0.22s ease; opacity: 0.9;
  z-index: -1;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 0.98rem;
  padding: 0.78em 1.35em; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--indigo); cursor: pointer; transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--indigo); }
.btn--ghost:hover { background: var(--indigo); color: #fff; transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 8vw, 96px); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: 0.5em; }
.hero .lede { max-width: 42ch; }
.hero-photo {
  position: relative; border-radius: 8px; overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(39,35,88,0.5);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Generic content column ---------- */
.prose { max-width: var(--measure); }
.prose p { margin-bottom: 1.2em; }
.prose .lede { margin-bottom: 1.4em; }

/* ---------- Books (cards) ---------- */
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.book-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
}
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.32em 0.7em; border-radius: 999px;
}
.tag--now { background: var(--blue); color: #fff; }
.tag--soon { background: var(--yellow); color: var(--indigo-deep); }
.book-card h3 { margin: 0; }
.book-card p { margin: 0; color: var(--muted); font-size: 1rem; }
.book-card .btn { margin-top: auto; align-self: flex-start; }

/* book card cover (Books hub) */
.book-card-cover { margin-bottom: 4px; }
.book-card-cover img { height: 210px; width: auto; border-radius: 5px; box-shadow: 0 14px 32px -18px rgba(39,35,88,0.55); }

/* book detail layout */
.book-detail { display: grid; grid-template-columns: 320px 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.book-cover-wrap {
  position: sticky; top: 96px;
  border-radius: 6px; overflow: hidden; box-shadow: 0 22px 50px -24px rgba(39,35,88,0.55);
}
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.blurb {
  border-left: 3px solid var(--yellow); padding: 4px 0 4px 20px; margin: 26px 0;
  font-family: "Fraunces", serif; font-size: 1.18rem; line-height: 1.45; color: var(--indigo);
}
.blurb cite { display: block; margin-top: 10px; font-family: "Inter", sans-serif; font-size: 0.92rem; font-style: normal; color: var(--muted); }
.inside-list { list-style: none; padding: 0; margin: 18px 0 0; }
.inside-list li { position: relative; padding: 8px 0 8px 30px; border-bottom: 1px solid var(--line); }
.inside-list li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 14px; height: 6px;
  background: var(--yellow); border-radius: 4px; transform: rotate(-3deg);
}

/* ---------- Logo strip ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center; }
.logos span, .logos a {
  font-family: "Fraunces", serif; font-weight: 500; color: var(--indigo);
  font-size: 1.05rem; opacity: 0.7; text-decoration: none;
  transition: opacity 0.18s ease, color 0.18s ease;
}
.logos a:hover { opacity: 1; color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Recent / writing list ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 30px; }
.filter-btn {
  font-family: "Inter", sans-serif; font-size: 0.92rem; font-weight: 600;
  padding: 0.5em 1.1em; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; transition: all 0.18s ease;
}
.filter-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.filter-btn[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.entry-list { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.entry a.entry-link { text-decoration: none; color: var(--ink); display: block; }
.entry a.entry-link:hover .entry-title { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.entry-outlet { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-deep); }
.entry-title { font-family: "Fraunces", serif; font-size: 1.18rem; color: var(--indigo); line-height: 1.25; margin-top: 2px; }
.entry-summary { color: var(--muted); font-size: 0.96rem; margin-top: 4px; }
.entry-year { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry.has-thumb { grid-template-columns: 84px 64px 1fr; }
.entry-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; }

/* ---------- Banner (dark image strip) ---------- */
.banner {
  position: relative; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; text-align: center; min-height: 320px; padding: 48px 24px;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 18%; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,18,40,0.82), rgba(20,18,40,0.45)); }
.banner-inner { position: relative; z-index: 1; max-width: 540px; }
.banner-inner h2, .banner-inner p { color: #fff; }
.banner-inner h2 { color: #fff; }
.banner-inner .eyebrow { color: var(--yellow); }

/* ---------- Forms (newsletter / notify) ---------- */
.signup { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; }
.signup input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 0.85em 1.1em; border-radius: 999px;
  border: 1.5px solid var(--line); font: inherit; font-size: 1rem; background: #fff;
}
.signup input[type="email"]:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.signup--ondark input[type="email"] { border-color: transparent; }
.form-note { font-size: 0.84rem; color: var(--muted); margin-top: 10px; }
.banner-inner .form-note { color: rgba(255,255,255,0.7); }
.form-success { display: none; font-family: "Fraunces", serif; font-size: 1.2rem; color: var(--indigo); }
.banner-inner .form-success { color: var(--yellow); }
.is-sent .signup { display: none; }
.is-sent .form-note { display: none; }
.is-sent .form-success { display: block; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; margin-top: 24px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-brand { font-family: "Fraunces", serif; font-size: 1.3rem; color: var(--indigo); }
.footer-sig { color: var(--muted); font-style: italic; margin-top: 6px; max-width: 30ch; }
.social { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.social a { color: var(--indigo); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.social a:hover { color: var(--blue-deep); }
.copyright { color: var(--muted); font-size: 0.85rem; margin-top: 28px; }

/* section heading helper */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head .more { font-weight: 600; font-size: 0.96rem; text-decoration: none; }
.section-head .more:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 420px; }
  .book-grid { grid-template-columns: 1fr; }
  .book-detail { grid-template-columns: 1fr; }
  .book-cover-wrap { position: static; max-width: 260px; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 18px 28px 26px;
    gap: 4px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-toggle {
    display: inline-flex; background: none; border: 1.5px solid var(--indigo);
    border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--indigo);
  }
  .entry { grid-template-columns: 1fr; gap: 4px; }
  .entry-year { grid-row: 1; }
  .entry.has-thumb { grid-template-columns: 64px 1fr; }
  .entry.has-thumb .entry-year { grid-column: 2; }
}
