@font-face {
  font-family: "The Seasons";
  src: url("../Font/Fontspring-DEMO-theseasons-lt.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Font/Fontspring-DEMO-theseasons-ltit.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Font/Fontspring-DEMO-theseasons-reg.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Font/Fontspring-DEMO-theseasons-it.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Font/Fontspring-DEMO-theseasons-bd.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Font/Fontspring-DEMO-theseasons-bdit.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --void: #050505;
  --font: "The Seasons", Didot, "Bodoni MT", serif;
  --rail: 6.5rem;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100svh;
  background: var(--void);
  color: var(--ink);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

.book-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  touch-action: none;
}

.book-stage.is-flip-prev {
  transform: scaleX(-1);
}

.book-stage.is-flip-prev .page-sheet img,
.book-stage.is-flip-prev .cover-video,
.book-stage.is-flip-prev .cover-shade,
.book-stage.is-flip-prev .topbar,
.book-stage.is-flip-prev .cover-title,
.book-stage.is-flip-prev .contact {
  transform: scaleX(-1);
}

.page,
.stf__wrapper,
.stf__block,
.stf__item {
  width: 100%;
  height: 100%;
}

.page {
  overflow: hidden;
  background: #000;
}

.page-cover {
  position: relative;
}

.cover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.2) brightness(0.42);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.2) 28%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: calc(1.35rem + var(--safe-t)) calc(var(--rail) + 0.35rem) 1.3rem;
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-bottom: 1px solid #fff;
}

.topbar span:first-child {
  justify-self: start;
}

.topbar span:nth-child(2) {
  justify-self: center;
  white-space: nowrap;
}

.topbar span:last-child {
  justify-self: end;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-title {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: min(92%, 1100px);
  text-align: center;
  font-weight: 700;
  font-size: clamp(2.2rem, 6.4vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cover-title span {
  display: block;
}

.cover-title .amp {
  font-family: Didot, "Bodoni MT", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.contact {
  position: absolute;
  z-index: 4;
  top: calc(4.15rem + 100px + var(--safe-t));
  left: calc(var(--rail) + 0.35rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.65em;
  font-size: clamp(1.25rem, 2.15vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.contact-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12em;
}

.contact a,
.contact span {
  color: #fff;
}

.contact a {
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
  pointer-events: auto;
  cursor: pointer;
}

.contact .sym,
.book-status .sym {
  font-family: "Courier New", Courier, ui-monospace, monospace;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.page-sheet {
  position: relative;
  background: #000;
}

.page-sheet img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.flip-side {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 50;
  width: calc(var(--rail) + var(--safe-l));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  color: #fff;
  cursor: pointer;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.flip-prev {
  left: 0;
  padding-left: calc(1.5rem + var(--safe-l));
  padding-right: 0.85rem;
  align-items: flex-end;
}

.flip-next {
  right: 0;
  width: calc(var(--rail) + var(--safe-r));
  padding-right: calc(1.5rem + var(--safe-r));
  padding-left: 0.85rem;
  align-items: flex-start;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}

.flip-side:hover,
.flip-side:focus-visible {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0));
}

.flip-next:hover,
.flip-next:focus-visible {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0));
}

.flip-side:disabled {
  opacity: 0.28;
  cursor: default;
}

.flip-arrow {
  font-size: 2.8rem;
  line-height: 0.7;
  font-weight: 300;
}

.flip-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.book-status {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + var(--safe-b));
  z-index: 40;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  pointer-events: none;
  white-space: nowrap;
}

.stf__item {
  overflow: hidden;
  background: #000;
}

@media (max-width: 820px) {
  :root {
    --rail: 4.4rem;
  }

  .flip-prev {
    padding-left: calc(0.9rem + var(--safe-l));
  }

  .flip-next {
    padding-right: calc(0.9rem + var(--safe-r));
  }

  .flip-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.18em;
    font-size: 0.55rem;
  }

  .flip-arrow {
    font-size: 2.2rem;
  }

  .topbar {
    padding: calc(0.85rem + var(--safe-t)) calc(var(--rail) + 0.15rem) 0.85rem;
    font-size: clamp(0.58rem, 2.8vw, 0.82rem);
    letter-spacing: 0.1em;
    gap: 0.25rem;
  }

  .cover-title {
    font-size: clamp(1.45rem, 9.5vw, 2.5rem);
    width: 78%;
    letter-spacing: 0.04em;
  }

  .contact {
    top: calc(3.2rem + 100px + var(--safe-t));
    left: calc(var(--rail) + 0.15rem);
    right: calc(var(--rail) + 0.15rem);
    gap: 1.35em;
    font-size: clamp(0.9rem, 3.6vw, 1.15rem);
    letter-spacing: 0.1em;
    overflow-wrap: anywhere;
  }

  .book-status {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    bottom: calc(0.7rem + var(--safe-b));
  }
}

@media (max-width: 480px) {
  .flip-label {
    display: none;
  }

  .topbar span:last-child {
    max-width: 38vw;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .topbar {
    padding: calc(0.4rem + var(--safe-t)) 3.2rem 0.4rem;
  }

  .cover-title {
    font-size: clamp(1.2rem, 7vh, 2rem);
  }

  .book-status {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .flip-side {
    min-height: 44px;
  }
}
