:root {

  --bg-primary: #0a0c10;
  --bg-secondary: #12161f;
  --bg-card: rgba(22, 27, 38, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);

  --text-main: #f0f4f8;
  --text-muted: #94a3b8;

  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #8b5cf6 100%);


  --white: #ffffff;
  --gold-main: #d5b386;
  --gold-bright: #f6d776;
  --gold-grad-start: #e8d69e;
  --gold-grad-end: #f3e9d5;
  --gray-main: #a0a5af;
  --gray-dark: #8b92a5;
  --gray-light: #cdcdcd;
  --gray-lighter: #e0e1e3;
  --bg-dark-news: #080a0e;


  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-btn: 'Volkhov', serif;
  --font-news: 'Open Sans', sans-serif;


  --btn-text-color: rgb(12, 18, 17);
  --btn-text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.4);
  --btn-dark-text-color: rgb(200, 188, 164);
  --text-gold: var(--gold-main);
  --text-paragraph: var(--gray-light);
  --content-width: 1360px;


  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}


*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}


img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}



::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-main) 0%, var(--gold-grad-start) 100%);
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-bright);
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

p {
  color: var(--gray-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

strong,
b {
  color: var(--gold-main);
  font-weight: 600;
}

.white-link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}

.white-link:hover {
  color: var(--gold-bright);
}


.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  box-shadow: 0 0 0 transparent;
  transition: background 0.45s ease, box-shadow 0.45s ease;
}


.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: url('../assets/separate.png') repeat-x center bottom;
  background-size: auto 100%;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/bgs/footer-bg.png') no-repeat center bottom;
  background-size: cover;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.site-header.is-sticky::before,
.site-header.is-unsticky::before {
  opacity: 0.85;
  transition: opacity 0.45s ease;
}


.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(5, 7, 10, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.95);
  animation: slideDownNavbar 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: background 0.45s ease, box-shadow 0.45s ease;
}


.site-header.is-unsticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(5, 7, 10, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.95);
  animation: slideUpNavbar 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: background 0.45s ease, box-shadow 0.45s ease;
}

@keyframes slideDownNavbar {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: none;
  }
}

@keyframes slideUpNavbar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100%);
  }
}

.site-header.is-sticky::after,
.site-header.is-unsticky::after {
  opacity: 1;
  transition: opacity 0.45s ease;
}

.header-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: padding 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}


.site-header.is-sticky .header-inner,
.site-header.is-unsticky .header-inner {
  padding: 0.4rem 60px;
  align-items: center;
}

.logo-link {
  display: inline-block;
  z-index: 1001;
}

.logo-img {
  height: 202px;
  width: auto;
  filter: brightness(1) contrast(1) drop-shadow(0 4px 15px rgba(0, 0, 0, 0.85));
  transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-sticky .logo-img,
.site-header.is-unsticky .logo-img {
  height: 48px;
}

.logo-link:hover .logo-img {
  transform: scale(1.018) translateY(-1px);
  filter: brightness(1.15) contrast(1.06) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.9));
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle.active {
  opacity: 1 !important;
}

.hamburger-bar {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--white);
  margin: 6px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-nav-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background-color: var(--gold-main);
}

.mobile-nav-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background-color: var(--gold-main);
}

.main-nav {
  margin-top: 1.5rem;
}

.site-header.is-sticky .main-nav,
.site-header.is-unsticky .main-nav {
  margin-top: 0;
}


.mobile-nav-bottom-sep,
.mobile-nav-socials {
  display: none;
}

.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-item {
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-family: var(--font-news), sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0px 1px 5px rgba(0, 0, 0, 1), 0px 1px 0px rgba(0, 0, 0, 1);
  padding: 0.6rem 1.4rem;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.active-nav {
  background: url('../assets/active-nav-bar.png') no-repeat center center;
  background-size: 100% 100%;
  color: var(--white);
}

.nav-item:hover:not(.active-nav) {
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(246, 215, 118, 0.5);
  transform: translateY(-2px);
}



.hero-section {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1094;
  min-height: 820px;
  display: block;
  overflow: hidden;
}

.hero-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  background-color: var(--bg-primary);
}

.hero-bg-media,
.bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  pointer-events: none;
}

.hero-bg-img,
.bg-img {
  z-index: 1;
}


.hero-bg-video,
.bg-video {
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.bg-video.is-loaded {
  opacity: 1 !important;
}



.community-widget {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.widget-title {
  font-family: "Volkhov", serif;
  font-size: 16px;
  color: rgb(233, 227, 214);
  line-height: 1.2;
  text-align: center;
  text-shadow: 0px 1px 5px rgba(0, 0, 0, 1), 0px 1px 0px rgba(0, 0, 0, 1);
  margin-bottom: 0.2rem;
}

.widget-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  filter: brightness(1) drop-shadow(0 6px 15px rgba(0, 0, 0, 0.7));
}

.widget-btn img {
  display: block;
}

.widget-btn-text {
  position: absolute;
  left: 28%;
  right: 2%;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: var(--font-btn), serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--btn-text-color);
  text-shadow: var(--btn-text-shadow);
  text-transform: uppercase;
  letter-spacing: normal;
  pointer-events: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.widget-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8));
}

.widget-btn:hover .widget-btn-text {
  color: rgb(0, 0, 0);
}


.hero-mobile-logo {
  display: none;
}

.hero-timer-container {
  position: absolute;
  top: 52.1%;
  left: 0;
  width: 100%;
  padding: 0 1.5rem;
  box-sizing: border-box;
  z-index: 10;
  text-align: center;
}


.timer-separator {
  display: none;
}

.timer-box {
  position: relative;
  display: inline-block;
  padding: 2.8rem 5rem 2.2rem 5rem;
  z-index: 1;
}

.timer-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/hero-timer-bg.png') no-repeat center center;
  background-size: 100% 100%;
  z-index: -1;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 97%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 97%);
}

.timer-heading {
  font-family: var(--font-btn), serif;
  font-size: 18px;
  font-weight: 400;
  color: rgb(255, 255, 255);
  line-height: 1.2;
  margin-bottom: 0.8rem;
  text-shadow: 0px 4px 9px rgba(0, 0, 0, 1), 0px 6px 9px rgba(0, 0, 0, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.timer-deco {
  color: rgb(255, 255, 255);
  font-weight: 400;
}

.timer-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-family: 'Cinzel', serif;
}

.time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 75px;
}

.time-val {
  font-size: 72px;
  font-weight: 700;
  line-height: 0.95;
  background: linear-gradient(180deg, var(--gold-grad-start) 0%, var(--gold-grad-end) 50%, var(--gold-bright) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold-grad-start);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 15px rgba(232, 214, 158, 0.25));
  display: inline-block;
  will-change: transform, filter, background-position;
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: gradientWave 3s ease infinite, pulseText 2s ease-in-out infinite;
}

@keyframes gradientWave {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@keyframes pulseText {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 15px rgba(232, 214, 158, 0.25));
  }

  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 25px rgba(232, 214, 158, 0.5));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 15px rgba(232, 214, 158, 0.25));
  }
}

.time-lbl {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-lighter);
  margin-top: 0.4rem;
  text-transform: lowercase;
  font-family: 'Cinzel', serif;
}

.time-sep {
  font-size: 64px;
  font-weight: 700;
  color: var(--gold-grad-start);
  line-height: 0.9;
  align-self: flex-start;
  padding-top: 0.2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}


.hero-action-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}


.btn-modular {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 2.4rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  box-sizing: border-box;
  filter: brightness(1) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.75));
}


.btn-bright:hover {
  transform: translateY(-2px);
  filter: brightness(1.1) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8));
}


.btn-bright:hover .btn-deco::before,
.btn-bright:hover .btn-deco::after {
  filter: brightness(0.82);
}


.btn-dark:hover {
  transform: translateY(-2px);
  filter: brightness(1) drop-shadow(0 12px 25px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 14px rgba(200, 188, 164, 0.3));
}


.btn-dark:hover .btn-text {
  color: rgb(245, 235, 215);
  text-shadow: 0px 2px 8px rgba(0, 0, 0, 1), 0px 0px 10px rgba(212, 175, 55, 0.45);
}

.btn-dark:hover .btn-deco::before,
.btn-dark:hover .btn-deco::after {
  filter: brightness(1.2);
}

.btn-modular:active {
  transform: translateY(-1px) scale(0.98);
}


.btn-bright {
  background: url('../assets/button-modular/button-bright-mid.png') repeat-x center;
}

.btn-dark {
  background: url('../assets/button-modular/button-dark-mid.png') repeat-x center;
}


.btn-modular::before,
.btn-modular::after {
  content: '';
  position: absolute;
  top: 0;
  height: 54px;
  pointer-events: none;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.btn-modular::before {
  left: 0;
}

.btn-modular::after {
  right: 0;
}

.btn-bright::before {
  width: 19px;
  background: url('../assets/button-modular/button-bright-left.png') no-repeat left center;
}

.btn-bright::after {
  width: 18px;
  background: url('../assets/button-modular/button-bright-right.png') no-repeat right center;
}

.btn-dark::before {
  width: 19px;
  background: url('../assets/button-modular/button-dark-left.png') no-repeat left center;
}

.btn-dark::after {
  width: 18px;
  background: url('../assets/button-modular/button-dark-right.png') no-repeat right center;
}


.btn-deco {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.btn-deco::before,
.btn-deco::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 93px;
  height: 51px;
  pointer-events: none;
  z-index: 2;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.btn-deco::before {
  left: 2px;
}

.btn-deco::after {
  right: 2px;
}

.btn-bright .btn-deco::before {
  background: url('../assets/button-modular/button-bright-corner.png') no-repeat center;
}

.btn-bright .btn-deco::after {
  background: url('../assets/button-modular/button-bright-corner-flip.png') no-repeat center;
}

.btn-dark .btn-deco::before {
  background: url('../assets/button-modular/button-dark-corner.png') no-repeat center;
}

.btn-dark .btn-deco::after {
  background: url('../assets/button-modular/button-dark-corner-flip.png') no-repeat center;
}


.btn-modular .btn-text {
  position: relative;
  z-index: 3;
  font-family: var(--font-btn), serif;
  font-size: 18px;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

.btn-bright .btn-text {
  color: var(--btn-text-color);
  text-shadow: var(--btn-text-shadow);
}

.btn-dark .btn-text {
  color: var(--btn-dark-text-color);
  text-shadow: 0px 2px 6px rgba(0, 0, 0, 1), 0px 1px 3px rgba(0, 0, 0, 0.95);
}



.news-section {
  position: relative;
  width: 100%;
  padding: 4rem 0 6rem 0;
  margin-top: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 10, 14, 0.4) 150px, var(--bg-dark-news) 300px, var(--bg-dark-news) 100%);
  overflow: visible;
  z-index: 20;
}

.news-bg-wrapper {
  position: absolute;
  top: -300px;
  left: 0;
  width: 100%;
  height: calc(100% + 300px);
  opacity: 1;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) calc(100% - 250px), transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) calc(100% - 250px), transparent 100%);
}

.news-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 5;
}


.news-content-col {
  position: relative;
  z-index: 10;
  margin-right: 0;
  min-width: 0;
  width: 100%;
}

.news-image-col {
  min-width: 0;
  width: 100%;
}

.section-subtitle,
.news-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-main);
  letter-spacing: 3px;
  display: block;
  margin-bottom: 0.5rem;
  text-shadow: 0px 2px 5px rgba(0, 0, 0, 1), 0px 0px 10px rgba(0, 0, 0, 0.8);
}

.section-title,
.news-title {
  font-family: 'Cinzel', serif;
  font-size: 52px;
  text-align: center;
  font-weight: 700;
  color: rgb(255, 255, 255);
  line-height: 1.2;
  letter-spacing: 1px;
  text-shadow: 0px 5px 15px rgba(0, 0, 0, 1), 0px 2px 5px rgba(0, 0, 0, 1), 0px 0px 30px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 10;
}

@media (max-width: 992px) {

  .section-title,
  .news-title {
    font-size: 42px;
  }
}

@media (max-width: 576px) {

  .section-title,
  .news-title {
    font-size: 34px;
  }
}


.news-page-hero .section-subtitle,
.article-hero .section-subtitle,
.downloads-hero .section-subtitle,
.about-page-wrapper .section-subtitle {
  font-family: 'Volkhov', serif;
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.news-page-hero .section-title,
.article-hero .section-title,
.downloads-hero .section-title,
.about-page-wrapper .section-title {
  background: linear-gradient(180deg, var(--gold-grad-start) 0%, var(--gold-grad-end) 50%, var(--gold-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;

  text-shadow: none;
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 1)) drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.8));
}

.news-title {
  /* Removed overlap styles requested by client */
  text-align: left;
}

.news-decoration {
  margin-bottom: 2.2rem;
}

.news-decoration img {
  height: 22px;
  width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 1)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.6));
}

.news-text p {
  font-family: var(--font-news), sans-serif;
  font-size: 16px;
  color: var(--gray-light);
  line-height: 1.5;
  text-align: left;
  margin-bottom: 1.6rem;
  text-shadow: none;
}

.gold-link {
  color: var(--gold-main);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.gold-link:hover {
  color: var(--gold-bright);
  text-decoration: underline;
  text-decoration-color: var(--gold-bright);
  text-underline-offset: 5px;
}

.news-footnote {
  font-size: 0.95rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 2rem;
  margin-bottom: 2.8rem;
}

.news-btn-wrapper {
  margin-top: 1rem;
}



.framed-card {
  position: relative;
  padding: 0;
  background: transparent;
  border-radius: 4px;
  box-shadow: none;
}

.framed-image-inner {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16 / 9;
  box-shadow: none;
}

.feature-img {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) brightness(0.95);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
}

.frame-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/big-img-frame.png') no-repeat center center;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 3;
}

.frame-bottom-deco {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.frame-bottom-deco img {
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}


.book-section {
  position: relative;
  width: 100%;
  padding: 8rem 4rem 10rem 4rem;
  margin-top: 0;
  background: transparent;
  overflow: visible;
  text-align: center;
  z-index: 30;
}

.book-bg-wrapper {
  position: absolute;
  top: -250px;
  left: 0;
  width: 100%;
  height: calc(100% + 250px);
  opacity: 1;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 250px, rgba(0, 0, 0, 1) calc(100% - 250px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 250px, rgba(0, 0, 0, 1) calc(100% - 250px), transparent 100%);
}


.dl-gold-frame-outer {
  max-width: 1100px;
  margin: 0 auto 3rem auto;
}

.dl-gold-frame {
  position: relative;
  background: rgba(12, 14, 18, 0.75);
  padding: 4.5rem;
}

@media (max-width: 992px) {
  .dl-gold-frame {
    padding: 3.5rem;
  }
}

@media (max-width: 768px) {
  .dl-gold-frame {
    padding: 2.5rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .dl-gold-frame {
    padding: 2rem 1rem;
  }
}

.gf-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 10;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.gf-tl {
  top: -2px;
  left: -2px;
  background-image: url('../assets/gold-frame/corner-top-left.png');
}

.gf-tr {
  top: -2px;
  right: -2px;
  background-image: url('../assets/gold-frame/corner-top-right.png');
}

.gf-bl {
  bottom: -2px;
  left: -2px;
  background-image: url('../assets/gold-frame/corner-bot-left.png');
}

.gf-br {
  bottom: -2px;
  right: -2px;
  background-image: url('../assets/gold-frame/corner-bot-right.png');
}

.gf-line {
  position: absolute;
  z-index: 5;
  background-repeat: repeat;
  pointer-events: none;
}

.gf-top {
  top: -2px;
  left: 28px;
  right: 28px;
  height: 7px;
  background-image: url('../assets/gold-frame/line-top.png');
  background-repeat: repeat-x;
}

.gf-bottom {
  bottom: -2px;
  left: 28px;
  right: 28px;
  height: 7px;
  background-image: url('../assets/gold-frame/line-bot.png');
  background-repeat: repeat-x;
}

.gf-left {
  top: 28px;
  bottom: 28px;
  left: -2px;
  width: 7px;
  background-image: url('../assets/gold-frame/line-left.png');
  background-repeat: repeat-y;
}

.gf-right {
  top: 28px;
  bottom: 28px;
  right: -2px;
  width: 7px;
  background-image: url('../assets/gold-frame/line-right.png');
  background-repeat: repeat-y;
}

.dl-frame-content {
  position: relative;
  z-index: 20;
}

.book-container {
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.section-header-center {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}



.section-decoration-center img {
  height: 20px;
  width: auto;
  max-width: 100%;
  opacity: 0.9;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 1)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.6));
}

.book-presentation {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.book-image {
  max-width: 100%;
  height: auto;
  display: block;
}

.book-pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.page-dots-container {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.page-dot {
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  background: url('../assets/page/no-bg.png') no-repeat center center;
  background-size: 100% 100%;
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.35;
}

.page-dot:hover {
  transform: scale(1.1);
  opacity: 0.7;
}

.dot-inner {
  display: block;
  width: 22px;
  height: 22px;
  background: url('../assets/page/dot-bg.png') no-repeat center center;
  background-size: 100% 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-dot.active {
  opacity: 1 !important;
}

.page-dot.active .dot-inner {
  opacity: 1 !important;
}

.page-dots-sep {
  width: 12px;
  height: 3px;
  opacity: 0.7;
}

.book-action {
  margin-top: 2rem;
  margin-bottom: 4.5rem;
  display: flex;
  justify-content: center;
}


@media (max-width: 1400px) {
  .logo-img {
    height: 165px;
  }

  .news-title {
    font-size: 38px;
    margin-right: -60px;
  }
}

@media (max-width: 1200px) {
  .header-inner {
    padding: 1.5rem 2rem;
  }

  .nav-list {
    gap: 1rem;
  }

  .logo-img {
    height: 135px;
  }


  .hero-timer-container {
    top: 40%;
  }

  .news-container {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .news-title {
    margin-right: 0;
    white-space: normal;
    font-size: 36px;
  }

  .community-widget {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    margin: 1.2rem 0 0 0;
    z-index: 20;
  }

  .widget-title {
    display: none;
  }

  .widget-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }

  .timer-separator {
    display: block;
    width: min(320px, 70%);
    height: 3px;
    margin: 1.8rem auto 0.5rem auto;
    background: url('../assets/separate.png') no-repeat center center;
    background-size: contain;
    opacity: 0.45;
  }
}

@media (max-width: 992px) {
  .mobile-nav-toggle {
    display: block;
  }


  .site-header,
  .site-header.is-sticky,
  .site-header.is-unsticky {
    background: transparent !important;
    box-shadow: none !important;
  }

  .site-header,
  .site-header.is-sticky,
  .site-header.sticky-clone {
    box-shadow: none !important;
  }

  .site-header::before,
  .site-header.is-sticky::before,
  .site-header.is-unsticky::before {
    transform: scaleY(-1);
    background-position: center center;
    background-size: cover;
    opacity: 0.95;
  }


  .site-header::after,
  .site-header.is-sticky::after,
  .site-header.is-unsticky::after {
    display: none !important;
  }


  .header-inner,
  .site-header.is-sticky .header-inner,
  .site-header.is-unsticky .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
  }


  .logo-img,
  .site-header.is-sticky .logo-img,
  .site-header.is-unsticky .logo-img {
    height: 55px;
  }


  .hero-mobile-logo {
    display: block;
    max-width: min(340px, 80%);
    height: auto;
    margin: 0 auto 1.2rem auto;
    filter: brightness(1) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.75));
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: default;
    pointer-events: auto;
  }

  .hero-mobile-logo:hover {
    transform: scale(1.02);
    filter: brightness(1.1) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.75));
  }

  .hero-timer-container {
    top: 21%;
  }


  .main-nav,
  .site-header.is-sticky .main-nav,
  .site-header.is-unsticky .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(8, 10, 14, 0.70);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: none;
    padding: 100px 1.5rem 2.5rem 1.5rem;
    margin-top: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .main-nav.nav-open,
  .site-header.is-sticky .main-nav.nav-open,
  .site-header.is-unsticky .main-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-bottom-sep {
    display: block;
    width: min(280px, 80%);
    height: 3px;
    background: url('../assets/separate.png') no-repeat center center;
    background-size: contain;
    opacity: 0.5;
    margin: 2rem auto;
    flex-shrink: 0;
  }

  .mobile-nav-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 1.8rem;
    align-items: center;
  }
}

@media (max-width: 768px) {

  .logo-img,
  .site-header.is-sticky .logo-img,
  .site-header.is-unsticky .logo-img {
    height: 50px;
  }

  .hero-mobile-logo {
    max-width: min(280px, 75%);
    margin-bottom: 1rem;
  }

  .hero-timer-container {
    top: 18%;
  }

  .timer-box {
    padding: 1.8rem 2rem;
  }

  .timer-clock {
    gap: 0.8rem;
  }

  .time-col {
    min-width: 60px;
  }

  .time-val {
    font-size: 52px;
  }

  .time-sep {
    font-size: 42px;
  }

  .hero-section {
    padding: 0 1.5rem 4rem 1.5rem;
  }

  .news-section {
    padding: 4rem 0 4rem 0;
  }

  .news-container {
    padding: 0 1.5rem;
  }

  .news-title {
    font-size: 30px;
  }
}

@media (max-width: 576px) {

  .logo-img,
  .site-header.is-sticky .logo-img,
  .site-header.is-unsticky .logo-img {
    height: 44px;
  }

  .hero-mobile-logo {
    max-width: min(230px, 70%);
    margin-bottom: 0.8rem;
  }

  .hero-timer-container {
    top: 15%;
  }

  .timer-box {
    padding: 1.4rem 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .timer-clock {
    gap: 0.35rem;
  }

  .time-col {
    min-width: 50px;
  }

  .widget-buttons {
    gap: 1rem;
  }

  .news-title {
    font-size: 26px;
  }
}


.site-footer {
  position: relative;
  width: 100%;
  margin-top: 0;
  background-color: transparent;
  color: var(--text-muted);
  overflow: visible;
  z-index: 40;
}

.footer-bg-wrapper {
  position: absolute;
  top: -220px;
  left: 0;
  width: 100%;
  height: calc(100% + 220px);
  opacity: 1;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 220px);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 220px);
}

.footer-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 4rem 1rem 4rem;
  position: relative;
  z-index: 5;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 4rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-logo-link {
  display: inline-block;
  cursor: pointer;
}

.footer-logo {
  height: 116px;
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.footer-logo-link:hover .footer-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 15px rgba(213, 179, 134, 0.4));
}

.footer-copyright {
  font-family: var(--font-news), sans-serif;
  font-size: 14px;
  color: var(--gray-main);
  line-height: 1.6;
}

.gold-text {
  color: var(--gold-main);
}


.footer-language {
  position: relative;
}

.lang-selector {
  position: relative;
  width: 220px;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.4rem;
  background: rgba(30, 30, 30, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  color: var(--gray-lighter);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: rgba(45, 45, 45, 0.45);
  border-color: rgba(255, 255, 255, 0.25);
}

.lang-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-name {
  flex-grow: 1;
  text-align: left;
  margin-left: 0.75rem;
}

.lang-arrow {
  transition: transform 0.3s ease;
  color: var(--gray-dark);
}

.lang-btn[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  margin-bottom: 0;
  background: rgba(25, 25, 25, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-radius: 0;
  list-style: none;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.25rem;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-main);
  transition: background 0.2s, color 0.2s;
}

.lang-option .lang-flag {
  margin-right: 0.75rem;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}


.footer-bottom {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1.5rem 0;
}

.footer-bottom-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-links a {
  color: var(--gray-main);
  text-decoration: none;
  font-family: var(--font-news), sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--gold-main);
}

.footer-dev img {
  height: 14px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.footer-dev a:hover img {
  opacity: 1 !important;
}


@media (max-width: 1300px) {
  .footer-main {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
    justify-content: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-copyright br {
    display: none;
  }

  .footer-bottom-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    justify-content: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }
}




.site-header.sticky-clone {
  animation: none !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease !important;
  transform: translateY(-100%);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 0 0 transparent !important;
}

.site-header.sticky-clone.is-visible {
  transform: translateY(0);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.95) !important;
}







@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideLeftFade {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleUpFade {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-on-load-header {
  animation: slideDownFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-on-load-socials {
  animation: slideLeftFade 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  opacity: 0;

}

.animate-on-load-timer {
  animation: scaleUpFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
  opacity: 0;
}




.news-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}


.news-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 30px;
  margin-bottom: 80px;
}

.news-card {
  position: relative;
  width: 100%;
  cursor: pointer;
}


.news-card.news-slide {
  opacity: 1;

  margin: 0;
  width: 100%;
}

.news-card .news-slide-image-wrapper {
  height: 250px;

}

@media (max-width: 1024px) {
  .news-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid-container {
    grid-template-columns: 1fr;
  }
}


.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

.pag-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s ease;
  display: flex;
}

.pag-btn:hover {
  transform: scale(1.2);
}

.pag-pages {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pag-page {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.pag-page:hover {
  transform: scale(1.1);
}

.pag-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.pag-num {
  position: relative;
  z-index: 2;
  font-family: var(--font-btn), serif;
  font-size: 14px;
  color: #fff;
}

.pag-page.active .pag-num {
  color: #000;
  font-weight: bold;
}

.pag-dots {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Book page-flip animation --- */
.book-stage {
  /* Page geometry, as % of the image box — tune per artwork.
     --book-spine/--page-* position the text block; the clip polygons trace
     the actual sloping paper edges (measured from the artwork) about 1%
     inside them, so the turning leaf covers the whole page without ever
     carrying edge artwork past the silhouette (reads as a gray ghost) */
  --book-spine: 49.3%;
  --page-top: 8.5%;
  --page-right: 10%;
  --page-bottom: 18.5%;
  --page-left: 11.5%;
  --clip-left-page: polygon(11.5% 10%, 16% 7.9%, 20% 7.7%, 25% 7.3%, 30% 6.3%, 35% 5.6%, 40% 5.3%, 44% 6.6%, 47% 7.5%, 49.3% 9.4%, 49.3% 83%, 11.5% 79.5%);
  --clip-right-page: polygon(49.3% 9.4%, 51% 8.4%, 55% 6.7%, 60% 6.3%, 65% 6.7%, 70% 7.2%, 75% 7.6%, 80% 8.3%, 85% 9.2%, 89.5% 9.8%, 89.5% 77%, 49.3% 83%);
  --flip-duration: 0.9s;
  position: relative;
  cursor: pointer;
}

/* Hover lifts the whole stage (image, page text and flip layer together);
   the glow stays on the image only - a filter on the stage would flatten
   the 3D flip while hovered */
.book-stage {
  transition: transform 0.35s ease;
}

.book-stage:hover,
.book-stage:focus-within {
  transform: scale(1.015);
}

.book-stage .book-image {
  transition: filter 0.35s ease;
}

.book-stage:hover .book-image,
.book-stage:focus-within .book-image {
  filter: brightness(1.08) drop-shadow(0 0 20px rgba(255, 215, 140, 0.35));
}

/* The flip uses temporary copies of the book artwork. Match the active
   page's hover tone so the paper does not flash back to its resting color. */
.book-stage:hover .flip-under > img:first-child,
.book-stage:hover .flip-face > img:first-child,
.book-stage:focus-within .flip-under > img:first-child,
.book-stage:focus-within .flip-face > img:first-child {
  filter: brightness(1.08);
}

.book-flip-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Perspective lives here, not on the stage: the leaf is a direct child so
     the 3D flip is unchanged, but the static page text no longer picks up an
     ancestor perspective the flip-face text lacks (their projections must be
     identical or the text snaps at the flip handoff).
     No mask here: Chromium refuses to paint image-masked 3D content */
  perspective: 3000px;
}

.book-flip-layer[hidden] {
  display: none;
}

.flip-under,
.flip-leaf,
.flip-face {
  position: absolute;
  inset: 0;
}

.flip-under img,
.flip-face img {
  display: block;
  width: 100%;
  height: 100%;
}

.flip-leaf {
  transform-style: preserve-3d;
  transform-origin: var(--book-spine) 50%;
  transform: rotateY(0deg);
}

.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-back {
  transform-origin: var(--book-spine) 50%;
  transform: rotateY(180deg);
}

/* No extra spine shading: the artwork already has it painted in, and a CSS
   overlay reads as a gray smudge that flashes on during every flip */

/* Forward: right leaf turns over to the left */
.book-flip-layer.flip-forward .flip-front,
.book-flip-layer.flip-forward .flip-under {
  clip-path: var(--clip-right-page);
}

.book-flip-layer.flip-forward .flip-back {
  clip-path: var(--clip-left-page);
}

.book-flip-layer.flip-forward.is-flipping .flip-leaf {
  animation: book-flip-forward var(--flip-duration) both;
}

/* Backward: left leaf turns over to the right */
.book-flip-layer.flip-backward .flip-front,
.book-flip-layer.flip-backward .flip-under {
  clip-path: var(--clip-left-page);
}

.book-flip-layer.flip-backward .flip-back {
  clip-path: var(--clip-right-page);
}

.book-flip-layer.flip-backward.is-flipping .flip-leaf {
  animation: book-flip-backward var(--flip-duration) both;
}

/* The scale dips mid-turn to cancel the perspective enlargement (which peaks
   at 90deg), then returns to exactly 1 so the landing page matches the static
   page pixel-for-pixel - no snap at the end of the animation */
@keyframes book-flip-forward {
  0% {
    transform: rotateY(0deg) scale(1);
    animation-timing-function: cubic-bezier(0.45, 0.05, 0.6, 0.6);
  }
  50% {
    transform: rotateY(-90deg) scale(0.955);
    animation-timing-function: cubic-bezier(0.4, 0.4, 0.25, 1);
  }
  100% {
    transform: rotateY(-180deg) scale(1);
  }
}

@keyframes book-flip-backward {
  0% {
    transform: rotateY(0deg) scale(1);
    animation-timing-function: cubic-bezier(0.45, 0.05, 0.6, 0.6);
  }
  50% {
    transform: rotateY(90deg) scale(0.955);
    animation-timing-function: cubic-bezier(0.4, 0.4, 0.25, 1);
  }
  100% {
    transform: rotateY(180deg) scale(1);
  }
}

/* Scroll-driven pages: while the book fills the viewport, each scroll gesture
   turns one page (handled in JS); past the first/last page the scroll releases */
.book-section {
  height: 100vh;
  height: 100svh;
  padding: 0;
}

.book-sticky {
  --book-header-offset: 65px;
  position: sticky;
  top: var(--book-header-offset);
  height: calc(100vh - var(--book-header-offset));
  height: calc(100svh - var(--book-header-offset));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
}

@media (max-width: 992px) {
  .book-sticky {
    --book-header-offset: 81px;
  }
}

@media (max-width: 768px) {
  .book-sticky {
    --book-header-offset: 76px;
  }
}

@media (max-width: 576px) {
  .book-sticky {
    --book-header-offset: 70px;
  }
}

.book-sticky .book-image {
  max-height: min(60vh, calc(100vh - var(--book-header-offset) - 16.25rem));
  max-height: min(60vh, calc(100svh - var(--book-header-offset) - 16.25rem));
  width: auto;
}

.book-stage {
  width: fit-content;
  margin: 0 auto;
}

/* Inside the viewport-height sticky the button doesn't need the large
   scroll-layout margins */
.book-sticky .book-action {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* HTML text rendered on the right page (the artwork only provides the frame
   and left-page art). --book-scale is set from JS so text scales with the render. */
.book-page-text,
.flip-page-text {
  position: absolute;
  /* Clean parchment area between the ornament bands of the render */
  left: calc(var(--book-spine) + 5%);
  right: calc(var(--page-right) + 7.5%);
  top: calc(var(--page-top) + 12.5%);
  bottom: calc(var(--page-bottom) + 18.5%);
  /* 2D rotation only: it follows the page's visible tilt but keeps these
     layers on the direct paint path. 3D transforms (perspective/rotateY)
     make Chromium composite them as textures, which shows faint vertical
     tile seams on the paper - do not reintroduce them here */
  transform: rotate(0.8deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: calc(var(--book-scale, 1) * 18px);
  text-align: center;
  color: #3d2b18;
  pointer-events: none;
  overflow: hidden;
  /* Ink sinks into the parchment texture instead of sitting on top of it */
  mix-blend-mode: multiply;
}

.book-page-text.is-hidden {
  visibility: hidden;
}

/* Left-page artwork overlay: sepia engravings on pure white, so multiply
   blending leaves only the ink on the parchment. The transform mirrors the
   left page's plane (its outer edge leans toward the viewer) */
img.book-page-image,
img.flip-page-image {
  /* img-qualified so this outranks the generic `.flip-face img` sizing */
  position: absolute;
  left: 16.5%;
  top: 13%;
  width: 27%;
  height: 57.5%;
  object-fit: contain;
  /* 2D rotation only - see the note on .book-page-text */
  transform: rotate(-0.8deg);
  mix-blend-mode: multiply;
  opacity: 0.92;
  pointer-events: none;
}

img.book-page-image[hidden],
img.flip-page-image[hidden] {
  display: none;
}

.page-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: calc(var(--book-scale, 1) * 46px);
  letter-spacing: 0.04em;
  color: #3d2b18;
  margin: 0;
}

.page-body {
  font-family: 'Volkhov', serif;
  font-size: calc(var(--book-scale, 1) * 26px);
  line-height: 1.6;
  color: #4a3620;
  margin: 0;
}

.page-number {
  margin-top: auto;
  font-family: 'Cinzel', serif;
  font-size: calc(var(--book-scale, 1) * 22px);
  letter-spacing: 0.12em;
  color: #5a4429;
  opacity: 0.85;
}

/* --- BOOK TABLETOP STAND --- */
.book-display {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  padding-bottom: clamp(2.75rem, 4vw, 4rem);
  transform: translateY(clamp(-2.75rem, -4.25vh, -2rem));
}

.book-display .book-stage {
  position: relative;
  z-index: 2;
}

.book-stand-image {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 116%;
  max-width: none;
  height: auto;
  display: block;
  transform: translate(-50%, -25%);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.book-sticky .book-image {
  max-height: min(54vh, calc(100vh - var(--book-header-offset) - 19.75rem));
  max-height: min(54svh, calc(100svh - var(--book-header-offset) - 19.75rem));
}

.book-sticky .book-presentation {
  margin-bottom: 0;
}

.book-page-text,
.flip-page-text {
  gap: calc(var(--book-scale, 1) * 12px);
}

.page-footer {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--book-scale, 1) * 7px);
}

.page-cta {
  width: 84%;
  aspect-ratio: 1024 / 233;
  padding: 0 calc(var(--book-scale, 1) * 52px);
  border: 0;
  background: transparent url('../assets/book/page-cta-frame.png?v=1') no-repeat center / 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b2612;
  font-family: 'Cinzel', serif;
  font-size: max(8px, calc(var(--book-scale, 1) * 28px));
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 calc(var(--book-scale, 1) * 1px) 0 rgba(255, 235, 189, 0.72);
  text-transform: uppercase;
  white-space: nowrap;
  filter: drop-shadow(0 calc(var(--book-scale, 1) * 4px) calc(var(--book-scale, 1) * 4px) rgba(54, 31, 12, 0.25));
}

button.page-cta {
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

button.page-cta:hover {
  color: #241508;
  filter: brightness(1.08) saturate(1.05) drop-shadow(0 calc(var(--book-scale, 1) * 6px) calc(var(--book-scale, 1) * 7px) rgba(54, 31, 12, 0.36));
  transform: translateY(calc(var(--book-scale, 1) * -2px));
}

button.page-cta:active {
  filter: brightness(0.98) drop-shadow(0 calc(var(--book-scale, 1) * 2px) calc(var(--book-scale, 1) * 3px) rgba(54, 31, 12, 0.28));
  transform: translateY(0);
}

button.page-cta:focus-visible {
  outline: max(1px, calc(var(--book-scale, 1) * 3px)) solid rgba(73, 46, 20, 0.92);
  outline-offset: calc(var(--book-scale, 1) * 4px);
}

.page-footer .page-number {
  margin-top: 0;
  font-size: max(6px, calc(var(--book-scale, 1) * 20px));
}

@media (prefers-reduced-motion: reduce) {
  button.page-cta {
    transition: none;
  }
}

@media (max-width: 576px) {
  .book-page-text,
  .flip-page-text {
    gap: calc(var(--book-scale, 1) * 8px);
  }

  .page-footer {
    gap: calc(var(--book-scale, 1) * 4px);
  }

  .page-cta {
    width: 80%;
  }

  .page-footer .page-number {
    font-size: max(5px, calc(var(--book-scale, 1) * 20px));
  }

  .book-display {
    padding-bottom: 2.5rem;
    transform: translateY(clamp(-1.75rem, -2.75vh, -1rem));
  }

  .book-stand-image {
    width: 114%;
  }
}
