  /* RESET */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: Urbanist, sans-serif;
    line-height: 1.45;
    overflow-x: hidden;
  }

  /* NAVBAR */
  .navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 40px;
  }

  /* left LOGO */
  .nav-left {
    position: absolute;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .logo {
    width: 40px;
    height: 32px;
  }

  /* CENTER NAV */
  .nav-center ul {
    list-style: none;        /* ❌ removes bullets */
    display: flex;           /* ➡️ horizontal layout */
    gap: 40px;               /* spacing between items */
    padding: 0;
    margin: 0;
  }

  .nav-center a {
    text-decoration: none;
    color: #111;
    font-size: 18px;
    font-weight: 500;
    position: relative;
    padding: 6px 12px;          /* ⬅️ gives shape */
    border-radius: 999px;       /* ⬅️ rounded corners */

    transition: background-color 0.2s ease, color 0.2s ease;
  }

 

  /* HOVER EFFECT – underline highlight */
  .nav-center a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s ease;
  }

  .nav-center a:hover::after {
    width: 100%;
  }

  /* right Button */
  .nav-right {
    position: absolute;
    right: 20px;  
    display: flex;
    align-items: center;        /* vertical center */
    justify-content: center;
    gap: 10px;
    width: 100px;
    height: 40px;
    border-radius: 999px;
  }

  .nav-button {
    position: absolute;
    right: 20px;  
    display: flex;
    align-items: center;        /* vertical center */
    justify-content: center;
    gap: 10px;
    width: 100px;
    height: 40px;
    border-radius: 999px;
    border: none;
    outline: none;
    background-color: #471e8a;   /* dark blue */
    color: #ffffff;
  }

  .nav-button:hover {
    background-color: #3b1775;
    cursor: pointer;
  }

  .nav-button:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
  }

  .hero-bg {
    width: 100%;
    height: 80vh;                     /* adjust if needed */
    background-image: url("bg.jpg"); /* your HD image */
    background-size: cover;           /* ⬅️ fills screen */
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-overlay {
    
    padding: 60px 40px;
    border-radius: 16px;
    text-align: center;
  }

  .lead{

    font-family: Figtree, sans-serif;
    font-size: clamp(2rem, 5vw, 3.125rem);
    color: #020c99;
    max-width: 700px;
  }

  .caption{

    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: #000000;
    max-width: 700px;
    font-weight: 700;
  }

  .hero-input input {
    width: min(420px, 92vw);
    padding: 14px 18px;
    border-radius: 999px;

    border: 1.5px solid #d1d5db;   /* gray border */
    background-color: #ffffff;

    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;

    font-size: 16px;
    font-family: inherit;
    text-align: left;

    transition: border-color 0.2s ease;
  }

  .hero-input input:focus {
    border-color: #000000;        /* black border */
  }

  .hero-input button{
    display: inline-flex;
    align-items: center;        /* vertical center */
    justify-content: center;
    gap: 20px;
    width: 100px;
    height: 40px;
    border-radius: 999px;
    border: none;
    outline: none;
    background-color: #471e8a;   /* dark blue */
    color: #ffffff;
  }

  .hero-input button:hover {
    background-color: #3b1775;
    cursor: pointer;
  }

  .hero-input button:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
  }


  .site-name {
    font-weight: 600;
    font-size: 16px;
  }

  .pdf-reader {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    padding: 60px 20px 80px;
  }

  .pdf-reader-inner {
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
  }

  .pdf-reader-inner h2 {
    font-family: Figtree, sans-serif;
    font-size: 36px;
    color: #1f2937;
    margin-bottom: 8px;
  }

  .pdf-reader-inner p {
    color: #4b5563;
    margin-bottom: 20px;
  }

  .pdf-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }

  #pdfUpload {
    display: none;
  }

  .pdf-upload-label,
  .pdf-controls button {
    border: none;
    border-radius: 999px;
    background-color: #1e3a8a;
    color: #fff;
    padding: 10px 18px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
  }

  .pdf-upload-label:hover,
  .pdf-controls button:hover {
    background-color: #1e2f6f;
  }

  #pageIndicator {
    font-weight: 600;
    color: #111827;
    min-width: 110px;
  }

  .page-indicator-select {
    display: none;
    border: none;
    background: transparent;
    color: #111827;
    padding: 0 22px 0 0;
    margin: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    min-width: 0;
    width: auto;
    text-align: left;
    text-align-last: left;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    border-bottom: 2px solid transparent;
    background-image: linear-gradient(#2563eb, #2563eb);
    background-repeat: no-repeat;
    background-position: left calc(100% + 2px);
    background-size: 0% 2px;
    transition: background-size 0.3s ease;
  }

  .page-indicator-select:disabled {
    cursor: not-allowed;
    opacity: 0.7;
  }

  .page-indicator-select:hover:not(:disabled) {
    background-size: calc(100% - 22px) 2px;
  }

  .book-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: visible;
    overscroll-behavior-x: contain;
  }

  .book-stage {
    position: relative;
    width: fit-content;
    max-width: 100%;
  }

  .book {
    width: 940px;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--book-aspect-ratio, 940 / 620);
    background: #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
    display: flex;
    overflow: visible;
    user-select: none;
    touch-action: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    position: relative;
    perspective: 2200px;
    transform-style: preserve-3d;
  }

  .book::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    pointer-events: none;
    z-index: 9;
  }

  .left-page-shell,
  .right-page-shell {
    width: 50%;
    height: 100%;
    position: relative;
    z-index: 2;
    background: #fff;
    opacity: 1;
    transform-style: preserve-3d;
    will-change: transform;
  }

  .page-zoom-strip {
    position: absolute;
    top: 8px;
    left: 14px;
    right: 14px;
    z-index: 300;
    height: 36px;
    pointer-events: none;
  }

  .page-zoom-btn {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 301;
    box-shadow: 0 8px 16px rgba(2, 6, 23, 0.34);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
  }

  #leftPageZoomBtn {
    left: 0;
  }

  #rightPageZoomBtn {
    right: 0;
  }

  .page-zoom-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .page-zoom-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.42);
  }

  .page-zoom-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
  }

  .book.flip-next .right-page-shell {
    z-index: 4;
  }

  .book.flip-next .left-page-shell {
    z-index: 2;
  }

  .book.flip-prev .left-page-shell {
    z-index: 4;
  }

  .book.flip-prev .right-page-shell {
    z-index: 2;
  }

  .under-canvas {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: block;
    z-index: 0;
  }

  .left-under-canvas {
    left: 0;
  }

  .right-under-canvas {
    right: 0;
  }

  #leftPageCanvas,
  #rightPageCanvas {
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 1;
    display: block;
  }

  #leftPageCanvas,
  #rightPageCanvas,
  .page-back-canvas {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .page-back-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 1;
    visibility: hidden;
    display: block;
  }

  #rightBackCanvas {
    transform: rotateY(180deg) translateZ(0.2px);
  }

  #leftBackCanvas {
    transform: rotateY(180deg) translateZ(0.2px);
  }

  .book.show-right-back #rightBackCanvas {
    visibility: visible;
  }

  .book.show-left-back #leftBackCanvas {
    visibility: visible;
  }

  #leftPageCanvas,
  #rightPageCanvas {
    transform: translateZ(0.2px);
  }

  .left-page-shell {
    transform-origin: right center;
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
    box-shadow: none;
    will-change: transform;
  }

  .right-page-shell {
    transform-origin: left center;
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
    box-shadow: none;
    will-change: transform;
  }

  .left-page-shell::after,
  .right-page-shell::after {
    content: "";
    position: absolute;
    top: 0;
    width: 22px;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease-out;
  }

  .right-page-shell::after {
    left: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.24) 0%, rgba(15, 23, 42, 0) 100%);
  }

  .left-page-shell::after {
    right: 0;
    background: linear-gradient(270deg, rgba(15, 23, 42, 0.24) 0%, rgba(15, 23, 42, 0) 100%);
  }

  .book.is-flipping.flip-next .right-page-shell {
    z-index: 12;
    box-shadow: -12px 8px 14px rgba(15, 23, 42, 0.2);
  }

  .book.is-flipping.flip-next .right-page-shell::after {
    opacity: 1;
  }

  .book.is-flipping.flip-prev .left-page-shell {
    z-index: 12;
    box-shadow: 12px 8px 14px rgba(15, 23, 42, 0.2);
  }

  .book.is-flipping.flip-prev .left-page-shell::after {
    opacity: 1;
  }

  .book.is-grabbing {
    cursor: grabbing;
  }

  .book.is-flipping .left-page-shell,
  .book.is-flipping .right-page-shell {
    pointer-events: auto;
  }

  .flip-overlay-shell {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    z-index: 14;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .flip-overlay-shell.next {
    right: 0;
    transform-origin: left center;
  }

  .flip-overlay-shell.prev {
    left: 0;
    transform-origin: right center;
  }

  .flip-overlay-front,
  .flip-overlay-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .flip-overlay-front {
    transform: translateZ(0.2px);
  }

  .flip-overlay-back {
    transform: rotateY(180deg) translateZ(0.2px);
  }

  .flip-overlay-shell.next {
    box-shadow: -10px 6px 10px rgba(15, 23, 42, 0.16);
  }

  .flip-overlay-shell.prev {
    box-shadow: 10px 6px 10px rgba(15, 23, 42, 0.16);
  }

  .pdf-fallback-frame {
    width: 940px;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--book-aspect-ratio, 940 / 620);
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
    background: #fff;
    display: none;
    margin: 0 auto;
  }

  @media (max-width: 900px) {
    .navbar {
      padding: 16px 20px;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 10px;
    }

    .nav-left,
    .nav-right {
      position: static;
    }

    .nav-center {
      width: 100%;
      order: 3;
    }

    .nav-center ul {
      justify-content: center;
      flex-wrap: wrap;
      gap: 12px 16px;
    }

    .nav-center a {
      font-size: 16px;
      padding: 6px 10px;
    }

    .nav-button {
      position: static;
      width: 110px;
      height: 42px;
      font-size: 15px;
    }

    .hero-bg {
      min-height: 68vh;
      height: auto;
      padding: 44px 0;
    }

    .hero-overlay {
      width: min(720px, 96vw);
      padding: 28px 18px;
    }

    .caption {
      margin: 0 auto;
      max-width: 32ch;
    }

    .hero-input {
      display: grid;
      justify-items: center;
      gap: 10px;
    }

    .hero-input button {
      width: 120px;
      height: 44px;
      font-size: 16px;
    }

    .pdf-reader {
      padding: 40px 14px 56px;
    }

    .pdf-reader-inner h2 {
      font-size: clamp(1.75rem, 6.5vw, 2.25rem);
    }

    .pdf-reader-inner p {
      font-size: 16px;
      line-height: 1.5;
      max-width: 34ch;
      margin-left: auto;
      margin-right: auto;
    }

    .pdf-upload-label,
    .pdf-controls button {
      font-size: 15px;
      padding: 11px 16px;
    }

    .page-indicator-select {
      font-size: 17px;
    }

    #pageIndicator {
      font-size: 17px;
    }

    .book {
      width: 96vw;
      height: auto;
      aspect-ratio: var(--book-aspect-ratio, 940 / 620);
    }

    .page-zoom-btn {
      width: 34px;
      height: 34px;
    }

    .pdf-fallback-frame {
      width: 96vw;
      height: auto;
      aspect-ratio: var(--book-aspect-ratio, 940 / 620);
    }
  }

  @media (max-width: 560px) {
    .navbar {
      padding: 14px 12px;
    }

    .site-name {
      font-size: 17px;
    }

    .lead {
      font-size: clamp(2rem, 9vw, 2.4rem);
    }

    .caption {
      font-size: 17px;
      line-height: 1.5;
    }

    .hero-input input {
      font-size: 17px;
      padding: 13px 16px;
    }

    .hero-input button {
      width: 124px;
      height: 46px;
      font-size: 16px;
    }

    .book {
      width: 97vw;
      height: auto;
      aspect-ratio: var(--book-aspect-ratio, 940 / 620);
      border-radius: 10px;
    }

    .page-zoom-strip {
      top: 6px;
      left: 10px;
      right: 10px;
      height: 32px;
    }

    .page-zoom-btn {
      width: 32px;
      height: 32px;
    }

    .pdf-fallback-frame {
      width: 97vw;
      height: auto;
      aspect-ratio: var(--book-aspect-ratio, 940 / 620);
      border-radius: 10px;
    }
  }

