:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-short: 220ms;
  --motion-long: 680ms;
}

html { scroll-padding-top: 96px; }
body { isolation: isolate; position: relative; }
.brand-rule { height: 1px; opacity: .65; }
.paper-warm-light {
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 12% 0%, #eadfc966, transparent 78%),
    radial-gradient(ellipse 45% 60% at 100% 85%, #d9e5f429, transparent 75%);
  animation: none;
}
.paper-grain { opacity: .018; }
.topbar {
  transition: background-color 380ms ease, border-color 380ms ease, box-shadow 380ms ease;
}
.topbar.is-scrolled {
  background: color-mix(in oklab, var(--color-bg) 90%, transparent);
  box-shadow: 0 4px 18px -16px #29313d38;
}
.bar-nav .nav-item::after { height: 1px; }
.progress { opacity: .65; }

.rise {
  animation-name: quiet-rise;
  animation-duration: 850ms;
  animation-timing-function: var(--motion-ease);
}
@keyframes quiet-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.hero-title::before {
  width: 1px;
  animation-duration: 1200ms;
  background: linear-gradient(180deg, #8ba9d0, #d49a8d88 75%, transparent);
}
.hero .ink-hl {
  animation: ink-arrive 1100ms var(--motion-ease) 550ms both;
}
@keyframes ink-arrive {
  from { background-size: 0% 35%; }
  to { background-size: 100% 35%; }
}
.btn-shine {
  min-height: 44px;
  border-color: #6f8db333;
  box-shadow: inset 0 1px 0 #ffffff55, 0 2px 3px #23364d08;
  transition: background-color var(--motion-short) ease, transform var(--motion-short) var(--motion-ease), box-shadow 320ms ease;
}
.btn-shine::before, .btn-shine::after { content: none; }
.btn-shine:hover {
  transform: translateY(-2px);
  background-color: #91afd5;
  box-shadow: inset 0 1px 0 #ffffff66, 0 7px 15px -8px #23364d55;
}
.btn-shine:active {
  transform: translateY(1px) scale(.985);
  background-color: var(--color-brand-hover);
  box-shadow: inset 0 1px 3px #23364d18;
  transition-duration: 90ms;
}

.blk, .feat { border-top-color: var(--color-line); }
.blk::before, .feat::before { content: none; }
.feat { padding-top: 64px; padding-bottom: 64px; }
.feat-eyebrow { border: 0; color: var(--color-faint); letter-spacing: .04em; }
.ink-hl {
  background-image: linear-gradient(110deg, color-mix(in oklab, var(--hl-color, #e0c889) 34%, transparent), color-mix(in oklab, var(--hl-color, #e0c889) 24%, transparent));
  background-position: 0 89%;
  border-radius: 0;
}
.motion-ready .feat-text > *,
.motion-ready .feat-media,
.motion-ready .split-head,
.motion-ready .tiers {
  transition: opacity var(--motion-long) ease, translate var(--motion-long) var(--motion-ease);
}
.motion-ready .feat-text:not([data-entered]) > * { opacity: 0; translate: 0 7px; }
.motion-ready .feat-text[data-entered] > .h2 { transition-delay: 60ms; }
.motion-ready .feat-text[data-entered] > .body { transition-delay: 130ms; }
.motion-ready .feat-media:not([data-entered]) { opacity: 0; translate: 0 10px; }
.motion-ready .feat-media[data-entered] { transition-delay: 130ms; }
.motion-ready .split-head:not([data-entered]),
.motion-ready .tiers:not([data-entered]) { opacity: 0; }
.motion-ready .feat-text .ink-hl {
  background-size: 0% 35%;
  transition: background-size 1000ms var(--motion-ease) 360ms;
}
.motion-ready .feat-text[data-entered] .ink-hl { background-size: 100% 35%; }

.feat-media {
  padding: 12px;
  border-radius: 13px;
  border: 1px solid color-mix(in oklab, var(--edge) 35%, #e4e1dd);
  background: linear-gradient(145deg, color-mix(in oklab, var(--tint) 45%, #faf8f4), #faf8f4 85%);
  box-shadow: inset 0 1px 0 #ffffffb3, 0 3px 5px -3px #2a201612, 0 20px 35px -25px #2a201630;
  isolation: isolate;
}
.feat-media.is-carousel { padding-bottom: 42px; }
.feat-media .frame {
  border-color: #29313d1c;
  border-radius: 7px;
  box-shadow: 0 1px 2px #29313d06, 0 6px 12px -10px #29313d30;
  transition: box-shadow 380ms ease;
}
.feat-media:hover .frame { transform: none; }
.feat-media .stage { z-index: 1; transition: transform 420ms var(--motion-ease); }
.feat-media.is-carousel::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 38px;
  height: 16px;
  border: 1px solid #29313d18;
  border-radius: 0 0 7px 7px;
  background: #fffdfa;
  transition: transform 420ms var(--motion-ease);
  z-index: 0;
}
.feat-media.is-carousel .track { transition: transform 560ms var(--motion-ease); }
.carousel-btn {
  width: 36px;
  height: 36px;
  border-color: #b7b5b0;
  background: #fffdf8f5;
  box-shadow: 0 2px 6px #29313d0d;
  transition: opacity 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.carousel-btn[data-dir="-1"] { left: 5px; }
.carousel-btn[data-dir="1"] { left: calc(100% - 5px); }
.carousel-btn:hover {
  background: var(--color-text);
  border-color: var(--color-text);
  color: white;
  box-shadow: 0 3px 10px #29313d24;
}
.carousel-count { bottom: 7px; gap: 0; height: 28px; }
.carousel-dot {
  width: 26px;
  height: 28px;
  border-radius: 3px;
  background: transparent;
  display: grid;
  place-items: center;
}
.carousel-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 5px;
  background: #29313d45;
  transition: width 320ms var(--motion-ease), background-color 220ms ease;
}
.carousel-dot:hover, .carousel-dot.is-on { background: transparent; transform: none; }
.carousel-dot:hover::before { background: #29313d80; }
.carousel-dot.is-on::before { width: 17px; background: var(--color-link); }
.shot-open {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  background: white;
  cursor: zoom-in;
}
.shot-open:focus-visible { outline-offset: -4px; border-radius: 7px; }
.shot-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 5px;
  background: #29313de8;
  color: white;
  font: 12px/1.3 var(--font-editorial);
  opacity: 0;
  translate: 0 4px;
  transition: opacity 220ms ease, translate 320ms var(--motion-ease);
  pointer-events: none;
}
.shot-hint svg { width: 13px; height: 13px; }
.shot-open:focus-visible .shot-hint { opacity: 1; translate: 0 0; }

.tier {
  border-top-width: 2px;
  box-shadow: 0 1px 3px #29313d05;
  background: linear-gradient(180deg, #fffdfa, #fcfaf7);
  transition: border-color 320ms ease, box-shadow 380ms ease, transform 380ms var(--motion-ease), opacity 250ms ease;
}
.tier::after { content: none; }
.tier:hover { transform: none; box-shadow: 0 1px 3px #29313d05; border-color: var(--color-line-strong); border-top-color: var(--tier-edge); }
.tier:hover .tier-mark { transform: none; }
.tier.is-active { border-color: var(--tier-ink); box-shadow: 0 0 0 1px var(--tier-edge); }
.tiers:has(.tier.is-active) .tier:not(.is-active) { opacity: .86; }
.book-ruler {
  padding: 7px 4px;
  background: #faf8f2d9;
  border-color: var(--color-line);
  box-shadow: none;
}
.book-ruler a.is-on { transform: none; }

.shot-dialog {
  width: min(1240px, calc(100vw - 64px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid #ffffff70;
  border-radius: 12px;
  background: #f8f5f0;
  color: var(--color-text);
  box-shadow: 0 24px 90px #11172055;
}
.shot-dialog[open] { animation: focus-open 300ms var(--motion-ease); }
.shot-dialog::backdrop { background: #222b35b3; backdrop-filter: blur(8px); }
@keyframes focus-open { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.shot-dialog-bar, .shot-dialog-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; }
.shot-dialog-bar { border-bottom: 1px solid var(--color-line); }
.shot-dialog-title { font-size: 14px; }
.shot-dialog button {
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text);
  font: 13px/1.5 var(--font-editorial);
  cursor: pointer;
  transition: background-color 180ms ease;
}
.shot-dialog button:hover { background: #eae5dc; }
.shot-close { white-space: nowrap; }
.shot-close span { margin-left: 8px; font: 20px/1 sans-serif; }
.shot-dialog-image { display: grid; place-items: center; min-height: 120px; background: white; }
.shot-dialog-image img { width: auto; max-width: 100%; max-height: calc(100dvh - 166px); object-fit: contain; }
.shot-dialog-bottom { border-top: 1px solid var(--color-line); color: var(--color-muted); font: 12px/1 var(--font-mono); }
body.shot-is-open { overflow: hidden; }

@media (hover: hover) and (pointer: fine) {
  .feat-media:hover .stage { transform: translateY(-3px); }
  .feat-media.is-carousel:hover::before { transform: translateY(-1px); }
  .feat-media:hover .frame { box-shadow: 0 2px 4px #29313d09, 0 10px 18px -12px #29313d33; }
  .carousel-btn { opacity: .65; }
  .feat-media:hover .carousel-btn, .feat-media:focus-within .carousel-btn { opacity: 1; }
  .shot-open:hover .shot-hint { opacity: 1; translate: 0 0; }
  .tier:hover { transform: translateY(-2px); border-color: var(--tier-edge); box-shadow: 0 10px 22px -16px #29313d35; }
}
@media (max-width: 1319px) {
  .book-ruler { display: none; }
}
@media (max-width: 1151px) { .motion-ready .feat-media[data-entered] { transition-delay: 0ms; } }
@media (max-width: 1000px) {
  .bar-nav { display: none; }
  .menu-toggle { display: grid; }
  .bar-inner { grid-template-columns: 1fr auto; }
}
@media (max-width: 767px) {
  .hero-sub { font-size: clamp(20px, 5.4vw, 24px); line-height: 1.5; text-wrap: balance; }
  .feat { padding-top: 42px; padding-bottom: 42px; }
  .feat-media { padding: 8px; }
  .feat-media.is-carousel { padding-bottom: 38px; }
  .feat-media.is-carousel::before { bottom: 34px; left: 16px; right: 16px; }
  .carousel-btn { width: 34px; height: 34px; }
  .carousel-count { bottom: 5px; }
  .shot-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); }
  .shot-dialog-bar, .shot-dialog-bottom { padding: 8px; gap: 8px; }
  .shot-dialog-title { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .hero-title::before { opacity: 1; transform: none; }
  .motion-ready .feat-text > *, .motion-ready .feat-media, .motion-ready .split-head, .motion-ready .tiers { opacity: 1; translate: none; }
  .hero .ink-hl, .motion-ready .feat-text .ink-hl { background-size: 100% 35%; }
  .feat-media:hover .stage, .feat-media.is-carousel:hover::before, .tier:hover, .btn-shine:hover, .btn-shine:active { transform: none; }
  .shot-hint { translate: none; }
}
