/* کاتالوگ تعاملی جسر — Viewer · DNA Cataloger-inspired */

@font-face {
  font-family: "Droid Arabic Kufi";
  src: url("./fonts/DroidArabicKufi-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Droid Arabic Kufi";
  src: url("./fonts/DroidArabicKufi-Bold.ttf") format("truetype");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* JESR site palette — aligned with official PDF catalog */
  --brand: #b41011;
  --brand-hover: #8e0c0d;
  --brand-muted: rgba(180, 16, 17, 0.08);
  --accent: #d7a86e;
  --accent-hover: #c49258;
  --accent-muted: #f6ede0;
  --accent-glow: rgba(215, 168, 110, 0.22);
  --paper: #fffdf8;
  --paper-deep: #efe8dc;
  --canvas: #f7f3ec;
  --hero-canvas: #f3ece1;
  --pdf-tan: #d7b48a;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-muted: #78716c;
  --stage: #141210;
  --chrome: rgba(20, 18, 16, 0.82);
  --glass-bg: rgba(255, 253, 248, 0.55);
  --glass-border: rgba(215, 168, 110, 0.35);
  --glass-blur: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  /* Official PDF spread ≈ landscape A4-ish */
  --page-ratio: 595.276 / 481.89;
  --page-max-w: min(920px, 96vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Droid Arabic Kufi", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(180, 16, 17, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(215, 168, 110, 0.08), transparent 50%),
    var(--stage);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-xs {
  width: 12px;
  height: 12px;
}

/* ── Chrome ── */

.top {
  position: fixed;
  inset: 16px 16px auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  background: var(--chrome);
  color: #faf6f0;
  border: 1px solid rgba(215, 168, 110, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.top--pro {
  inset: 12px 12px auto;
  height: auto;
  min-height: 52px;
  padding: 8px 10px;
  gap: 8px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(180, 16, 17, 0.35), transparent 42%),
    rgba(20, 18, 16, 0.9);
  border-color: rgba(215, 168, 110, 0.28);
}

.top--pro .icon-btn {
  position: static !important;
  left: auto !important;
  grid-column: 1;
  grid-row: 1;
}

.top--pro .top-brand {
  grid-column: 2;
  grid-row: 1;
}

.top--pro .lang-switch {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
}

.top--pro .top-interactive {
  grid-column: 1 / -1;
  grid-row: 3;
  max-width: none;
  width: 100%;
  justify-content: center;
}

.top--pro .top-pdf {
  grid-column: 3;
  grid-row: 1;
  z-index: 1;
}

.top-brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.top-kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top--pro h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(215, 168, 110, 0.18);
}

.lang-pill {
  min-width: 2rem;
  flex: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: rgba(250, 246, 240, 0.72);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.lang-pill.is-active {
  background: var(--accent);
  color: #3b2410;
}

.top-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 34px;
  min-width: 34px;
  padding: 0 0.75rem;
  border: 1px solid rgba(215, 168, 110, 0.4);
  border-radius: 999px;
  background: rgba(215, 168, 110, 0.14);
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.top-pdf:hover {
  background: rgba(215, 168, 110, 0.28);
}

.top-interactive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px dashed rgba(215, 168, 110, 0.45);
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.top-interactive:hover {
  background: rgba(215, 168, 110, 0.16);
}

@media (min-width: 721px) {
  .top--pro {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  }
  .top--pro .lang-switch {
    grid-column: 3;
    grid-row: 1;
    width: auto;
  }
  .top--pro .top-interactive {
    grid-column: 4;
    grid-row: 1;
    width: auto;
    max-width: 11rem;
  }
  .top--pro .top-pdf {
    grid-column: 5;
    grid-row: 1;
  }
  .lang-pill {
    flex: 0 0 auto;
  }
}

@media (max-width: 720px) {
  .top--pro {
    border-radius: 14px;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
  }

  .top-pdf {
    padding: 0;
    width: 34px;
  }

  .top-pdf span {
    display: none;
  }

  .top-kicker {
    font-size: 0.62rem;
  }

  .top--pro h1 {
    font-size: 0.82rem;
  }

  .top-interactive {
    font-size: 0.72rem;
    padding: 0.4rem 0.65rem;
  }

  .catalog-from-pdf .stage {
    padding-top: 128px;
  }
}

.ambient-stage {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(180, 16, 17, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(215, 168, 110, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(180, 16, 17, 0.1), transparent 45%),
    #120e0c;
}

.ambient-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='none' stroke='%23d7a86e' stroke-width='1' d='M36 4l8 8-8 8-8-8zm0 48l8 8-8 8-8-8zM4 36l8-8 8 8-8 8zm48 0l8-8 8 8-8 8z'/%3E%3C/svg%3E");
  background-size: 72px 72px;
}

.catalog-from-pdf .stage,
.catalog-from-pdf .top,
.catalog-from-pdf .dock {
  position: relative;
  z-index: 2;
}

.catalog-from-pdf .top,
.catalog-from-pdf .dock {
  position: fixed;
  z-index: 30;
}

.catalog-from-pdf .pages {
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0 1px rgba(215, 168, 110, 0.18));
}

.pdf-veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(10, 8, 7, 0.55);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.pdf-veil.open {
  opacity: 1;
  pointer-events: auto;
}

.pdf-panel {
  width: min(440px, 100%);
  max-height: min(78dvh, 560px);
  overflow: auto;
  padding: 1.1rem 1.15rem 1.25rem;
  border-radius: 20px 20px 16px 16px;
  background:
    linear-gradient(180deg, rgba(180, 16, 17, 0.16), transparent 28%),
    #1c1613;
  border: 1px solid rgba(215, 168, 110, 0.28);
  color: #faf6f0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(18px);
  transition: transform 260ms var(--spring);
}

.pdf-veil.open .pdf-panel {
  transform: translateY(0);
}

.pdf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pdf-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--accent);
}

.pdf-lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(250, 246, 240, 0.72);
}

.pdf-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pdf-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.05);
  border: 1px solid rgba(215, 168, 110, 0.16);
}

.pdf-row.is-current {
  border-color: rgba(215, 168, 110, 0.45);
  background: rgba(215, 168, 110, 0.1);
}

.pdf-row-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pdf-row-lang {
  font-weight: 700;
  font-size: 0.9rem;
}

.pdf-row-file {
  font-size: 0.68rem;
  opacity: 0.55;
}

.pdf-row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.pdf-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 168, 110, 0.35);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.pdf-action--solid {
  background: var(--brand);
  border-color: transparent;
  color: #fff8ef;
}

@media (max-width: 720px) {
  .top--pro {
    flex-wrap: wrap;
    border-radius: 16px;
  }

  .top-pdf span {
    display: none;
  }

  .lang-switch {
    order: 3;
    width: 100%;
    justify-content: stretch;
  }

  .lang-pill {
    flex: 1;
  }
}

.top h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.top:not(.top--pro) .icon-btn {
  position: absolute;
  left: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  transition: background 180ms var(--ease-out);
}

.top .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.top .icon-btn:active {
  transform: scale(0.96);
}

/* ── Stage ── */

.stage {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 80px 24px 108px;
}

.viewer {
  position: relative;
  width: min(var(--page-max-w), 90vw);
  aspect-ratio: var(--page-ratio);
  max-height: calc(100dvh - 180px);
  margin-inline: auto;
}

.page-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(215, 168, 110, 0.2);
  border-radius: 999px;
  background: var(--chrome);
  color: var(--accent);
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  transition:
    opacity 200ms var(--ease-out),
    transform 200ms var(--ease-out),
    background 200ms var(--ease-out),
    border-color 200ms var(--ease-out);
}

.page-nav:not(:disabled):hover {
  background: rgba(180, 16, 17, 0.85);
  border-color: rgba(215, 168, 110, 0.45);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}

.nav-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(215, 168, 110, 0.4);
  transform: scale(0);
  animation: navRipple 520ms var(--ease-out) forwards;
  pointer-events: none;
}

@keyframes navRipple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.page-nav.prev {
  /* سمت راست فیزیکی = قبلی در RTL */
  left: calc(100% + 14px);
  right: auto;
}

.page-nav.next {
  /* سمت چپ فیزیکی = بعدی در RTL */
  right: calc(100% + 14px);
  left: auto;
}

.page-nav:disabled {
  opacity: 0.2;
  cursor: default;
}

.page-nav:not(:disabled):active {
  transform: translateY(-50%) scale(0.94);
}

@media (max-width: 560px) {
  /* موبایل: فلش‌ها روی محتوا نیایند — سوایپ کافی است */
  .page-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --page-max-w: 100vw;
  }

  .catalog-from-pdf .stage {
    padding: 118px 0 96px;
  }

  .catalog-from-pdf .catalog-page {
    border-radius: 0;
  }

  .catalog-from-pdf .viewer {
    max-height: calc(100dvh - 210px);
    width: 100vw;
  }

  /* صفحه آخر: تصویر کوتاه + لینک‌های خوانا بدون هم‌پوشانی فلش */
  .page-art:has(.page-art-links) {
    min-height: 0;
  }

  .page-art:has(.page-art-links) .page-art-img {
    max-height: 38%;
    height: 38%;
    object-fit: cover;
    object-position: top center;
    flex: 0 0 38%;
  }

  .page-art-links {
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    gap: 0.45rem;
    padding: 0.7rem 0.75rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .art-link {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  .art-link-k {
    font-size: 0.68rem;
  }

  .art-link--ghost {
    grid-column: auto;
    margin-top: 0.15rem;
  }
}


/* ── Pages ── */

.pages {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.4));
}

.catalog-page {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) scale(0.97);
  transition:
    opacity 460ms var(--spring),
    transform 460ms var(--spring);
  z-index: 1;
}

.catalog-page.is-exit-next {
  transform: translateX(-64px) scale(0.95);
  opacity: 0;
  z-index: 2;
}

.catalog-page.is-exit-prev {
  transform: translateX(64px) scale(0.95);
  opacity: 0;
  z-index: 2;
}

.catalog-page.is-enter-from-right {
  transform: translateX(64px) scale(0.95);
  opacity: 0;
}

.catalog-page.is-enter-from-left {
  transform: translateX(-64px) scale(0.95);
  opacity: 0;
}

.catalog-page.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 3;
}

.page-surface {
  position: absolute;
  inset: 0;
  padding: clamp(22px, 5vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

.page-surface::-webkit-scrollbar {
  display: none;
}

.page-centered {
  justify-content: center;
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* ── Typography ── */

.kicker-en {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}

.kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--brand);
  font-weight: 700;
}

.display {
  margin: 0;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--brand);
  text-wrap: balance;
}

.subtitle {
  margin: -4px 0 0;
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.6;
}

.body {
  margin: 0;
  max-width: 32ch;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.rule {
  width: 48px;
  height: 2px;
  border: 0;
  margin: 4px auto;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 999px;
}

/* ── Arch frame & cards ── */

.arch-frame {
  position: relative;
  width: 100%;
  border-radius: 999px 999px 16px 16px;
  overflow: hidden;
  background: var(--paper-deep);
  outline: 1px solid rgba(180, 16, 17, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 12px 32px rgba(28, 25, 23, 0.08);
  transition:
    transform 400ms var(--ease-out),
    box-shadow 400ms var(--ease-out),
    outline-color 400ms var(--ease-out);
}

.arch-frame::before {
  content: "";
  display: block;
  aspect-ratio: 4 / 5;
}

.arch-frame.hero::before {
  aspect-ratio: 3 / 4;
}

.arch-frame.wide::before {
  aspect-ratio: 16 / 10;
}

.arch-frame.square::before {
  aspect-ratio: 1;
}

.arch-frame-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

/* ── Frame icons (جای تصویر) ── */

.frame-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18%;
}

.frame-icon::before {
  content: "";
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.65;
  animation: iconGlow 3.2s var(--ease-out) infinite;
}

.frame-icon svg {
  position: relative;
  z-index: 1;
  width: 52%;
  height: 52%;
  color: var(--brand);
  filter: drop-shadow(0 4px 12px rgba(180, 16, 17, 0.15));
  transition:
    transform 400ms var(--ease-out),
    color 400ms var(--ease-out);
}

.frame-icon--sm svg {
  width: 46%;
  height: 46%;
}

.frame-icon--lg svg {
  width: 58%;
  height: 58%;
}

.catalog-page.is-active .frame-icon svg {
  animation: iconFloat 4s var(--ease-out) infinite;
}

.glass-card:hover .frame-icon svg {
  animation: none;
  transform: scale(1.1) translateY(-4px);
  color: var(--brand-hover);
}

.page-cover .frame-icon svg {
  color: var(--accent);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.25));
}

.page-cover .frame-icon::before {
  background: radial-gradient(circle, rgba(215, 168, 110, 0.35) 0%, transparent 70%);
}

.frame-icon--iran svg {
  color: #239f40;
}

.frame-icon--iraq svg {
  color: #ce1126;
}

.frame-icon--match svg {
  color: var(--accent);
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes iconGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.85;
  }
}

.arch-card {
  width: 100%;
  max-width: 220px;
}

.glass-card {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: center;
  border-radius: 999px 999px 16px 16px;
  transition: transform 380ms var(--ease-out);
}

.glass-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.glass-card:hover .arch-frame {
  outline-color: rgba(215, 168, 110, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 20px 40px rgba(180, 16, 17, 0.12);
}

.glass-label {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(180, 16, 17, 0.82);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    background 250ms var(--ease-out),
    padding 250ms var(--ease-out);
}

.glass-card:hover .glass-label {
  background: rgba(180, 16, 17, 0.92);
  padding-block: 10px;
}

.glass-label .icon-sm {
  opacity: 0;
  transform: translateX(4px);
  transition:
    opacity 250ms var(--ease-out),
    transform 250ms var(--ease-out);
}

.glass-card:hover .glass-label .icon-sm {
  opacity: 1;
  transform: translateX(0);
}

/* ── Card grid (فهرست) ── */

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 320px;
  margin-top: 8px;
}

.card-grid .glass-card {
  max-width: none;
}

.card-grid .arch-frame::before {
  aspect-ratio: 3 / 4;
}

.card-grid .glass-label {
  font-size: 11px;
  inset-inline: 8px;
  bottom: 8px;
  padding: 6px 8px;
}

/* ── Product grid ── */

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.product-tile {
  position: relative;
}

.product-tile .glass-label {
  font-size: 10px;
  padding: 6px 8px;
}

.product-tile .glass-card:hover .arch-frame {
  transform: scale(1.03);
}

/* ── Decorative ── */

.deco-spark {
  position: absolute;
  color: var(--brand);
  opacity: 0.35;
  pointer-events: none;
  animation: sparkFloat 4s var(--ease-out) infinite;
}

.deco-spark svg {
  width: 14px;
  height: 14px;
}

.deco-1 {
  top: 18%;
  left: 12%;
  animation-delay: 0s;
}

.deco-2 {
  top: 28%;
  right: 10%;
  animation-delay: 1.2s;
  color: var(--accent);
}

.deco-3 {
  bottom: 22%;
  left: 8%;
  animation-delay: 2s;
}

@keyframes sparkFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.35;
  }

  50% {
    transform: translateY(-8px) rotate(12deg);
    opacity: 0.65;
  }
}

.img-slot-pulse {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(215, 168, 110, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(215, 168, 110, 0);
  }
}

/* ── Cover ── */

.page-cover {
  background:
    radial-gradient(circle at 70% 15%, rgba(215, 168, 110, 0.28), transparent 45%),
    linear-gradient(168deg, #c41819 0%, var(--brand) 38%, var(--brand-hover) 100%);
  color: #faf6f0;
}

.page-cover .kicker,
.page-cover .display {
  color: #fff;
}

.page-cover .kicker-en {
  color: rgba(215, 168, 110, 0.9);
}

.page-cover .subtitle,
.page-cover .body {
  color: rgba(255, 252, 245, 0.82);
}

.page-cover .arch-frame {
  background: rgba(255, 255, 255, 0.08);
  outline-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.page-cover .arch-frame-label {
  color: rgba(255, 252, 245, 0.5);
}

/* ── Invite (الکـامپ) ── */

.page-invite {
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(215, 168, 110, 0.18), transparent 55%),
    linear-gradient(175deg, #fffdf8 0%, #f7f3ec 48%, #efe8dc 100%);
}

.page-invite::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(215, 168, 110, 0.45);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
}

.page-invite::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(180, 16, 17, 0.12);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
}

.invite-ornament {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(215, 168, 110, 0.06) 50%, transparent 60%),
    radial-gradient(circle at 12% 88%, rgba(180, 16, 17, 0.06), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(215, 168, 110, 0.1), transparent 26%);
  pointer-events: none;
  z-index: 0;
}

.invite-surface {
  z-index: 2;
  gap: 10px;
  padding-block: clamp(28px, 6vw, 40px);
}

.invite-eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--accent);
}

.invite-seal {
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(215, 168, 110, 0.4);
  box-shadow:
    0 10px 28px rgba(28, 25, 23, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.invite-seal img {
  display: block;
  width: min(140px, 46vw);
  height: auto;
  margin: 0 auto;
}

.invite-title {
  margin: 4px 0 0;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand);
  text-wrap: balance;
  max-width: 16ch;
}

.invite-event {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.invite-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 6px 0;
  padding: 16px 28px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(180, 16, 17, 0.95), #8e0c0d);
  color: #fffdf8;
  box-shadow:
    0 16px 36px rgba(180, 16, 17, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.invite-date-block::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 120%;
  height: 80%;
  background: linear-gradient(115deg, rgba(215, 168, 110, 0.25), transparent 55%);
  pointer-events: none;
}

.invite-date-num {
  position: relative;
  font-size: clamp(36px, 9vw, 48px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.invite-date-label {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.invite-meta {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}

.invite-meta li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid rgba(215, 168, 110, 0.28);
  font-size: 13px;
  color: var(--ink);
  backdrop-filter: blur(8px);
  transition:
    transform 250ms var(--ease-out),
    border-color 250ms var(--ease-out);
}

.invite-meta li:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 16, 17, 0.3);
}

.invite-meta a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.invite-meta-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-muted);
  color: var(--brand);
  flex-shrink: 0;
}

.invite-note {
  margin: 4px 0 0;
  max-width: 28ch;
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.invite-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  margin-top: 4px;
}

.invite-actions .cta-pill {
  width: 100%;
  justify-content: center;
}

.page-invite .cta-outline {
  background: rgba(255, 255, 255, 0.55);
}

.monogram {
  margin: 0;
  font-size: clamp(48px, 12vw, 72px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.cover-logo-wrap {
  position: relative;
  padding: clamp(18px, 4vw, 28px) clamp(24px, 6vw, 36px);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    transform 400ms var(--ease-out),
    box-shadow 400ms var(--ease-out);
}

.cover-logo-wrap:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cover-logo {
  display: block;
  width: min(240px, 72vw);
  height: auto;
  margin: 0 auto;
  filter: none;
  transition: transform 400ms var(--ease-out);
}

.cover-logo-wrap:hover .cover-logo {
  transform: scale(1.03);
}

.catalog-page.is-active .cover-logo-wrap {
  animation: logoGlow 3s var(--ease-out) infinite;
}

@keyframes logoGlow {
  0%,
  100% {
    box-shadow:
      0 20px 48px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  50% {
    box-shadow:
      0 24px 56px rgba(0, 0, 0, 0.22),
      0 0 0 1px rgba(215, 168, 110, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
}

/* ── CTA ── */

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--glass-blur));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 250ms var(--ease-out),
    transform 250ms var(--ease-out),
    box-shadow 250ms var(--ease-out);
}

.cta-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.cta-pill:active {
  transform: scale(0.97);
}

.cta-pill .icon-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  transition: background 250ms var(--ease-out);
}

.cta-pill:hover .icon-ring {
  background: rgba(215, 168, 110, 0.35);
}

.cta-solid {
  background: var(--brand);
  border-color: transparent;
}

.cta-solid:hover {
  background: var(--brand-hover);
}

.cta-outline {
  background: transparent;
  border: 1px solid rgba(180, 16, 17, 0.28);
  color: var(--brand);
  padding-inline: 18px;
}

.cta-outline:hover {
  background: var(--brand-muted);
  filter: none;
  box-shadow: none;
}

.cta-blink {
  animation: blink 2.4s var(--ease-out) infinite;
}

@keyframes blink {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(215, 168, 110, 0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(215, 168, 110, 0.15);
  }
}

/* ── Timeline ── */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 300px;
}

.timeline li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--brand-muted);
  border: 1px solid transparent;
  transition:
    background 250ms var(--ease-out),
    border-color 250ms var(--ease-out),
    transform 250ms var(--ease-out);
}

.timeline li:hover {
  background: rgba(180, 16, 17, 0.12);
  border-color: rgba(215, 168, 110, 0.35);
  transform: translateX(-4px);
}

.timeline .step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  color: var(--brand);
  flex-shrink: 0;
}

/* ── Chips & contact channels ── */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 320px;
}

.chip-list li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-muted);
  border: 1px solid rgba(215, 168, 110, 0.35);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.contact-channels {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
  transition:
    transform 250ms var(--ease-out),
    border-color 250ms var(--ease-out),
    background 250ms var(--ease-out);
}

.contact-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(180, 16, 17, 0.35);
  background: #fff;
}

.contact-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-muted);
  color: var(--brand);
  flex-shrink: 0;
}

.contact-chip-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.contact-chip-meta b {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 700;
}

.contact-chip-meta span {
  font-size: 13px;
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.contact-actions .cta-pill {
  width: 100%;
  justify-content: center;
}

/* ── Hotspot ── */

.hotspot {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(215, 168, 110, 0.92);
  backdrop-filter: blur(8px);
  color: var(--brand-hover);
  box-shadow: 0 4px 16px rgba(180, 16, 17, 0.25);
  transform: translate(50%, -50%);
  z-index: 4;
  display: grid;
  place-items: center;
  animation: hotspotPulse 2.4s var(--ease-out) infinite;
  transition: transform 250ms var(--ease-out);
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(215, 168, 110, 0.4);
  animation: hotspotRing 2.4s var(--ease-out) infinite;
}

.hotspot:hover {
  transform: translate(50%, -50%) scale(1.12);
  background: #fff;
}

.hotspot.reveal-item[data-from="scale"] {
  transform: translate(50%, -50%) scale(0.7);
}

.catalog-page.is-active .hotspot.reveal-item {
  animation: revealHotspot 680ms var(--ease-out) forwards;
}

@keyframes revealHotspot {
  to {
    opacity: 1;
    transform: translate(50%, -50%) scale(1);
  }
}

/* ── Stagger reveal ── */

.reveal-item {
  opacity: 0;
  will-change: transform, opacity;
}

.catalog-page.is-active .reveal-item {
  animation: revealSlide 680ms var(--ease-out) forwards;
}

.reveal-item[data-d="0"] {
  animation-delay: 0ms;
}

.reveal-item[data-d="1"] {
  animation-delay: 90ms;
}

.reveal-item[data-d="2"] {
  animation-delay: 180ms;
}

.reveal-item[data-d="3"] {
  animation-delay: 270ms;
}

.reveal-item[data-d="4"] {
  animation-delay: 360ms;
}

.reveal-item[data-d="5"] {
  animation-delay: 450ms;
}

.reveal-item[data-d="6"] {
  animation-delay: 540ms;
}

.reveal-item[data-d="7"] {
  animation-delay: 620ms;
}

.reveal-item[data-from="up"] {
  transform: translateY(28px);
}

.reveal-item[data-from="down"] {
  transform: translateY(-20px);
}

.reveal-item[data-from="right"] {
  transform: translateX(36px);
}

.reveal-item[data-from="left"] {
  transform: translateX(-36px);
}

.reveal-item[data-from="scale"] {
  transform: scale(0.88);
}

@keyframes revealSlide {
  to {
    opacity: 1;
    transform: translate(0) scale(1);
  }
}

/* ── Dock ── */

.dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: var(--chrome);
  border: 1px solid rgba(215, 168, 110, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.dock-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #faf6f0;
  display: grid;
  place-items: center;
  transition:
    background 200ms var(--ease-out),
    color 200ms var(--ease-out),
    transform 150ms var(--ease-out);
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
  transform: translateY(-2px);
}

.dock-btn:active {
  transform: scale(0.92);
}

.dock-btn.gold {
  background: rgba(215, 168, 110, 0.18);
  color: var(--accent);
}

.dock-btn.gold:hover {
  background: rgba(215, 168, 110, 0.32);
}

.dock-btn.soon {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.dock-progress {
  width: 52px;
  height: 3px;
  margin: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.dock-progress span {
  display: block;
  height: 100%;
  width: var(--progress, 14%);
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: inherit;
  transition: width 460ms var(--spring);
}

.dock .folio {
  min-width: 54px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  padding: 0 6px;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ── Popup (glass) ── */

.veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px 16px;
  background: rgba(12, 10, 9, 0.72);
  backdrop-filter: blur(10px);
}

.veil.open {
  display: grid;
}

.popup {
  position: relative;
  width: min(400px, 94vw);
  padding: 1px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(215, 168, 110, 0.55), rgba(180, 16, 17, 0.35));
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
  animation: popIn 320ms var(--ease-out);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-inner {
  position: relative;
  padding: 1.35rem 1.15rem 1.4rem;
  border-radius: calc(20px - 1px);
  background: #fffdf8;
  text-align: start;
}

.popup h2 {
  margin: 0 0 0.65rem;
  padding-inline-end: 2.25rem;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--brand);
}

.popup p {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.popup-body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.popup-body p {
  margin: 0 0 12px;
}

.pop-close {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.06);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

.pop-close:hover {
  background: rgba(180, 16, 17, 0.12);
  color: var(--brand);
}

.popup-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: center;
}

.popup-links a {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-muted);
  border: 1px solid rgba(215, 168, 110, 0.3);
}

.popup-links a:hover {
  background: rgba(180, 16, 17, 0.12);
}

body.is-overlay-open .page-nav {
  visibility: hidden;
  pointer-events: none;
}

.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition:
    background 200ms var(--ease-out),
    transform 150ms var(--ease-out);
}

.close-btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

/* ── Thumbnails ── */

.thumbs-veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(20, 18, 16, 0.65);
  backdrop-filter: blur(10px);
}

.thumbs-veil.open {
  display: grid;
}

.thumbs-panel {
  position: relative;
  width: min(560px, 94vw);
  max-height: 80dvh;
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.thumbs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 12px;
}

.thumbs-head .pop-close {
  position: static;
}

.thumbs-panel h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}

.thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.thumb {
  aspect-ratio: var(--page-ratio);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 8px;
  background: var(--paper-deep);
  font-size: 11px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition:
    border-color 200ms var(--ease-out),
    background 200ms var(--ease-out),
    transform 150ms var(--ease-out);
}

.thumb:hover {
  border-color: rgba(215, 168, 110, 0.5);
  background: var(--brand-muted);
  transform: translateY(-3px);
}

.thumb.is-current {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(180, 16, 17, 0.08);
}

.thumb-num {
  font-weight: 700;
  font-size: 14px;
  color: var(--brand);
}

/* ── Swipe hint ── */

.swipe-hint {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--chrome);
  border: 1px solid rgba(215, 168, 110, 0.2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  animation: hintFade 3.5s var(--ease-out) 1.5s forwards;
}

.swipe-hint .icon {
  width: 16px;
  height: 16px;
  animation: hintSlide 1.8s var(--ease-out) infinite;
}

@keyframes hintSlide {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-6px);
  }
}

@keyframes hintFade {
  0%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.swipe-hint.is-hidden {
  display: none;
}

@keyframes hotspotPulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(180, 16, 17, 0.25);
  }

  50% {
    box-shadow: 0 4px 24px rgba(215, 168, 110, 0.45);
  }
}

@keyframes hotspotRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.lab {
  display: none;
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .catalog-page,
  .reveal-item,
  .popup,
  .deco-spark,
  .frame-icon svg,
  .frame-icon::before,
  .cover-logo-wrap,
  .hotspot,
  .hotspot::before,
  .cta-blink,
  .swipe-hint,
  .nav-ripple {
    animation: none !important;
    transition: none !important;
  }

  .catalog-page {
    transform: none !important;
  }

  .catalog-page.is-active .reveal-item {
    opacity: 1;
    transform: none;
  }
}

/* ── Print ── */

.print-stack {
  display: none;
}

@media print {
  body {
    background: #fff;
    overflow: visible;
  }

  .top,
  .dock,
  .page-nav,
  .swipe-hint,
  .lab,
  .veil,
  .thumbs-veil,
  .stage,
  .deco-spark {
    display: none !important;
  }

  .print-stack {
    display: block !important;
  }

  .print-stack .catalog-page {
    position: relative;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    page-break-after: always;
    break-after: page;
    width: 100%;
    max-width: 210mm;
    margin: 0 auto;
    aspect-ratio: auto;
    min-height: 260mm;
    border-radius: 0;
    box-shadow: none;
  }

  .print-stack .catalog-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Official PDF page art (12 spreads) ── */

.catalog-from-pdf .stage {
  padding: 88px 16px 112px;
}

.page-art {
  display: flex;
  flex-direction: column;
  background: #1a1210;
}

.page-art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #1a1210;
  flex: 1 1 auto;
  min-height: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.page-art:has(.page-art-links) .page-art-img {
  height: auto;
  max-height: calc(100% - 9.5rem);
  flex: 1 1 auto;
}

.page-art-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem 0.7rem;
  background: linear-gradient(180deg, #8e0c0d, var(--brand));
  border-top: 1px solid rgba(215, 168, 110, 0.35);
  flex-shrink: 0;
  z-index: 2;
}

.art-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.14);
  color: #fff8ef;
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.25;
  border: 1px solid rgba(215, 168, 110, 0.28);
}

.art-link--primary {
  background: var(--accent);
  color: #3b2410;
  border-color: transparent;
  font-weight: 600;
}

.art-link--ghost {
  grid-column: 1 / -1;
  align-items: center;
  text-align: center;
  background: transparent;
  border-style: dashed;
  color: #fff8ef;
}

.art-link-k {
  opacity: 0.85;
  font-size: 0.62rem;
  color: #f6e2c0;
}

.art-link--primary .art-link-k {
  color: #6b4420;
  opacity: 1;
}

.art-link span[dir="ltr"] {
  color: inherit;
  font-weight: 700;
}

.thumb--art {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.55rem;
  align-items: center;
  text-align: start;
  padding: 0.45rem;
}

.thumb-img {
  grid-row: 1 / span 2;
  width: 64px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  background: #222;
}

.thumb--art .thumb-num {
  font-size: 0.7rem;
  opacity: 0.7;
}

.thumb--art .thumb-label {
  font-size: 0.78rem;
}

html[dir="ltr"] .page-nav.prev {
  left: auto;
  right: calc(100% + 14px);
}

html[dir="ltr"] .page-nav.next {
  right: auto;
  left: calc(100% + 14px);
}
