@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&display=swap');

:root {
  --black: #000000;
  --white: #ffffff;
  --cream: #f4f0e8;
  --gold: #b8860b;
  --bronze: #8a5a18;
  --soft-line: rgba(255, 255, 255, 0.22);
  --light-screen: #e8e8e8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: var(--black);
  overflow-x: hidden;
}

body {
  color: var(--white);
  font-family: "Libre Baskerville", Georgia, serif;
}

/* ======================================================
   TOP LOGO
====================================================== */

.top-logo-link {
  position: absolute;
  top: 18px;
  left: 40px;
  z-index: 50;
  display: inline-block;
}

.top-logo {
  width: 82px;
  height: auto;
  display: block;
}

/* ======================================================
   MENU
====================================================== */

.menu-button {
  position: absolute;
  top: 28px;
  right: 42px;
  width: 42px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--gold);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.menu-button.open span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-button.open span:nth-child(2) {
  opacity: 0;
}

.menu-button.open span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.menu-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #111111;
  z-index: 110;
  padding: 100px 30px 30px;
  transition: right 0.3s ease;
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.45);
}

.menu-panel.open {
  right: 0;
}

.menu-panel a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.menu-panel a:hover {
  color: var(--gold);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 100;
}

.menu-overlay.show {
  display: block;
}

/* ======================================================
   HOME LAYOUT
====================================================== */

.home-layout {
  width: min(1280px, 92vw);
  margin: 110px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 360px);
  gap: 70px;
  align-items: start;
}

/* ======================================================
   PDF SCREEN
====================================================== */

.pdf-slider-section {
  width: 100%;
}

.pdf-hero-slider {
  width: 100%;
  height: 430px;
  position: relative;
  overflow: hidden;
  background: var(--light-screen);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* No iframe viewer is shown here, so the grey edge disappears. */
.pdf-slide-visual {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--light-screen);
  position: relative;
}

.pdf-preview-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
  will-change: transform;
}

/* PDF slowly moves down for 20 seconds. */
.pdf-pan-image {
  animation: pdfSlowPan 20000ms linear forwards;
}

@keyframes pdfSlowPan {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(calc(-1 * var(--pan-distance, 0px)));
  }
}

.pdf-empty-state,
.pdf-loading-state,
.pdf-clean-card {
  width: 100%;
  height: 100%;
  background: var(--light-screen);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pdf-clean-card {
  color: var(--gold);
  font-size: 28px;
  font-weight: 700;
}

.pdf-click-overlay {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 5;
}

.pdf-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.pdf-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--gold);
  animation: pdfProgress 20000ms linear;
}

@keyframes pdfProgress {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

/* ======================================================
   NVIDIA STYLE TABS
====================================================== */

.pdf-slider-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.pdf-slider-tabs.is-empty {
  display: none;
}

.pdf-slider-tab {
  background: transparent;
  border: none;
  border-top: 4px solid var(--soft-line);
  color: var(--cream);
  text-align: left;
  padding-top: 14px;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}

.pdf-slider-tab.active {
  border-top-color: var(--gold);
}

.tab-category {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.88);
}

.tab-title {
  display: block;
  font-size: 17px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

/* ======================================================
   RIGHT BOOK AREA
====================================================== */

.book-access-area {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}

.book-3d-link {
  text-decoration: none;
  display: inline-block;
}

.book-3d {
  position: relative;
  width: 215px;
  transform: perspective(1200px) rotateY(-24deg) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}

.book-3d:hover {
  transform: perspective(1200px) rotateY(-15deg) rotateX(0deg) translateY(-6px);
}

.book-pages {
  position: absolute;
  top: 10px;
  right: -18px;
  width: 22px;
  height: calc(100% - 20px);
  background: linear-gradient(
    to right,
    #f3f3f3 0%,
    #ffffff 25%,
    #e4e4e4 55%,
    #fafafa 100%
  );
  border-radius: 0 3px 3px 0;
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.08);
}

.book-3d-cover {
  position: relative;
  width: 100%;
  display: block;
  border-radius: 2px;
  box-shadow: 28px 26px 24px rgba(0, 0, 0, 0.38);
  z-index: 2;
}

.book-shadow {
  position: absolute;
  left: 26px;
  right: -10px;
  bottom: -22px;
  height: 26px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0) 72%
  );
  filter: blur(8px);
  z-index: 1;
}

/* ======================================================
   IXXAMEN LINE
====================================================== */

.ixxamen-marquee {
  margin-top: 22px;
  overflow: hidden;
  white-space: nowrap;
  color: var(--gold);
  font-size: 22px;
  text-transform: uppercase;
  font-family: Arial, Helvetica, sans-serif;
}

.ixxamen-marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: marqueeRight 26s linear infinite;
}

.ixxamen-marquee-track span {
  display: inline-block;
  padding-right: 34px;
}

@keyframes marqueeRight {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0%);
  }
}

/* ======================================================
   SIGNUP CARD
====================================================== */

.signup-card {
  width: min(760px, 86vw);
  margin: 78px auto 52px;
  background: #ffffff;
  border-radius: 22px;
  padding: 44px 38px 48px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.signup-card h2 {
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 28px;
  line-height: 1.15;

  background: linear-gradient(
    135deg,
    #8a5a18 0%,
    #b8860b 20%,
    #d4af37 40%,
    #f0cf69 55%,
    #9d6721 75%,
    #b8860b 100%
  );

  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  animation: diagonalGoldShift 6s ease-in-out infinite;
}

@keyframes diagonalGoldShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.signup-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.signup-form input {
  width: 280px;
  height: 52px;
  border: none;
  background: #f5efdf;
  padding: 0 18px;
  font-size: 16px;
  font-family: "Libre Baskerville", Georgia, serif;
  outline: none;
  color: #222222;
}

.signup-form button {
  height: 52px;
  padding: 0 26px;
  border: none;
  background: var(--gold);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
}

.signup-form button:hover {
  background: #a97908;
}

.signup-message {
  margin-top: 16px;
  font-size: 14px;
  color: var(--gold);
  display: none;
}

.signup-message.show {
  display: block;
}

/* ======================================================
   FOOTER
====================================================== */

.footer-info {
  margin: 34px 0 32px 46px;
  color: var(--white);
  font-size: 20px;
  line-height: 1.9;
}

.footer-info a {
  color: var(--white);
  text-decoration: none;
}

.footer-info a:hover {
  color: var(--gold);
}

/* ======================================================
   PDF PAGE
====================================================== */

.pdf-page {
  min-height: 100vh;
  padding: 120px 40px 60px;
  background: var(--black);
}

.pdf-page-title {
  text-align: center;
  font-size: 36px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 50px;
}

.pdf-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 28px;
}

.pdf-grid-card {
  display: block;
  text-decoration: none;
  background: #111111;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  padding: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.pdf-grid-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.pdf-grid-thumbnail {
  height: 250px;
  background: #1c1c1c;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}

.pdf-grid-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.pdf-grid-thumbnail span {
  color: var(--gold);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pdf-grid-card p {
  color: var(--cream);
  font-size: 15px;
  line-height: 1.5;
}

.pdf-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,255,255,0.6);
  padding: 60px 0;
}

/* ======================================================
   TABLET
====================================================== */

@media (max-width: 1024px) {
  .home-layout {
    width: min(92vw, 760px);
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .book-access-area {
    justify-content: center;
  }

  .pdf-hero-slider {
    height: 410px;
  }
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 768px) {
  .top-logo-link {
    top: 16px;
    left: 20px;
  }

  .top-logo {
    width: 66px;
  }

  .menu-button {
    top: 18px;
    right: 22px;
    width: 36px;
    height: 28px;
    gap: 6px;
  }

  .menu-button span {
    height: 3px;
  }

  .menu-panel {
    width: 260px;
    right: -280px;
    padding: 90px 24px 24px;
  }

  .home-layout {
    width: min(92vw, 520px);
    margin-top: 95px;
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pdf-hero-slider {
    height: 310px;
  }

  .pdf-slider-tabs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tab-title {
    font-size: 16px;
  }

  .book-3d {
    width: 170px;
  }

  .ixxamen-marquee {
    font-size: 16px;
  }

  .signup-card {
    width: min(92vw, 500px);
    padding: 30px 20px 36px;
    border-radius: 18px;
  }

  .signup-card h2 {
    font-size: 21px;
  }

  .signup-form {
    flex-direction: column;
    gap: 10px;
  }

  .signup-form input,
  .signup-form button {
    width: 100%;
    max-width: 320px;
  }

  .footer-info {
    margin: 24px 0 28px 24px;
    font-size: 16px;
  }

  .pdf-page {
    padding: 95px 22px 40px;
  }

  .pdf-page-title {
    font-size: 24px;
  }

  .pdf-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
  }

  .pdf-grid-thumbnail {
    height: 210px;
  }
}
/* ======================================================
   MOBILE FIX: SHORTER GOLD PDF TAB LINE
====================================================== */

@media (max-width: 768px) {
  .pdf-slider-tabs {
    width: 100%;
    margin-top: 22px;
    grid-template-columns: 1fr;
  }

  .pdf-slider-tab {
    width: 180px;
    max-width: 60vw;
    justify-self: start;
  }
}

