:root {
  --navy: #29245f;
  --purple: #67349a;
  --purple2: #7d3da4;
  --blue: #159fd0;
  --green: #00a65a;
  --ink: #22223b;
  --muted: #6e7180;
  --line: #e7e4ee;
  --surface: #fff;
  --shadow: 0 18px 55px rgba(40, 27, 83, 0.12);
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--ink);
  background: #f7f6fa url("./img/bg.jpg") center/cover fixed no-repeat;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
.home-page {
  background-color: #21194f;
}
.home-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 5vw, 64px);
}
.brand-header img {
  width: clamp(135px, 19vw, 220px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.14));
}
.home-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 40px 16px 70px;
}
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.19em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--purple2);
}
.home-content .eyebrow {
  color: #e7cfff;
}
.home-content h1 {
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 0;
  font-weight: 800;
}
.intro-copy {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.82);
  margin: 22px 0 34px;
}
.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 18px 30px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  background: linear-gradient(120deg, #71349e, #38216f);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  font-weight: 800;
  transition: 0.2s;
}
.primary-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
}
.primary-cta span {
  font-size: 1.5em;
}
.site-footer,
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.76);
  padding-top: 18px;
}
.page-shell {
  min-height: 100vh;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 36px);
  display: flex;
  flex-direction: column;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 24px;
  border-bottom: 1px solid rgba(75, 53, 113, 0.15);
}
.brand-mini img {
  width: clamp(110px, 14vw, 160px);
  max-height: 58px;
  object-fit: contain;
}
.header-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--purple);
}
.page-content {
  padding: clamp(32px, 5vw, 68px) 0 45px;
}
.centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.page-content h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0;
  font-weight: 800;
  color: var(--navy);
}
.centered .eyebrow {
  margin-bottom: 14px;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 42px);
  width: min(100%, 900px);
  margin: clamp(36px, 6vw, 70px) auto 20px;
}
.choice-card {
  min-height: 270px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 22px;
  color: #fff;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.choice-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 55px rgba(40, 27, 83, 0.2);
}
.manuscript-card {
  background: linear-gradient(145deg, #13b2df, #087bbd);
}
.poster-card {
  background: linear-gradient(145deg, #0b7ac5, #154b9a);
}
.choice-icon {
  font-size: 2.4rem;
  line-height: 1;
}
.choice-card > span:nth-child(2) {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.choice-card small {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.83);
}
.page-footer {
  margin-top: auto;
  padding: 20px 4px 4px;
  border-top: 1px solid rgba(75, 53, 113, 0.15);
  color: #8a8495;
}
.back-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d9d1e5;
  background: #fff;
  color: var(--purple);
  font-weight: 700;
  border-radius: 10px;
  padding: 11px 18px;
  box-shadow: 0 5px 16px rgba(42, 31, 75, 0.06);
  transition: 0.2s;
}
.back-button:hover,
.secondary-button:hover {
  background: #f4eff9;
  border-color: #bda7d1;
  transform: translateY(-1px);
}
.section-heading {
  margin: 0 0 34px;
}
.section-heading .subheading {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.category-card {
  position: relative;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 25px 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: linear-gradient(135deg, #6b3297, #4c287e);
  color: #fff;
  box-shadow: 0 12px 28px rgba(61, 35, 94, 0.14);
  transition: 0.2s;
}
.category-card:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, #7a3ba5, #5c2a8a);
  box-shadow: 0 18px 35px rgba(61, 35, 94, 0.22);
}
.category-card strong {
  font-size: 1.08rem;
  line-height: 1.35;
}
.category-card small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}
.category-arrow {
  font-size: 1.6rem;
  opacity: 0.8;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.count-pill {
  padding: 9px 14px;
  background: #eee7f5;
  color: var(--purple);
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 99px;
  white-space: nowrap;
}
.document-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.document-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 20px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 22px rgba(42, 31, 75, 0.045);
  transition: 0.2s;
}
.document-row:hover {
  border-color: #c9b7d9;
  box-shadow: 0 12px 28px rgba(42, 31, 75, 0.09);
  transform: translateY(-1px);
}
.doc-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 9px;
  background: #f0eaf6;
  color: var(--purple);
  font-weight: 800;
  font-size: 0.85rem;
}
.doc-title {
  font-size: 0.94rem;
  line-height: 1.55;
  font-weight: 600;
  color: #343149;
}
.pdf-button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: #fff0f0;
  color: #c8333e;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}
.pdf-button:hover {
  background: #c8333e;
  color: #fff;
  transform: scale(1.04);
}
.pdf-button svg {
  width: 27px;
  height: 27px;
}
.empty-note {
  color: var(--muted);
  padding: 30px;
  text-align: center;
}
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 24px);
}
.pdf-modal.is-open {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 27, 0.78);
  backdrop-filter: blur(5px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  height: min(92vh, 950px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-label {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--purple);
  font-weight: 800;
}
.modal-header h2 {
  font-size: 1rem;
  margin: 3px 0 0;
  color: var(--ink);
}
.close-modal {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f2eff5;
  color: #4c3a5e;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.close-modal:hover {
  background: #fce7e8;
  color: #b42332;
}
.pdf-frame-wrap {
  flex: 1;
  min-height: 0;
  background: #e8e8ed;
}
.pdf-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.modal-actions {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}
.modal-actions .secondary-button {
  font-size: 0.82rem;
  padding: 9px 14px;
}
.modal-open {
  overflow: hidden;
}
@media (max-width: 850px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-card {
    min-height: 115px;
  }
  .choice-card {
    min-height: 220px;
  }
}
@media (max-width: 560px) {
  .home-shell {
    padding: 22px;
  }
  .home-content {
    padding: 35px 0 55px;
  }
  .site-footer,
  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-header {
    padding-bottom: 16px;
  }
  .header-kicker {
    font-size: 0.6rem;
  }
  .choice-grid {
    grid-template-columns: 1fr;
    width: min(100%, 380px);
    gap: 16px;
    margin-top: 30px;
  }
  .choice-card {
    min-height: 165px;
    padding: 22px;
  }
  .choice-icon {
    font-size: 1.8rem;
  }
  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .category-card {
    min-height: 92px;
    padding: 18px;
  }
  .section-heading {
    margin-bottom: 24px;
  }
  .list-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .document-row {
    grid-template-columns: 58px minmax(0, 1fr) 48px;
    gap: 11px;
    padding: 13px;
  }
  .doc-code {
    font-size: 0.75rem;
    min-height: 38px;
  }
  .doc-title {
    font-size: 0.82rem;
  }
  .pdf-button {
    width: 44px;
    height: 44px;
  }
  .pdf-button svg {
    width: 23px;
    height: 23px;
  }
  .modal-panel {
    height: 96vh;
    border-radius: 10px;
  }
  .modal-header {
    padding: 10px 12px;
  }
  .close-modal {
    width: 38px;
    height: 38px;
  }
  .page-content {
    padding-top: 34px;
  }
}

/* Portrait kiosk / vertical touch-screen layout */
@media (orientation: portrait) and (min-height: 650px) {
  body {
    background-attachment: scroll;
  }
  .home-shell {
    width: 100%;
    min-height: 100svh;
    padding: clamp(22px, 4.5vh, 76px) clamp(22px, 5vw, 72px);
  }
  .brand-header img {
    width: clamp(150px, 25vw, 290px);
  }
  .home-content {
    justify-content: center;
    padding: clamp(30px, 8vh, 130px) 3vw;
  }
  .home-content h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 1.08;
  }
  .intro-copy {
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    margin: 2.5vh 0 5vh;
  }
  .primary-cta {
    min-height: clamp(86px, 11vh, 150px);
    min-width: min(82vw, 760px);
    justify-content: center;
    padding: 22px 34px;
    border-radius: 20px;
    font-size: clamp(1.55rem, 4vw, 3rem);
  }
  .site-footer {
    font-size: clamp(0.72rem, 1.25vw, 1rem);
  }

  .page-shell {
    width: 100%;
    max-width: none;
    min-height: 100svh;
    padding: clamp(18px, 3.5vh, 54px) clamp(20px, 5vw, 76px);
  }
  .page-header {
    padding: clamp(8px, 1.5vh, 20px) 0 clamp(18px, 3vh, 42px);
  }
  .brand-mini img {
    width: clamp(140px, 22vw, 250px);
    max-height: 90px;
  }
  .header-kicker {
    font-size: clamp(0.72rem, 1.5vw, 1.1rem);
  }
  .page-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vh, 76px) 0;
  }
  .centered {
    align-items: center;
  }
  .page-content h1 {
    font-size: clamp(2.4rem, 6.2vw, 5rem);
  }
  .eyebrow {
    font-size: clamp(0.75rem, 1.4vw, 1.05rem);
  }
  .choice-grid {
    width: min(82vw, 780px);
    grid-template-columns: 1fr;
    gap: clamp(22px, 4vh, 54px);
    margin: clamp(42px, 8vh, 120px) auto 0;
  }
  .choice-card {
    min-height: clamp(190px, 22vh, 330px);
    border-radius: clamp(18px, 2vw, 28px);
    gap: clamp(12px, 2vh, 24px);
  }
  .choice-icon {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
  }
  .choice-card > span:nth-child(2) {
    font-size: clamp(2rem, 5vw, 3.8rem);
  }
  .choice-card small {
    font-size: clamp(1rem, 2vw, 1.45rem);
  }

  .section-heading {
    margin-bottom: clamp(28px, 5vh, 65px);
  }
  .section-heading .subheading {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2.2vw, 30px);
  }
  .category-card {
    min-height: clamp(150px, 17vh, 250px);
    padding: clamp(18px, 2.5vw, 34px);
    border-radius: clamp(14px, 1.7vw, 22px);
  }
  .category-card strong {
    font-size: clamp(1.15rem, 2.5vw, 1.9rem);
  }
  .category-card small {
    font-size: clamp(0.85rem, 1.5vw, 1.15rem);
  }
  .category-arrow {
    font-size: clamp(1.5rem, 3vw, 2.3rem);
  }

  .list-heading {
    align-items: flex-start;
    margin-bottom: clamp(22px, 3vh, 42px);
  }
  .count-pill {
    font-size: clamp(0.8rem, 1.4vw, 1.05rem);
    padding: 12px 18px;
  }
  .document-list {
    gap: clamp(12px, 1.5vh, 20px);
  }
  .document-row {
    grid-template-columns: clamp(72px, 9vw, 112px) minmax(0, 1fr) clamp(
        62px,
        7vw,
        88px
      );
    gap: clamp(14px, 2vw, 26px);
    padding: clamp(17px, 2.2vh, 28px) clamp(16px, 2.2vw, 30px);
    border-radius: 16px;
  }
  .doc-code {
    min-height: clamp(52px, 6vh, 78px);
    font-size: clamp(0.95rem, 1.7vw, 1.3rem);
  }
  .doc-title {
    font-size: clamp(1rem, 1.85vw, 1.42rem);
    line-height: 1.48;
  }
  .pdf-button {
    width: clamp(58px, 6.5vw, 82px);
    height: clamp(58px, 6.5vw, 82px);
    border-radius: 14px;
  }
  .pdf-button svg {
    width: clamp(28px, 3vw, 38px);
    height: clamp(28px, 3vw, 38px);
  }

  .page-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;

    margin: 0 calc(clamp(20px, 5vw, 76px) * -1);
    padding: clamp(14px, 2vh, 24px) clamp(20px, 5vw, 76px);
    font-size: clamp(0.75rem, 1.3vw, 1rem);
  }
  .back-button {
    min-height: clamp(48px, 6vh, 72px);
    padding: 12px 24px;
    font-size: clamp(1rem, 1.7vw, 1.3rem);
  }
  .modal-panel {
    width: 100%;
    height: 96svh;
    max-height: 96svh;
  }
  .modal-header h2 {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
  }
  .close-modal {
    width: clamp(48px, 5.5vw, 68px);
    height: clamp(48px, 5.5vw, 68px);
    font-size: 2.5rem;
  }
}

/* Short landscape displays still use the full available viewport */
@media (orientation: landscape) {
  .home-shell,
  .page-shell {
    min-height: 100svh;
  }
}

/* PDF.js canvas preview: avoids the embedded Chrome PDF plugin */
.pdf-frame-wrap {
  overflow: auto;
  display: block;
  overscroll-behavior: contain;
  padding: 12px;
  background: #dedee4;
  -webkit-overflow-scrolling: touch;
}
#pdf-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 100%;
  width: 100%;
}
.pdf-loading,
.pdf-error {
  margin: auto;
  padding: 28px;
  text-align: center;
  color: #514b5c;
  font-size: 1rem;
}
.pdf-error {
  max-width: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.pdf-error p {
  line-height: 1.6;
  color: #6e7180;
  margin: 10px 0 20px;
}
.pdf-page-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

/* PDF preview container */
.pdf-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: block;
}

#pdf-viewer {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pdf-page-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: white;
}

/* Landscape screen */
@media (orientation: landscape) {
  .modal-panel {
    height: 96vh;
    max-height: 96vh;
    min-height: 0;
  }

  .modal-header,
  .modal-actions {
    flex-shrink: 0;
  }

  .pdf-frame-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* Portrait screen */
@media (orientation: portrait) {
  .pdf-frame-wrap {
    overflow: auto;
  }

  .pdf-page-canvas {
    max-width: 100%;
  }
}


/* Full-screen PDF viewer with zoom controls */
.pdf-modal {
  padding: 0 !important;
}
.modal-panel {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  border-radius: 0 !important;
}
.modal-header {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 8px 14px;
  gap: 12px;
}
.modal-heading {
  min-width: 0;
}
.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}
.zoom-button,
.zoom-fit-button,
.open-pdf-button {
  min-width: 40px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d9d1e5;
  border-radius: 8px;
  background: #fff;
  color: var(--purple);
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.zoom-button {
  font-size: 1.35rem;
}
.zoom-level {
  min-width: 52px;
  text-align: center;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.open-pdf-button {
  font-size: 0.8rem;
}
.zoom-button:hover,
.zoom-fit-button:hover,
.open-pdf-button:hover {
  background: #f4eff9;
}
.close-modal {
  flex: 0 0 auto;
}
#pdf-viewer.pdf-frame-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  overflow-x: auto;
  overflow-y: auto;
  direction: ltr;
  box-sizing: border-box;
  padding: 16px 16px 72px;
  scroll-padding-bottom: 72px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#pdf-viewer.pdf-frame-wrap .pdf-page-canvas {
  display: block;
  flex: 0 0 auto;
  max-width: none !important;
  margin: 0 auto 18px;
}
#pdf-viewer.pdf-frame-wrap .pdf-page-canvas:last-child {
  margin-bottom: 56px;
}
.pdf-loading,
.pdf-error {
  flex: 0 0 auto;
  margin: 24px auto;
}
.modal-actions {
  display: none !important;
}
@media (max-width: 560px) {
  .modal-header {
    padding: 7px 8px;
    gap: 6px;
  }
  .modal-label {
    font-size: 0.55rem;
  }
  .pdf-toolbar {
    gap: 4px;
  }
  .zoom-button,
  .zoom-fit-button,
  .open-pdf-button {
    min-width: 32px;
    height: 34px;
    padding: 0 8px;
    font-size: 0.75rem;
  }
  .zoom-button {
    font-size: 1.15rem;
  }
  .zoom-level {
    min-width: 42px;
    font-size: 0.72rem;
  }
  .close-modal {
    width: 34px;
    height: 34px;
    font-size: 1.6rem;
  }
}
