/* =========================================================
   Jenn Dowe — author site
   Colors pulled from the book cover and signing graphics.
   ========================================================= */
:root {
  --cream: #f6f1e8;
  --cream-2: #efe7d9;
  --paper: #fbf8f2;
  --ink: #2d2a26;
  --muted: #6e665c;
  --green: #2f4a3a;
  --wine: #8b2232;
  --wine-dark: #6d1826;
  --gold: #b8955a;
  --line: #e2d6c2;

  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Allura", "Brush Script MT", cursive;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1080px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(16px, calc((100% - var(--max)) / 2));
  background: rgba(246, 241, 232, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 600 1.6rem/1 var(--serif);
  letter-spacing: .04em; color: var(--green); text-decoration: none;
}
.nav { display: flex; gap: clamp(12px, 3vw, 32px); }
.nav a {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 6px 0;
  border-bottom: 1px solid transparent; transition: border-color .2s, color .2s;
}
.nav a:hover { color: var(--wine); border-color: var(--wine); }

/* ---------- Shared bits ---------- */
:root {
  --sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Cg fill='%232f4a3a'%3E%3Cpath d='M58 13C46 4 30 6 8 13c22 2 36 6 50 0z' opacity='.85'/%3E%3Cpath d='M62 13c12-9 28-7 50 0-22 2-36 6-50 0z' opacity='.85'/%3E%3C/g%3E%3Cg fill='%238b2232'%3E%3Ccircle cx='55' cy='14' r='4'/%3E%3Ccircle cx='65' cy='14' r='4'/%3E%3Ccircle cx='60' cy='8' r='4'/%3E%3C/g%3E%3C/svg%3E");
}
.sprig {
  display: block; width: 120px; height: 26px; margin: 18px 0;
  background: var(--sprig) center / contain no-repeat;
}
.center { text-align: center; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  font: 600 .82rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; transition: transform .15s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--wine); color: #fff; box-shadow: 0 6px 18px rgba(139, 34, 50, .25); }
.btn--primary:hover { background: var(--wine-dark); }
.btn--ghost { color: var(--green); border: 1.5px solid var(--green); }
.btn--ghost:hover { background: var(--green); color: #fff; }
.btn--light { background: #fff; color: var(--wine); margin-top: 8px; text-transform: none; letter-spacing: .02em; font-size: .95rem; }

a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) 16px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.hero__cover img {
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 24px 60px -12px rgba(45, 42, 38, .35);
  transform: rotate(-1.2deg);
}
.eyebrow {
  margin: 0 0 6px; font: 600 .8rem/1 var(--sans);
  letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
}
.title {
  margin: 0; font: 700 clamp(2.6rem, 6vw, 4.4rem)/1 var(--serif);
  text-transform: uppercase; letter-spacing: .01em; color: var(--ink);
}
.title .script, .script-sm {
  font-family: var(--script); font-weight: 400; text-transform: none; color: var(--wine);
}
/* "the Vines" uses Great Vibes to match the lettering on the book cover */
.title .script { display: block; font-family: "Great Vibes", var(--script); font-size: 1.45em; line-height: 1.05; margin-top: .05em; }
.subtitle {
  margin: 14px 0 0; font: 600 .9rem/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--green);
}
/* Keeps the holly sprig centered under "A Christmas Novel" */
.subtitle-block { display: inline-flex; flex-direction: column; align-items: center; }
.lede { font: 500 1.35rem/1.5 var(--serif); color: var(--muted); max-width: 32ch; margin: 0 0 28px; }
.buy { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
/* Sections alternate cream / white-ish, each topped with a gold rule
   and a small holly ornament sitting on the line. */
.section {
  --bg: var(--cream);
  position: relative;
  padding: clamp(64px, 9vw, 112px) 16px;
  background: var(--bg);
  border-top: 1px solid rgba(184, 149, 90, .55);
}
.section::before {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 116px; height: 36px; transform: translate(-50%, -50%);
  border: 1px solid rgba(184, 149, 90, .55); border-radius: 999px;
  background: var(--sprig) center / 84px 18px no-repeat, var(--bg);
}
.section--tint { --bg: var(--paper); }
.section--wine { --bg: var(--wine); color: #fbeff0; border-top: 0; }
.section--wine::before { background-color: var(--paper); }
.narrow { max-width: 680px; margin: 0 auto; }

.heading {
  margin: 0 0 24px; text-align: center;
  font: 600 clamp(2.2rem, 5vw, 3rem)/1.05 var(--serif); color: var(--green);
}
.heading .script-sm { display: block; font-size: .72em; line-height: 1; margin-bottom: 2px; }.heading--left { text-align: left; }
.heading--contact .script-sm { padding-bottom: 12px; }.heading--light, .heading--light .script-sm { color: #fff; }
.subheading {
  text-align: center; margin: 0 0 28px;
  font: 600 clamp(1.05rem, 2.4vw, 1.35rem)/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.pull {
  margin: 36px 0 0; padding: 22px 0; text-align: center;
  font: italic 500 1.5rem/1.4 var(--serif); color: var(--wine);
  border-block: 1px solid var(--line);
}

/* ---------- Where to buy ---------- */
.where { max-width: var(--max); margin: 64px auto 0; }
.stores {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 14px;
}
.stores li { flex: 1 1 220px; }
.stores a {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--cream); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.stores a:hover { border-color: var(--wine); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(139,34,50,.45); }
.stores strong { font: 600 1.35rem/1.2 var(--serif); color: var(--wine); }
.stores span { font-size: .85rem; color: var(--muted); }

/* ---------- Reviews carousel ---------- */
.reviews { max-width: 880px; margin: 0 auto; }
/* Arrows sit on either side of the reviews; dots go underneath */
.carousel {
  display: grid; align-items: center;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-areas: "prev track next" ". dots .";
  column-gap: clamp(12px, 3vw, 36px);
}
.carousel__track { grid-area: track; }
.carousel__controls { display: contents; }
.carousel__btn[data-dir="-1"] { grid-area: prev; }
.carousel__btn[data-dir="1"] { grid-area: next; }
.carousel__nav { grid-area: dots; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; }
.carousel__pause {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.carousel__pause:hover { color: var(--green); border-color: var(--green); }
.carousel__pause:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.carousel__pause svg { width: 14px; height: 14px; fill: currentColor; }
.carousel__pause .icon-play, .carousel__pause.is-paused .icon-pause { display: none; }
.carousel__pause.is-paused .icon-play { display: block; }
/* Phones: not enough room beside the text, so arrows join the dots below */
@media (max-width: 600px) {
  .carousel {
    grid-template-columns: 1fr auto auto auto 1fr;
    grid-template-areas: "track track track track track" ". prev dots next .";
    column-gap: 10px;
  }
  .carousel__btn { margin-top: 26px; }
}
.carousel__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; border-radius: 4px; }
.review {
  flex: 0 0 100%; scroll-snap-align: center; margin: 0;
  padding: 4px clamp(4px, 2vw, 16px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.review > * { max-width: 640px; }   /* comfortable line length even with the arrows pushed out */
.review__stars { width: 124px; height: 22px; margin: 0 auto 14px; }
.review__title {
  margin: 0 0 14px; font: 600 clamp(1.35rem, 2.6vw, 1.6rem)/1.25 var(--serif); color: var(--green); text-wrap: balance;
}
/* Long reviews show ~6 lines and fade out until "Read full review" is pressed */
.review__body {
  margin: 0; font: italic 500 clamp(1.12rem, 2vw, 1.25rem)/1.6 var(--serif); color: var(--ink);
  max-height: 9.6em; overflow: hidden;
}
.review__body.is-clamped { -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.review__body.is-open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.review__body p { margin: 0 0 .8em; text-wrap: pretty; }
.review__body p:last-child { margin-bottom: 0; }
.review__more {
  margin-top: 10px; padding: 8px 4px; border: 0; background: none; cursor: pointer;
  font: 600 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--wine);
  text-decoration: underline; text-underline-offset: 4px;
}
.review__more:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.review figcaption {
  margin-top: 16px; font: 600 .78rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.review cite { font-style: normal; color: var(--muted); }
.review cite a { color: var(--wine); }
.carousel__btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--green); background: transparent; color: var(--green); cursor: pointer;
  transition: background .2s, color .2s;
}
.carousel__btn:hover { background: var(--green); color: #fff; }
.carousel__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carousel__btn:focus-visible, .carousel__dot:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.carousel__dots { display: flex; gap: 4px; }
/* 24px tap target with a small visible dot inside */
.carousel__dot { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.carousel__dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.carousel__dot[aria-current="true"]::before { background: var(--wine); transform: scale(1.25); }
.reviews__more { margin-top: 36px; }

/* ---------- Events ---------- */
.events { list-style: none; margin: 32px 0 0; padding: 0; }
.event {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.event:first-child { border-top: 1px solid var(--line); }
.event__date {
  width: 68px; padding: 8px 0; text-align: center; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column; line-height: 1.1;
}
.event__date span { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.event__date strong { font: 700 1.9rem/1.05 var(--serif); color: var(--wine); }
.event__info h3 { margin: 0; font: 600 1.4rem/1.2 var(--serif); color: var(--ink); }
.event__info h3 small { font-size: .75em; color: var(--muted); font-weight: 500; }
.event__info p { margin: 2px 0 0; font-size: .92rem; color: var(--muted); }
.event__map {
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green); text-decoration: none; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 999px; transition: background .2s, color .2s;
}
.event__map:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Author ---------- */
.author {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 280px 1fr; gap: clamp(32px, 6vw, 64px); align-items: center;
}
.author__photo {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--paper); box-shadow: 0 0 0 2px var(--gold), 0 20px 40px -18px rgba(45,42,38,.4);
}
.tagline {
  margin-top: 24px; font: 600 .8rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}

/* ---------- Contact & social ---------- */
.section--wine p { font-size: 1.05rem; }
/* text-wrap: balance splits the sentence into even lines (two on wider screens) */
.contact__intro { margin: 0 auto 20px; text-wrap: balance; }
.section--wine .social__intro { margin: 40px auto 0; font-size: .95rem; color: rgba(255,255,255,.85); text-wrap: balance; }
.social { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.social a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 16px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.5); color: #fff; text-decoration: none;
  font: 600 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.social a:hover { background: #fff; color: var(--wine); border-color: #fff; }
.social svg { width: 20px; height: 20px; flex: none; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 16px 40px; text-align: center; font-size: .82rem; color: var(--muted); }
.site-footer .sprig { margin: 0 auto 10px; width: 90px; }
.site-footer p { margin: 0; }

/* ---------- Phones & tablets ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__cover { max-width: 280px; margin: 0 auto; }
  .hero__text .sprig { margin-inline: auto; }
  .lede { margin-inline: auto; }
  .buy { justify-content: center; }
  .author { grid-template-columns: 1fr; text-align: center; }
  .author__photo { max-width: 220px; margin: 0 auto; }
  .heading--left { text-align: center; }
}
@media (max-width: 520px) {
  .site-header { flex-direction: column; gap: 6px; padding-block: 10px; }
  .nav { gap: 16px; }
  .nav a { font-size: .7rem; letter-spacing: .1em; }
  .event { grid-template-columns: auto 1fr; gap: 14px; }
  .event__map { grid-column: 2; justify-self: start; padding: 8px 12px; }
  html { scroll-padding-top: 100px; }
}

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