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

  :root {
    --navy: #1d2d44;
    --blue-light: #AECBEB;
    --blue-mid: #4893C6;
    --paper: #f5f0e8;
    --paper-shadow: #e8e2d5;
    --manila: #c9a84c;
    --manila-dark: #a07a28;
    --manila-shadow: #7a5c1a;
    --font: 'Arial Narrow', Arial, sans-serif;
    --font-heading: 'Xanh Mono', monospace;
  }

  html {
    background: var(--blue-light);
    overflow-x: hidden;
  }

  body {
    font-family: var(--font);
    background: var(--blue-light);
    color: var(--navy);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ── Scrollable spacer that drives the pinned scene ── */
  #scroll-driver {
    height: 600vh;
    position: relative;
  }

  /* ── Pinned stage ── */
  #stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    perspective-origin: 50% 40%;
    pointer-events: none;
    z-index: 10;
  }

  /* ── Folder wrapper (3D context) ── */
  #folder-wrapper {
    position: relative;
    width: 520px;
    height: 460px;
    transform-style: preserve-3d;
    overflow: visible;
  }

  /* ── Folder back (bottom half — stays in place) ── */
  #folder-back {
    position: absolute;
    inset: 0;
    border-radius: 4px 4px 6px 6px;
    background: linear-gradient(160deg, #6d94b5 0%, #5580a0 60%, #416888 100%);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.25),
      0 2px 6px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 1;
    transform: translateZ(-2px);
  }

  /* Folder tab */
  #folder-back::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 40px;
    width: 100px;
    height: 22px;
    background: linear-gradient(180deg, #7da4c4 0%, #5580a0 100%);
    border-radius: 6px 6px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  /* Folder grain texture overlay */
  #folder-back::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image:
      repeating-linear-gradient(90deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px);
    pointer-events: none;
  }

  /* ── Pages inside folder ── */
  #pages-container {
    position: absolute;
    inset: 10px;
    z-index: 2;
  }

  .page {
    position: absolute;
    inset: 0;
    background: #dce8f5;
    border-radius: 2px;
    padding: 32px 36px;
    overflow: hidden;
    background-image: linear-gradient(180deg, #dce8f5 0%, #d4e2f0 100%);
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.1),
      0 6px 20px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      inset 0 -1px 0 rgba(0, 0, 0, 0.04);
    color: var(--navy);
    transform-origin: center bottom;
    will-change: transform, opacity;
  }

  /* Slight stagger for depth illusion */
  .page:nth-child(5) {
    transform: translateY(0px) translateX(0px);
    z-index: 5;
  }

  .page:nth-child(4) {
    transform: translateY(2px) translateX(1px);
    z-index: 4;
  }

  .page:nth-child(3) {
    transform: translateY(4px) translateX(2px);
    z-index: 3;
  }

  .page:nth-child(2) {
    transform: translateY(6px) translateX(3px);
    z-index: 2;
  }

  .page:nth-child(1) {
    transform: translateY(8px) translateX(4px);
    z-index: 1;
  }

  /* Left margin line on each page */
  .page::before {
    content: none;
  }

  /* Horizontal ruled lines */
  .page::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 32px;
    bottom: 32px;
    background-image: repeating-linear-gradient(to bottom,
        transparent 0px,
        transparent 27px,
        rgba(65, 104, 136, 0.15) 27px,
        rgba(65, 104, 136, 0.15) 28px);
    pointer-events: none;
  }

  .page-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* ── Page 1 — Title ── */
  .page-title .page-inner {
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
  }

  .page-label {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-mid);
    opacity: 0.7;
    margin-bottom: 4px;
  }

  .big-title {
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--navy);
  }

  .subtitle {
    font-size: 12px;
    line-height: 1.7;
    color: #3a4d66;
    max-width: 340px;
    font-style: italic;
    font-weight: 300;
    border-top: 1px solid rgba(29, 45, 68, 0.15);
    padding-top: 12px;
  }

  .page-number {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 9px;
    letter-spacing: 0.15em;
    color: rgba(29, 45, 68, 0.3);
  }

  /* ── Page 2 — Overview ── */
  .page-overview .page-inner {
    gap: 14px;
  }

  .page-heading {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blue-mid);
    border-bottom: 1px solid rgba(72, 147, 198, 0.25);
    padding-bottom: 6px;
  }

  .page-body {
    font-size: 11px;
    line-height: 1.85;
    color: #2a3d56;
    font-weight: 300;
  }

  .page-body strong {
    font-weight: 500;
    color: var(--navy);
  }

  .step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .step-list li {
    font-size: 11px;
    line-height: 1.6;
    color: #2a3d56;
    font-weight: 300;
    padding-left: 20px;
    position: relative;
  }

  .step-list li::before {
    content: attr(data-n);
    position: absolute;
    left: 0;
    color: var(--blue-mid);
    font-weight: 600;
  }

  /* ── Page 3 — Conceptual ── */
  .page-concept .page-inner {
    gap: 12px;
  }

  .concept-block {
    border-left: 2px solid var(--blue-light);
    padding-left: 12px;
    font-size: 10.5px;
    line-height: 1.8;
    color: #2a3d56;
    font-weight: 300;
    font-style: italic;
  }

  .concept-block strong {
    font-style: normal;
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
    color: var(--navy);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* ── Page 4 — References ── */
  .page-refs .page-inner {
    gap: 16px;
  }

  .ref-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .ref-item {
    font-size: 10px;
    line-height: 1.7;
    color: #2a3d56;
    padding-left: 16px;
    border-left: 1px solid rgba(72, 147, 198, 0.3);
    font-weight: 300;
  }

  .ref-item .ref-author {
    font-weight: 500;
    color: var(--navy);
    display: block;
  }

  .ref-item .ref-title {
    font-style: italic;
  }

  /* ── Page 5 — Enter ── */
  .page-enter .page-inner {
    justify-content: center;
    align-items: center;
    gap: 20px;
  }

  .enter-label {
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(29, 45, 68, 0.4);
  }

  .enter-btn {
    display: inline-block;
    padding: 16px 32px;
    border: 3px inset #1d2d44;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--navy);
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    pointer-events: all;
  }

  .enter-btn:hover {
    background: var(--navy);
    color: var(--paper);
  }

  .enter-note {
    font-size: 9px;
    color: rgba(29, 45, 68, 0.4);
    letter-spacing: 0.12em;
    text-align: center;
    max-width: 240px;
    line-height: 1.6;
  }

  /* ── Folder cover (folds open) ── */
  #folder-cover {
    position: absolute;
    inset: 0;
    border-radius: 4px 4px 6px 6px;
    background: linear-gradient(160deg, #6d94b5 0%, #5580a0 60%, #416888 100%);
    transform-origin: bottom center;
    z-index: 20;
    will-change: transform;
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  }

  /* Cover grain */
  #folder-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image:
      repeating-linear-gradient(90deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.025) 2px,
        rgba(0, 0, 0, 0.025) 4px),
      repeating-linear-gradient(180deg,
        transparent,
        transparent 8px,
        rgba(0, 0, 0, 0.015) 8px,
        rgba(0, 0, 0, 0.015) 9px);
  }

  /* Cover label */
  #cover-label {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(30, 18, 0, 0.4);
    transform: translateZ(1px);
  }

  /* Cover tracking shadow (dynamic via JS) */
  #cover-shadow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.35) 100%);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
  }

  /* ── Scroll hint ── */
  #scroll-hint {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.4s;
  }

  #scroll-hint span {
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(29, 45, 68, 0.5);
  }

  .scroll-arrow {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(29, 45, 68, 0.5), transparent);
    animation: arrowPulse 1.8s ease-in-out infinite;
  }

  @keyframes arrowPulse {

    0%,
    100% {
      opacity: 0.3;
      transform: translateY(0);
    }

    50% {
      opacity: 1;
      transform: translateY(6px);
    }
  }

  /* ── Page counter ── */
  #page-counter {
    position: fixed;
    bottom: 32px;
    right: 40px;
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(29, 45, 68, 0.4);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
  }

  /* ── Outro section (below scroll driver) ── */
  #outro {
    display: none;
    /* hidden until folder is done */
  }