:root {
  --color-bg: #040404;
  --color-text: #dfd2bf;
  --color-text-soft: rgba(223, 210, 191, 0.82);
  --color-text-dim: rgba(223, 210, 191, 0.58);
  --color-gold: #b79262;
  --color-gold-soft: rgba(183, 146, 98, 0.38);
  --color-button-bg: rgba(8, 8, 8, 0.2);
  --color-button-border: rgba(183, 146, 98, 0.5);
  --hero-padding: clamp(2rem, 3vw, 3rem);
  --hero-bg-position: center center;
  --content-max-width: 1360px;
  --panel-side-padding: clamp(1.25rem, 3vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

img,
picture,
video,
svg {
  max-width: 100%;
}

img,
picture,
video {
  display: block;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Cormorant Garamond", serif;
}

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--hero-padding);
  overflow: hidden;
  isolation: isolate;
  background: #050505;
}

.hero__scene,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__scene {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.06)),
    url("./assets/images/hero-room-v1.png");
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.06)),
    image-set(
      url("./assets/images/hero-room-v1.webp") type("image/webp"),
      url("./assets/images/hero-room-v1.png") type("image/png")
    );
  background-position: var(--hero-bg-position);
  background-repeat: no-repeat;
  background-size: cover;
}

.hero__fire,
.hero__dog-head {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero__fire {
  inset: auto;
  left: 50%;
  bottom: 23.5%;
  width: min(15rem, 24vw);
  height: min(11rem, 16vw);
  transform: translateX(-50%);
  filter: blur(0.1px);
  opacity: 0;
}

.hero--fire-active .hero__fire {
  opacity: 1;
}

.hero__firelight,
.hero__fireplace-flame-area {
  position: absolute;
  pointer-events: none;
}

.hero__firelight {
  left: 50%;
  bottom: -10%;
  width: 240%;
  height: 205%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 76%, rgba(255, 176, 84, 0.24) 0%, rgba(255, 134, 44, 0.14) 18%, rgba(255, 120, 36, 0.07) 34%, rgba(255, 120, 36, 0) 68%);
  filter: blur(26px);
  mix-blend-mode: screen;
  animation: firelightPulse 3.8s ease-in-out infinite alternate;
}

.hero__firelight::before,
.hero__firelight::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
  filter: blur(22px);
  mix-blend-mode: screen;
  animation: firelightPulseSoft 4.6s ease-in-out infinite alternate;
}

.hero__firelight::before {
  left: -4%;
  bottom: 8%;
  width: 54%;
  height: 36%;
  background: radial-gradient(circle at 60% 50%, rgba(255, 172, 80, 0.22), rgba(255, 172, 80, 0));
}

.hero__firelight::after {
  right: 2%;
  bottom: 14%;
  width: 36%;
  height: 28%;
  background: radial-gradient(circle at 40% 50%, rgba(255, 168, 78, 0.18), rgba(255, 168, 78, 0));
  animation-duration: 3.1s;
}

.hero__fireplace-flame-area {
  left: 50%;
  bottom: 4%;
  width: 58%;
  height: 82%;
  overflow: hidden;
  transform: translateX(-50%);
}

.hero__fire-glow,
.hero__fire-flame {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform-origin: center bottom;
}

.hero__fire-glow {
  width: 112%;
  height: 112%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 88%, rgba(255, 180, 84, 0.3) 0%, rgba(255, 118, 38, 0.2) 22%, rgba(255, 102, 26, 0.08) 40%, rgba(255, 102, 26, 0) 76%);
  filter: blur(18px);
  animation: fireGlowPulse 3.4s ease-in-out infinite alternate;
}

.hero__fire-flame {
  border-radius: 56% 56% 32% 32%;
  mix-blend-mode: screen;
}

.hero__fire-flame--back {
  width: 44%;
  height: 74%;
  transform: translateX(-57%) skewX(-5deg);
  background:
    radial-gradient(circle at 50% 84%, rgba(255, 206, 132, 0.66) 0%, rgba(255, 144, 52, 0.54) 24%, rgba(255, 86, 20, 0.24) 58%, rgba(255, 86, 20, 0) 100%);
  filter: blur(8px);
  animation: fireFlameBack 3.3s ease-in-out infinite alternate;
}

.hero__fire-flame--front {
  width: 34%;
  height: 94%;
  transform: translateX(-44%);
  background:
    radial-gradient(circle at 50% 82%, rgba(255, 243, 202, 0.92) 0%, rgba(255, 186, 82, 0.86) 18%, rgba(255, 108, 24, 0.3) 58%, rgba(255, 108, 24, 0) 100%);
  filter: blur(4px);
  animation: fireFlameFront 2.4s ease-in-out infinite alternate;
}

.hero__fire-flame--core {
  width: 19%;
  height: 58%;
  transform: translateX(-10%);
  background:
    radial-gradient(circle at 50% 84%, rgba(255, 249, 228, 0.96) 0%, rgba(255, 218, 146, 0.9) 20%, rgba(255, 159, 54, 0.32) 58%, rgba(255, 159, 54, 0) 100%);
  filter: blur(3px);
  animation: fireFlameCore 1.9s ease-in-out infinite alternate;
}

.hero__spark-pool {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__spark {
  position: absolute;
  left: var(--spark-left, 50%);
  bottom: var(--spark-bottom, 16%);
  width: var(--spark-size, 0.38rem);
  height: var(--spark-size, 0.38rem);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 245, 216, 0.95), rgba(255, 174, 74, 0.54) 54%, rgba(255, 128, 30, 0) 100%);
  filter: blur(1px);
  transform: translate3d(0, 0, 0) scale(0.7);
}

.hero__spark--active {
  animation: sparkFloat var(--spark-duration, 1.7s) ease-out forwards;
}

.hero__dog-head {
  opacity: 0;
  background-image: url("./assets/images/hero-room-v1.png");
  background-image: image-set(
    url("./assets/images/hero-room-v1.webp") type("image/webp"),
    url("./assets/images/hero-room-v1.png") type("image/png")
  );
  background-position: var(--hero-bg-position);
  background-repeat: no-repeat;
  background-size: cover;
  clip-path: ellipse(8.6% 12.4% at 34.5% 77.2%);
  transform-origin: 33% 80%;
  will-change: transform, opacity;
}

.hero__dog-head.is-howling {
  animation: dogHeadHowl 7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero__overlay {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 47%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.12) 52%, rgba(0, 0, 0, 0.48) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0.12) 18%, rgba(0, 0, 0, 0.08) 68%, rgba(0, 0, 0, 0.62) 100%);
}

.hero__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 14%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.28) 14%, rgba(0, 0, 0, 0) 28%);
}

@keyframes fireGlowPulse {
  0% {
    opacity: 0.46;
    transform: translateX(-50%) scale(0.98);
  }
  100% {
    opacity: 0.62;
    transform: translateX(-50%) scale(1.02);
  }
}

@keyframes firelightPulse {
  0% {
    opacity: 0.16;
    transform: translateX(-50%) scale(0.985);
  }
  38% {
    opacity: 0.22;
    transform: translateX(-50%) scale(1.015);
  }
  100% {
    opacity: 0.27;
    transform: translateX(-50%) scale(1.03);
  }
}

@keyframes firelightPulseSoft {
  0% {
    opacity: 0.08;
  }
  100% {
    opacity: 0.2;
  }
}

@keyframes fireFlameBack {
  0% {
    transform: translateX(-57%) translateY(0) scale(0.98, 0.92) rotate(-4deg);
    opacity: 0.56;
  }
  34% {
    transform: translateX(-53%) translateY(-0.28rem) scale(1.03, 1.04) rotate(-1deg);
    opacity: 0.72;
  }
  68% {
    transform: translateX(-61%) translateY(-0.12rem) scale(0.96, 1.02) rotate(2deg);
    opacity: 0.62;
  }
  100% {
    transform: translateX(-56%) translateY(-0.06rem) scale(1, 0.98) rotate(-2deg);
    opacity: 0.66;
  }
}

@keyframes fireFlameFront {
  0% {
    transform: translateX(-44%) translateY(0) scale(0.96, 0.94) rotate(-2deg);
    opacity: 0.76;
  }
  35% {
    transform: translateX(-39%) translateY(-0.42rem) scale(1.04, 1.08) rotate(2deg);
    opacity: 0.98;
  }
  70% {
    transform: translateX(-47%) translateY(-0.14rem) scale(0.98, 0.98) rotate(-1deg);
    opacity: 0.86;
  }
  100% {
    transform: translateX(-42%) translateY(-0.06rem) scale(1.01, 1.03) rotate(1deg);
    opacity: 0.82;
  }
}

@keyframes fireFlameCore {
  0% {
    transform: translateX(-10%) translateY(0) scale(0.9, 0.9) rotate(-1deg);
    opacity: 0.7;
  }
  50% {
    transform: translateX(-7%) translateY(-0.3rem) scale(1.08, 1.12) rotate(1deg);
    opacity: 0.96;
  }
  100% {
    transform: translateX(-11%) translateY(-0.08rem) scale(0.98, 1) rotate(-1deg);
    opacity: 0.82;
  }
}

@keyframes sparkFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.72);
  }
  14% {
    opacity: 0.82;
    transform: translate3d(calc(var(--spark-drift-x, 0rem) * 0.24), calc(var(--spark-rise, -2.4rem) * 0.18), 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--spark-drift-x, 0.8rem), var(--spark-rise, -2.4rem), 0) scale(0.54);
  }
}

@keyframes dogHeadHowl {
  0% {
    opacity: 0;
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  35% {
    opacity: 0.96;
    transform: rotate(-3.4deg) translate3d(0, -6px, 0);
  }
  55% {
    opacity: 0.96;
    transform: rotate(-3.6deg) translate3d(0, -6px, 0);
  }
  100% {
    opacity: 0;
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__dog-head.is-howling {
    animation-duration: 2.2s;
  }

  @keyframes dogHeadHowl {
    0% {
      opacity: 0;
      transform: rotate(0deg) translate3d(0, 0, 0);
    }
    40% {
      opacity: 0.7;
      transform: rotate(-1deg) translate3d(0, -2px, 0);
    }
    100% {
      opacity: 0;
      transform: rotate(0deg) translate3d(0, 0, 0);
    }
  }
}

.hero__countdown,
.hero__atmosphere-button {
  position: relative;
  z-index: 3;
}

.hero__countdown {
  position: absolute;
  top: clamp(2rem, 5.6vh, 4.25rem);
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0.42rem;
  width: min(21rem, calc(100% - 8rem));
  max-width: 100%;
  transform: translateX(-50%);
  text-align: center;
}

.hero__countdown-label,
.hero__tagline {
  margin: 0;
  color: var(--color-text-soft);
}

.hero__countdown-label {
  color: var(--color-text);
  font-family: "Forum", serif;
  font-size: clamp(3rem, 4.8vw, 4.65rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 0.9;
}

.hero__timer {
  margin: 0;
  color: var(--color-text);
  font-family: "Forum", serif;
  font-size: clamp(3rem, 5.2vw, 4.85rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.9;
  will-change: opacity, filter;
}

.hero__tagline {
  color: var(--color-text-soft);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  letter-spacing: 0.26em;
  line-height: 1.4;
  text-transform: uppercase;
  text-indent: 0.22em;
}

.hero__tagline--countdown {
  margin-top: 1.4rem;
}

.hero__atmosphere-button {
  position: absolute;
  top: clamp(2rem, 3.2vw, 3rem);
  left: clamp(2rem, 3.2vw, 3rem);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.85rem;
  max-width: 15rem;
  padding: 0.68rem 1.2rem;
  border: 1px solid var(--color-button-border);
  border-radius: 0;
  background: var(--color-button-bg);
  color: var(--color-gold);
  font: 400 0.92rem/1 "Forum", serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.hero__atmosphere-button::before {
  content: "▷";
  flex: none;
  font-size: 0.88rem;
  line-height: 1;
}

.hero__atmosphere-button:focus-visible {
  outline: 1px solid rgba(220, 183, 128, 0.62);
  outline-offset: 3px;
}

.about-panel {
  background:
    linear-gradient(180deg, rgba(9, 9, 9, 0.96), rgba(7, 7, 7, 1)),
    linear-gradient(90deg, rgba(183, 146, 98, 0.03), rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 82%, rgba(183, 146, 98, 0.03));
}

.about-panel__inner {
  display: grid;
  grid-template-columns: 18% 32% 50%;
  gap: clamp(1.5rem, 2.6vw, 3.25rem);
  align-items: center;
  max-width: var(--content-max-width);
  min-height: 320px;
  margin: 0 auto;
  padding: clamp(2rem, 3vw, 3rem) var(--panel-side-padding);
}

.about-panel__book {
  margin-inline: auto;
}

.book-mockup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, clamp(20rem, 36vw, 40.625rem));
  overflow: visible;
}

.book-mockup img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.about-panel__kicker {
  margin: 0 0 1rem;
  color: var(--color-gold);
  font-family: "Forum", serif;
  font-size: clamp(1.35rem, 1.6vw, 1.55rem);
  letter-spacing: 0.2em;
}

.about-panel__text {
  margin: 0;
  max-width: 25rem;
  color: #bab0a2;
  font-size: clamp(0.94rem, 1.02vw, 1rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.about-panel__text + .about-panel__text {
  margin-top: 0.95rem;
}

.about-panel__text--muted {
  color: var(--color-text-dim);
}

.about-panel__text--narrow {
  max-width: 18rem;
}

.about-panel__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--color-gold);
  font-family: "Forum", serif;
  font-size: 1.08rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.about-panel__link::after {
  content: "→";
}

.about-panel__link:hover {
  color: #d2b17c;
}

.reader-open {
  overflow: hidden;
}

.reader-open .hero,
.reader-open .about-panel {
  pointer-events: none;
}

.reader-open .hero__overlay {
  background:
    radial-gradient(circle at 50% 47%, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.2) 52%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.28) 18%, rgba(0, 0, 0, 0.18) 68%, rgba(0, 0, 0, 0.72) 100%);
}

.reader-open .book-mockup {
  filter: brightness(1.06) drop-shadow(0 0 0.9rem rgba(209, 168, 108, 0.16));
}

.reader-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 320ms ease,
    visibility 320ms ease;
}

.reader-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.reader-layer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
}

.reader-dialog {
  position: relative;
  z-index: 1;
  width: min(78vw, 74rem);
  height: min(88vh, 58rem);
  max-width: 100%;
  transform-origin: 18% 58%;
  transform: perspective(1200px) rotateY(-14deg) scale(0.92);
  opacity: 0;
  transition:
    transform 860ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 480ms ease;
}

.reader-layer.is-open .reader-dialog {
  transform: perspective(1200px) rotateY(0deg) scale(1);
  opacity: 1;
}

.reader-layer.is-closing .reader-dialog {
  transform: perspective(1200px) rotateY(-10deg) scale(0.95);
  opacity: 0;
}

.reader-dialog__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  z-index: 2;
  border: 0;
  background: transparent;
  color: rgba(69, 53, 36, 0.82);
  font: 400 2rem/1 "Forum", serif;
  cursor: pointer;
}

.reader-dialog__close:focus-visible,
.reader-dialog__nav:focus-visible {
  outline: 1px solid rgba(128, 93, 55, 0.85);
  outline-offset: 4px;
}

.reader-dialog__sheet {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  padding: clamp(2.8rem, 4vw, 4rem) clamp(1.6rem, 4vw, 4rem) clamp(1.4rem, 3vw, 2rem);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 249, 236, 0.92) 0%, rgba(244, 235, 214, 0.96) 58%, rgba(219, 200, 169, 0.98) 100%),
    linear-gradient(180deg, rgba(244, 236, 220, 0.98), rgba(227, 210, 177, 0.98));
  box-shadow:
    0 1.8rem 4rem rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(118, 91, 55, 0.08),
    inset 0 -2rem 2.4rem rgba(137, 110, 70, 0.08),
    inset 0 2rem 2.4rem rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.reader-dialog__sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 50%, rgba(127, 94, 53, 0.08), rgba(127, 94, 53, 0) 20%),
    radial-gradient(circle at 84% 50%, rgba(127, 94, 53, 0.08), rgba(127, 94, 53, 0) 20%);
  pointer-events: none;
}

.reader-dialog__header,
.reader-dialog__footer {
  position: relative;
  z-index: 1;
}

.reader-dialog__header {
  text-align: center;
}

.reader-dialog__label,
.reader-dialog__title {
  margin: 0;
  color: #5f432a;
}

.reader-dialog__label {
  font: 400 clamp(1rem, 1vw, 1.1rem) / 1 "Forum", serif;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.reader-dialog__title {
  margin-top: 0.7rem;
  font: 400 clamp(2rem, 3.4vw, 3rem) / 1 "Forum", serif;
  letter-spacing: 0.1em;
}

.reader-dialog__rule {
  width: min(13rem, 28%);
  height: 1px;
  margin: 1.2rem auto 0;
  background: linear-gradient(90deg, rgba(95, 67, 42, 0), rgba(95, 67, 42, 0.7), rgba(95, 67, 42, 0));
}

.reader-dialog__body {
  position: relative;
  z-index: 1;
  min-height: 0;
  margin-top: 1.5rem;
}

.reader-dialog__page {
  height: 100%;
  overflow-y: auto;
  padding: 0 clamp(0.4rem, 1.2vw, 0.8rem);
  color: #453625;
  font-size: clamp(1.05rem, 1.1vw, 1.24rem);
  line-height: 1.8;
}

.reader-dialog__page.is-transitioning {
  animation: readerPageTurn 320ms ease;
}

.reader-dialog__page p {
  max-width: 72ch;
  margin: 0 auto 1rem;
}

.reader-dialog__page p:first-child {
  margin-top: 0;
}

.reader-dialog__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.reader-dialog__nav {
  border: 0;
  background: transparent;
  color: #6a4b30;
  font: 400 clamp(1rem, 1vw, 1.08rem) / 1 "Forum", serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    opacity 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.reader-dialog__nav:hover {
  color: #8a6137;
  transform: translateY(-1px);
}

.reader-dialog__nav[hidden] {
  visibility: hidden;
}

.reader-dialog__nav--prev {
  justify-self: start;
}

.reader-dialog__nav--next {
  justify-self: end;
}

.reader-dialog__meta {
  margin: 0;
  color: rgba(69, 54, 37, 0.76);
  font: 500 0.95rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.08em;
}

@keyframes readerPageTurn {
  0% {
    opacity: 0.22;
    transform: translateX(1.4rem);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-panel__format-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.about-panel__format-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  width: clamp(9.2rem, 11.2vw, 10.8rem);
  min-height: 4.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(183, 146, 98, 0.4);
  background: rgba(12, 12, 12, 0.24);
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.about-panel__format-card:hover {
  border-color: rgba(210, 177, 124, 0.72);
  background: rgba(17, 17, 17, 0.32);
  transform: translateY(-1px);
}

.about-panel__format-card:focus-visible {
  outline: 1px solid rgba(220, 183, 128, 0.78);
  outline-offset: 3px;
  border-color: rgba(210, 177, 124, 0.72);
  background: rgba(17, 17, 17, 0.32);
}

.about-panel__format-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(183, 146, 98, 0.42);
  color: var(--color-gold);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.about-panel__format-meta {
  display: grid;
  gap: 0.08rem;
}

.about-panel__format-name {
  color: var(--color-text);
  font-family: "Forum", serif;
  font-size: 1.38rem;
  letter-spacing: 0.14em;
}

.about-panel__format-action {
  color: var(--color-gold);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.author-section {
  position: relative;
  background:
    radial-gradient(circle at 24% 42%, rgba(183, 146, 98, 0.08), rgba(183, 146, 98, 0) 26%),
    radial-gradient(circle at 84% 28%, rgba(183, 146, 98, 0.05), rgba(183, 146, 98, 0) 24%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.98), rgba(6, 6, 6, 1));
}

.author-section__inner {
  display: grid;
  grid-template-columns: minmax(20rem, 38%) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--panel-side-padding);
}

.author-section__media,
.author-section__content > [data-reveal] {
  opacity: 0;
  transform: translateY(1.2rem);
  transition:
    opacity 680ms ease,
    transform 680ms ease;
}

.author-section__media.is-visible,
.author-section__content > [data-reveal].is-visible,
.author-section__bio.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.author-section__media {
  transition-delay: 0ms;
}

.author-section__kicker {
  margin: 0 0 0.9rem;
  color: var(--color-gold);
  font-family: "Forum", serif;
  font-size: clamp(1.1rem, 1.3vw, 1.28rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition-delay: 120ms;
}

.author-section__name {
  margin: 0;
  color: var(--color-text);
  font-family: "Forum", serif;
  font-size: clamp(2.3rem, 3.4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  transition-delay: 220ms;
}

.author-section__bio {
  margin-top: 1.4rem;
  color: #c4b8a6;
  font-size: clamp(1rem, 1.1vw, 1.14rem);
  line-height: 1.78;
  max-width: 68ch;
  transition-delay: 320ms;
  text-wrap: pretty;
}

.author-section__bio p {
  margin: 0 0 1rem;
}

.author-section__bio p:last-child {
  margin-bottom: 0;
}

.author-section__bio strong {
  color: #ded0bd;
  font-weight: 600;
}

.author-section__portrait {
  position: relative;
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 1.6rem 3rem rgba(0, 0, 0, 0.28),
    0 0.6rem 1.2rem rgba(0, 0, 0, 0.16);
}

.author-section__portrait::before,
.author-section__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.author-section__portrait::before {
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.08), rgba(8, 8, 8, 0.24)),
    radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.author-section__portrait::after {
  background:
    linear-gradient(90deg, rgba(205, 175, 119, 0.08), rgba(205, 175, 119, 0) 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 240, 212, 0.1), rgba(255, 240, 212, 0) 22%);
  mix-blend-mode: screen;
}

.author-section__portrait img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02) brightness(0.88);
}

.author-section__socials[hidden] {
  display: none;
}

.site-footer {
  position: relative;
  padding: clamp(3.2rem, 6vw, 5rem) 0 clamp(2.2rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 18% 0%, rgba(183, 146, 98, 0.05), rgba(183, 146, 98, 0) 22%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.94), rgba(5, 5, 5, 1));
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(92%, var(--content-max-width));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    rgba(183, 146, 98, 0),
    rgba(183, 146, 98, 0.28) 16%,
    rgba(183, 146, 98, 0.42) 50%,
    rgba(183, 146, 98, 0.28) 84%,
    rgba(183, 146, 98, 0)
  );
}

.site-footer__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--panel-side-padding);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
}

.site-footer__column {
  min-width: 0;
}

.site-footer__title,
.site-footer__line,
.site-footer__copyright {
  margin: 0;
}

.site-footer__title {
  color: var(--color-text);
  font-family: "Forum", serif;
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  font-weight: 400;
  letter-spacing: 0.14em;
}

.site-footer__title--contacts {
  margin-bottom: 1rem;
}

.site-footer__contact-heading-link {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}

.site-footer__contact-heading-link:hover {
  color: #ece0cd;
}

.site-footer__contact-heading-link:focus-visible {
  outline: 1px solid rgba(220, 183, 128, 0.72);
  outline-offset: 4px;
  color: #ece0cd;
}

.site-footer__line {
  margin-top: 0.5rem;
  color: var(--color-text-soft);
  font-size: clamp(0.98rem, 1.08vw, 1.08rem);
  line-height: 1.55;
}

.site-footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__contact-item[hidden] {
  display: none;
}

.site-footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text-soft);
  text-decoration: none;
  transition:
    color 200ms ease,
    opacity 200ms ease;
}

.site-footer__contact-link:hover {
  color: var(--color-text);
}

.site-footer__contact-link:hover .site-footer__icon,
.site-footer__contact-link:focus-visible .site-footer__icon {
  opacity: 0.96;
}

.site-footer__contact-link:focus-visible {
  outline: 1px solid rgba(220, 183, 128, 0.72);
  outline-offset: 4px;
  color: var(--color-text);
}

.site-footer__icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  opacity: 0.72;
  transition: opacity 200ms ease;
}

.site-footer__icon svg {
  width: 100%;
  height: 100%;
}

.site-footer__contact-label {
  font-family: "Forum", serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.site-footer__copyright {
  max-width: 72rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  color: rgba(223, 210, 191, 0.54);
  font-size: 0.78rem;
  line-height: 1.75;
  text-wrap: pretty;
}

@media (min-width: 1600px) {
  :root {
    --hero-bg-position: center 44%;
  }

  .hero__countdown {
    top: clamp(2.4rem, 5.2vh, 4.6rem);
  }

  .about-panel__inner {
    grid-template-columns: minmax(15rem, 18%) minmax(23rem, 31%) minmax(32rem, 1fr);
  }

  .about-panel__book {
    width: min(100%, 40.625rem);
  }
}

@media (max-width: 1440px) {
  .about-panel__inner {
    grid-template-columns: 18% 34% 48%;
  }
}

@media (max-width: 1024px) {
  :root {
    --hero-bg-position: 52% center;
  }

  .hero {
    min-height: 100svh;
    padding: 1.5rem;
  }

  .hero__countdown {
    top: 2rem;
    width: min(18rem, calc(100% - 5rem));
  }

  .hero__timer {
    font-size: clamp(2.65rem, 5vw, 4rem);
  }

  .hero__fire {
    bottom: 24.2%;
    width: min(13rem, 26vw);
    height: min(9rem, 18vw);
  }

  .about-panel__inner {
    grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr);
    gap: 1.5rem 1.8rem;
    min-height: auto;
    align-items: start;
  }

  .about-panel__book {
    width: min(100%, 24rem);
  }

  .about-panel__copy {
    max-width: 30rem;
  }

  .about-panel__downloads {
    grid-column: 1 / -1;
  }

  .reader-dialog {
    width: min(86vw, 56rem);
    height: min(90vh, 54rem);
  }

  .author-section__inner {
    grid-template-columns: minmax(16rem, 34%) minmax(0, 1fr);
    gap: 2rem;
  }

  .site-footer__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }
}

@media (max-width: 768px) {
  :root {
    --hero-bg-position: 54% center;
  }

  .hero__atmosphere-button {
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.62rem 0.95rem;
    font-size: 0.76rem;
  }

  .hero__countdown {
    top: 4.8rem;
    width: min(16rem, calc(100% - 3rem));
  }

  .hero__countdown-label {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hero__timer {
    font-size: clamp(2.25rem, 8vw, 3.2rem);
  }

  .hero__tagline {
    max-width: 15rem;
    font-size: 0.88rem;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }

  .hero__tagline--countdown {
    margin-top: 1rem;
  }

  .hero__dog-head {
    clip-path: ellipse(13% 11% at 31% 78%);
    transform-origin: 31% 80%;
  }

  .hero__fire {
    bottom: 22.8%;
    width: 10.5rem;
    height: 7rem;
  }

  .about-panel__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.25rem;
    padding: 1.65rem 1rem 1.85rem;
  }

  .about-panel__book {
    width: min(84vw, 19.5rem);
  }

  .about-panel__copy,
  .about-panel__downloads {
    width: min(34rem, 100%);
    text-align: center;
  }

  .about-panel__kicker {
    margin-bottom: 0.8rem;
  }

  .about-panel__text,
  .about-panel__text--narrow {
    max-width: none;
  }

  .about-panel__link {
    justify-content: center;
  }

  .about-panel__format-grid {
    justify-content: center;
    width: min(100%, 34rem);
  }

  .reader-layer {
    padding: 0.85rem;
  }

  .reader-dialog {
    width: min(94vw, 40rem);
    height: min(92vh, 52rem);
  }

  .reader-dialog__sheet {
    padding: 2.8rem 1.2rem 1.2rem;
    border-radius: 0.8rem;
  }

  .reader-dialog__body {
    margin-top: 1.15rem;
  }

  .reader-dialog__page {
    font-size: 1rem;
    line-height: 1.72;
    padding: 0 0.2rem;
  }

  .reader-dialog__footer {
    gap: 0.75rem;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .reader-dialog__nav--prev,
  .reader-dialog__nav--next {
    justify-self: center;
  }

  .author-section__inner {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2.1rem 1rem 2.25rem;
  }

  .author-section__media {
    width: min(32rem, 100%);
    margin-inline: auto;
  }

  .author-section__content {
    width: min(40rem, 100%);
    text-align: center;
  }

  .author-section__bio {
    margin-inline: auto;
  }

  .site-footer {
    padding: 2.35rem 0 1.85rem;
  }

  .site-footer__top {
    gap: 1.5rem;
  }

  .site-footer__column--contacts {
    width: 100%;
  }

  .site-footer__contacts {
    gap: 0.8rem 1.1rem;
  }

  .site-footer__copyright {
    font-size: 0.76rem;
    line-height: 1.68;
  }
}

@media (max-width: 560px) {
  :root {
    --hero-bg-position: 56% center;
  }

  .hero {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.85rem;
  }

  .hero__atmosphere-button {
    top: 0.9rem;
    left: 0.9rem;
    max-width: 10.8rem;
    min-height: 2.45rem;
    padding: 0.55rem 0.78rem;
    font-size: 0.66rem;
    letter-spacing: 0.13em;
  }

  .hero__countdown {
    top: 4rem;
    width: min(13.6rem, calc(100% - 1.7rem));
    gap: 0.24rem;
  }

  .hero__countdown-label {
    font-size: clamp(2.05rem, 11vw, 2.7rem);
    letter-spacing: 0.1em;
  }

  .hero__timer {
    font-size: clamp(2rem, 10.5vw, 2.8rem);
    letter-spacing: 0.06em;
  }

  .hero__tagline {
    max-width: 13rem;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    line-height: 1.28;
    text-indent: 0.14em;
  }

  .hero__tagline--countdown {
    margin-top: 0.8rem;
  }

  .hero__fire {
    bottom: 21.8%;
    width: 8.9rem;
    height: 6rem;
  }

  .hero__spark {
    filter: blur(0.9px);
  }

  .hero__dog-head {
    clip-path: ellipse(16% 10.2% at 29.8% 79.4%);
    transform-origin: 30% 80%;
  }

  .about-panel__inner {
    padding: 1.35rem 0.9rem 1.7rem;
  }

  .about-panel__book {
    width: min(84vw, 17rem);
  }

  .about-panel__kicker {
    font-size: 1.12rem;
    letter-spacing: 0.16em;
  }

  .about-panel__text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .about-panel__format-grid {
    gap: 0.75rem;
  }

  .about-panel__format-card {
    min-height: 4.2rem;
    padding: 0.8rem 0.88rem;
  }

  .about-panel__format-name {
    font-size: 1.14rem;
  }

  .reader-layer {
    padding: 0.55rem;
  }

  .reader-dialog {
    width: min(96vw, 28rem);
    height: min(94vh, 44rem);
  }

  .reader-dialog__close {
    top: 0.65rem;
    right: 0.75rem;
    font-size: 1.7rem;
  }

  .reader-dialog__sheet {
    padding: 2.5rem 0.95rem 1rem;
  }

  .reader-dialog__label {
    font-size: 0.86rem;
    letter-spacing: 0.24em;
  }

  .reader-dialog__title {
    margin-top: 0.55rem;
    font-size: 1.7rem;
  }

  .reader-dialog__page {
    font-size: 0.96rem;
    line-height: 1.68;
  }

  .reader-dialog__page p {
    margin-bottom: 0.85rem;
  }

  .reader-dialog__nav {
    font-size: 0.96rem;
  }

  .reader-dialog__meta {
    font-size: 0.86rem;
  }

  .author-section__inner {
    padding: 1.85rem 0.9rem 2rem;
  }

  .author-section__name {
    font-size: 2rem;
  }

  .author-section__bio {
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .site-footer__title {
    font-size: 1rem;
  }

  .site-footer__line {
    font-size: 0.94rem;
  }

  .site-footer__contact-label {
    font-size: 0.94rem;
  }

  .site-footer__copyright {
    font-size: 0.75rem;
    line-height: 1.72;
  }
}

@media (max-width: 390px) {
  :root {
    --hero-bg-position: 57% center;
  }

  .hero {
    padding: 1rem;
  }

  .hero__atmosphere-button {
    top: 1rem;
    left: 1rem;
    max-width: 11.5rem;
    min-height: 2.55rem;
    padding: 0.58rem 0.85rem;
    font-size: 0.7rem;
  }

  .hero__countdown {
    top: 4.1rem;
    width: calc(100% - 2rem);
  }

  .hero__countdown-label {
    font-size: 1.95rem;
  }

  .hero__timer {
    font-size: 1.92rem;
  }

  .hero__tagline {
    max-width: 11.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .hero__fire {
    bottom: 21.2%;
    width: 8.8rem;
    height: 5.8rem;
  }

  .about-panel__book {
    width: min(82vw, 15.5rem);
  }

  .about-panel__text {
    font-size: 0.86rem;
    line-height: 1.48;
  }

  .about-panel__format-grid {
    width: 100%;
    flex-direction: column;
  }

  .about-panel__format-card {
    width: 100%;
  }

  .reader-dialog {
    width: calc(100vw - 0.7rem);
    height: calc(100vh - 1rem);
  }

  .reader-dialog__sheet {
    padding: 2.35rem 0.8rem 0.9rem;
  }

  .reader-dialog__page {
    font-size: 0.92rem;
    line-height: 1.66;
  }

  .author-section__portrait {
    border-radius: 0.9rem;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0.85rem 1rem 0.9rem;
  }

  .hero__atmosphere-button {
    top: 0.8rem;
    left: 1rem;
    max-width: 11.5rem;
    min-height: 2.3rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  .hero__countdown {
    top: 1rem;
    width: min(23rem, calc(100% - 13rem));
    gap: 0.16rem;
  }

  .hero__countdown-label {
    font-size: clamp(2rem, 4.2vw, 2.9rem);
    letter-spacing: 0.08em;
  }

  .hero__timer {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    letter-spacing: 0.05em;
  }

  .hero__tagline {
    max-width: 22rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    line-height: 1.18;
    text-indent: 0.1em;
  }

  .hero__tagline--countdown {
    margin-top: 0.55rem;
  }

  .hero__fire {
    bottom: 17.5%;
    width: min(8.6rem, 16vw);
    height: min(5.6rem, 11vw);
  }

  .hero__dog-head {
    clip-path: ellipse(10.2% 13% at 66% 78%);
    transform-origin: 66% 80%;
  }

  .reader-layer {
    padding: 0.45rem;
  }

  .reader-dialog {
    width: min(95vw, 56rem);
    height: min(96vh, 31rem);
  }

  .reader-dialog__sheet {
    padding: 2.15rem 1rem 0.9rem;
  }

  .reader-dialog__body {
    margin-top: 0.85rem;
  }

  .reader-dialog__page {
    font-size: 0.92rem;
    line-height: 1.56;
  }

  .reader-dialog__footer {
    grid-template-columns: 1fr auto 1fr;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .reader-dialog__nav {
    font-size: 0.88rem;
  }

  .reader-dialog__meta {
    font-size: 0.8rem;
  }
}
