/* Homepage hero: editorial intro + "Born on this day" book feature. */
.gk-hero {
  --gk-ink: #111317;
  --gk-muted: #6b7078;
  --gk-faint: #9aa0a8;
  --gk-line: #e7e8ea;
  /* The site's own typeface (style.css). */
  --gk-serif: "Merriweather", Georgia, serif;
  --gk-sans: "Merriweather", Georgia, serif;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 40px 0 28px;
  color: var(--gk-ink);
  font-family: var(--gk-sans);
}

@media (min-width: 993px) {
  .gk-hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 56px;
    padding: 56px 0 36px;
  }
}

/* ---------- Intro ---------- */
.gk-hero__brand {
  margin: 0 0 6px;
  font-family: var(--gk-serif);
  font-style: italic;
  font-size: clamp(2.8rem, 6.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gk-ink);
}

.gk-hero__title {
  margin: 18px 0 10px;
  font-family: var(--gk-serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gk-ink);
}

.gk-hero__lede {
  max-width: 54ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--gk-muted);
}

.gk-hero__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.gk-hero__chips-label {
  margin-right: 4px;
  font-size: 0.85rem;
  color: var(--gk-faint);
}

.gk-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--gk-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  color: #33363b;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.gk-chip:hover,
.gk-chip:focus-visible {
  border-color: #c9ccd1;
  background: #f6f6f7;
  transform: translateY(-1px);
}

/* ---------- Born on this day ---------- */
.gk-bday {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

@media (min-width: 601px) {
  .gk-bday {
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
    gap: 44px;
  }
}

/* The book: a real 3D object (front, back, spine, page block, top, bottom).
   Layers, outside in:
     .gk-book         sizing + perspective
     .gk-book__float  idle sway (CSS animation)
     .gk-book__obj    resting angle + spin between people + pointer tilt (JS vars) */
.gk-book {
  --gk-tone: #e8692a;
  --gk-tone-2: #f39a5c;
  --bw: 240px;            /* cover width */
  --bh: calc(var(--bw) * 1.48);
  --bd: 30px;             /* thickness */
  position: relative;
  display: block;
  width: var(--bw);
  height: var(--bh);
  margin: 0 auto 40px;
  perspective: 1600px;
  perspective-origin: 50% 40%;
  text-decoration: none;
}

@media (max-width: 600px) {
  .gk-book {
    --bw: 190px;
    --bd: 24px;
  }
}

.gk-book--D { --gk-tone: #2556c4; --gk-tone-2: #5f8ef0; }
.gk-book--R { --gk-tone: #e0522b; --gk-tone-2: #f3925a; }
.gk-book--I { --gk-tone: #6b4fc6; --gk-tone-2: #9b85ea; }

.gk-book__stage,
.gk-book__float,
.gk-book__obj {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.gk-book__float {
  animation: gk-sway 7s ease-in-out infinite;
}

@keyframes gk-sway {
  0%, 100% { transform: translateY(0) rotateY(-5deg) rotateZ(-0.4deg); }
  50%      { transform: translateY(-8px) rotateY(6deg) rotateZ(0.4deg); }
}

.gk-book__obj {
  --spin: 0deg;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform:
    rotateX(calc(6deg + var(--tilt-x)))
    rotateY(calc(28deg + var(--spin) + var(--tilt-y)));
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.25, 1);
}

.gk-book.is-tracking .gk-book__obj {
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gk-book__face {
  position: absolute;
  backface-visibility: hidden;
}

/* Front cover */
.gk-book__front {
  inset: 0;
  overflow: hidden;
  border-radius: 2px 5px 5px 2px;
  background: var(--gk-tone);
  transform: translateZ(calc(var(--bd) / 2));
  box-shadow: inset 4px 0 6px -3px rgba(0, 0, 0, 0.35);
}

/* Hinge crease near the spine, like a real hardcover. */
.gk-book__front::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  z-index: 3;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.18));
}

.gk-book__back {
  inset: 0;
  border-radius: 5px 2px 2px 5px;
  background: linear-gradient(160deg, var(--gk-tone), var(--gk-tone-2));
  transform: rotateY(180deg) translateZ(calc(var(--bd) / 2));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 22px;
}

.gk-book__back-mark {
  font-family: var(--gk-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.45);
}

/* Spine (left edge) */
.gk-book__spine {
  top: 0;
  left: calc(50% - var(--bd) / 2);
  width: var(--bd);
  height: 100%;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0.08) 45%, rgba(0, 0, 0, 0.22)),
    var(--gk-tone);
  transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2));
  overflow: hidden;
}

.gk-book__spine-text {
  position: absolute;
  top: 14px;
  left: 50%;
  writing-mode: vertical-rl;
  transform: translateX(-50%);
  max-height: calc(100% - 28px);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--gk-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
}

/* Page block (right edge) */
.gk-book__pages {
  top: 4px;
  bottom: 4px;
  left: calc(50% - var(--bd) / 2);
  width: calc(var(--bd) - 2px);
  background:
    repeating-linear-gradient(90deg, #f4f1ea 0 1px, #dcd7cc 1px 2px),
    #efebe2;
  transform: rotateY(90deg) translateZ(calc(var(--bw) / 2 - 3px));
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.18);
}

.gk-book__top,
.gk-book__bottom {
  left: 2px;
  width: calc(var(--bw) - 6px);
  height: calc(var(--bd) - 2px);
  top: calc(50% - var(--bd) / 2);
  background:
    repeating-linear-gradient(0deg, #f4f1ea 0 1px, #dcd7cc 1px 2px),
    #efebe2;
}

.gk-book__top {
  transform: rotateX(90deg) translateZ(calc(var(--bh) / 2 - 3px));
}

.gk-book__bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--bh) / 2 - 3px));
}

/* Floor shadow breathes with the sway. */
.gk-book__floor {
  position: absolute;
  left: 4%;
  right: -10%;
  bottom: -34px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.28), transparent);
  filter: blur(7px);
  animation: gk-floor 7s ease-in-out infinite;
}

@keyframes gk-floor {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(0.88); opacity: 0.75; }
}

/* Duotone portrait: grayscale photo multiplied over the party tone. */
.gk-book__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(1) contrast(1.1) brightness(1.05);
  mix-blend-mode: multiply;
}

.gk-book__initials {
  position: absolute;
  inset: 0 0 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gk-serif);
  font-style: italic;
  font-size: 6rem;
  color: rgba(255, 255, 255, 0.85);
}

.gk-book__initials[hidden],
.gk-book__img[hidden] {
  display: none;
}

.gk-book__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, var(--gk-tone-2) 88%);
  opacity: 0.95;
}

/* Light sheen that slides across the cover as the book turns. */
.gk-book__gloss {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 45%, transparent 60%);
  background-size: 250% 100%;
  background-position: 100% 0;
  transition: background-position 1.15s cubic-bezier(0.65, 0, 0.25, 1);
  pointer-events: none;
}

.gk-book.is-spinning .gk-book__gloss {
  background-position: 0 0;
}

.gk-book__label {
  position: absolute;
  left: 20px;
  right: 14px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #17110d;
}

.gk-book__kicker {
  font-size: 11px;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

.gk-book__title {
  font-family: var(--gk-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Panel */
.gk-bday__panel {
  min-width: 0;
}

/* Every text slot below has a fixed height (one line, or exactly three for
   the blurb), so switching people swaps content without resizing the panel. */
.gk-bday__eyebrow,
.gk-bday__name,
.gk-bday__meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gk-bday__eyebrow {
  margin: 0 0 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  height: 1.4em;
  color: var(--gk-muted);
}

.gk-bday__name {
  margin: 0 0 6px;
  font-family: var(--gk-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  line-height: 1.25;
  height: 1.25em;
}

.gk-bday__name a {
  color: var(--gk-ink);
  text-decoration: none;
}

.gk-bday__meta {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  height: 1.4em;
  color: var(--gk-faint);
}

.gk-bday__blurb {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--gk-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 5.1em; /* exactly 3 lines at line-height 1.7 */
}

.gk-bday__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: #33363b;
  text-decoration: none;
}

.gk-bday__more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.gk-bday__more:hover svg {
  transform: translateX(3px);
}

/* Swap animation */
.gk-bday__eyebrow,
.gk-bday__name,
.gk-bday__meta,
.gk-bday__blurb,
.gk-bday__more {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gk-bday.is-swapping .gk-bday__eyebrow,
.gk-bday.is-swapping .gk-bday__name,
.gk-bday.is-swapping .gk-bday__meta,
.gk-bday.is-swapping .gk-bday__blurb,
.gk-bday.is-swapping .gk-bday__more {
  opacity: 0;
  transform: translateY(4px);
}


/* Numbered list */
.gk-bday__list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--gk-line);
}

.gk-bday__item {
  position: relative;
  margin: 0;
  border-bottom: 1px solid var(--gk-line);
  list-style: none;
}

.gk-bday__link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 2px;
  font-size: 0.85rem;
  color: var(--gk-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.gk-bday__num {
  width: 18px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--gk-faint);
}

.gk-bday__who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gk-bday__chev {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.gk-bday__link:hover,
.gk-bday__link:focus-visible,
.gk-bday__item.is-active .gk-bday__link {
  color: var(--gk-ink);
}

.gk-bday__item.is-active .gk-bday__num {
  color: var(--gk-ink);
}

.gk-bday__item.is-active .gk-bday__chev,
.gk-bday__link:hover .gk-bday__chev {
  opacity: 1;
  transform: none;
}

/* Progress bar under the active row */
.gk-bday__bar {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1.5px;
  width: 0;
  background: var(--gk-ink);
}

.gk-bday__item.is-active .gk-bday__bar {
  animation: gk-progress 7s linear forwards;
}

.gk-bday.is-paused .gk-bday__bar {
  animation-play-state: paused;
}

@keyframes gk-progress {
  from { width: 0; }
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gk-bday *,
  .gk-book * {
    transition: none !important;
  }
  .gk-book__float,
  .gk-book__floor {
    animation: none;
  }
  .gk-bday__item.is-active .gk-bday__bar {
    animation: none;
    width: 100%;
  }
}
