:root {
  --leaf: #315f4f;
  --leaf-deep: #183c33;
  --sage: #d5e8dd;
  --mint: #eff8f2;
  --rose: #e3b5ad;
  --pearl: #fbfbf7;
  --ink: #21312d;
  --muted: #687872;
  --line: rgba(49, 95, 79, 0.16);
  --panel: rgba(251, 251, 247, 0.76);
  --shadow: 0 22px 58px rgba(24, 60, 51, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--mint);
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.is-loading {
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(180deg, rgba(251, 251, 247, 0.5), rgba(239, 248, 242, 0.38)),
    repeating-linear-gradient(
      112deg,
      rgba(49, 95, 79, 0.08) 0,
      rgba(49, 95, 79, 0.08) 1px,
      transparent 1px,
      transparent 54px
    );
}

body::after {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 34vh;
  content: "";
  background:
    linear-gradient(180deg, rgba(239, 248, 242, 0), rgba(213, 232, 221, 0.74)),
    linear-gradient(90deg, rgba(227, 181, 173, 0.22), rgba(49, 95, 79, 0.08));
}

a {
  color: inherit;
}

.media-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--pearl);
  opacity: 0;
  pointer-events: none;
  transition: opacity 760ms cubic-bezier(0.33, 1, 0.68, 1);
}

.media-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(251, 251, 247, 0.14), rgba(239, 248, 242, 0.28)),
    linear-gradient(0deg, rgba(24, 60, 51, 0.06), rgba(24, 60, 51, 0));
}

.backdrop-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 70% 50%;
  filter: blur(4px) saturate(1.06) brightness(1.04);
  opacity: 0.56;
  transform: scale(1.045);
}

body.is-ready .media-backdrop,
html.has-viewed-brochure .media-backdrop {
  opacity: 1;
}

.intro-sequence {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  pointer-events: auto;
  background: var(--pearl);
  opacity: 1;
  visibility: visible;
}

.intro-sequence::before,
.intro-sequence::after {
  position: absolute;
  content: "";
}

.intro-sequence::before {
  display: none;
}

.intro-sequence::after {
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(251, 251, 247, 0.08), rgba(251, 251, 247, 0.2)),
    linear-gradient(0deg, rgba(24, 60, 51, 0.08), rgba(24, 60, 51, 0));
}

.intro-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  transform: scale(1.01);
  filter: none;
}

.intro-sequence.is-playing .intro-media {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 220ms ease,
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-ready .intro-sequence {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 620ms cubic-bezier(0.33, 1, 0.68, 1),
    visibility 0s linear 620ms;
}

body.is-ready .intro-media {
  filter: blur(12px) saturate(1.03) brightness(1.02);
  transform: scale(1.045);
  transition:
    filter 620ms cubic-bezier(0.33, 1, 0.68, 1),
    transform 620ms cubic-bezier(0.33, 1, 0.68, 1);
}

html.has-viewed-brochure .intro-sequence {
  display: none;
}

.shell {
  width: min(100%, 640px);
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(42px, env(safe-area-inset-top)) 18px max(34px, env(safe-area-inset-bottom));
}

body.is-loading .shell {
  pointer-events: none;
}

.hero {
  padding: 8px 4px 26px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--leaf);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand {
  margin: 9px 0 0;
  color: var(--leaf-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 12vw, 5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.93;
}

.rule {
  width: 70px;
  height: 2px;
  margin: 22px auto 24px;
  background: var(--rose);
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.1;
}

.language-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(49, 95, 79, 0.2);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 38px rgba(24, 60, 51, 0.05);
  backdrop-filter: blur(5px);
}

.language-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.language-card {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: center;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  min-height: 78px;
  padding: 14px 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(251, 251, 247, 0.97), rgba(239, 248, 242, 0.78)),
    rgba(251, 251, 247, 0.86);
  box-shadow: 0 10px 26px rgba(24, 60, 51, 0.08);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease,
    background 150ms ease;
  animation: card-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--stagger-index, 0) * 24ms);
}

.language-card:focus-visible,
.language-card:hover {
  border-color: rgba(227, 181, 173, 0.84);
  background:
    linear-gradient(135deg, rgba(251, 251, 247, 0.99), rgba(213, 232, 221, 0.86)),
    rgba(251, 251, 247, 0.96);
  box-shadow: 0 16px 34px rgba(24, 60, 51, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.language-card.is-detected {
  border-color: rgba(227, 181, 173, 0.84);
  box-shadow: 0 12px 30px rgba(227, 181, 173, 0.18);
}

.language-flag {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(24, 60, 51, 0.16);
  border-radius: 50%;
  background: var(--pearl);
  box-shadow:
    inset 0 0 0 2px rgba(251, 251, 247, 0.76),
    0 8px 18px rgba(24, 60, 51, 0.08);
}

.language-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.language-text {
  display: block;
  min-width: 0;
}

.detected-badge {
  position: absolute;
  top: 9px;
  right: 10px;
  color: var(--leaf);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

[dir="rtl"] .detected-badge {
  right: auto;
  left: 10px;
}

.language-native {
  display: block;
  min-width: 0;
  color: var(--leaf-deep);
  font-size: clamp(0.98rem, 4vw, 1.08rem);
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.language-english {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-page="viewer"] {
  min-height: 100vh;
  background: var(--mint);
}

.viewer-shell {
  display: grid;
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.viewer-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  min-height: 58px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  border: 1px solid rgba(49, 95, 79, 0.16);
  border-radius: 8px;
  background: rgba(251, 251, 247, 0.92);
  box-shadow: 0 12px 34px rgba(24, 60, 51, 0.09);
  backdrop-filter: blur(12px);
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(49, 95, 79, 0.16);
  border-radius: 7px;
  background: var(--pearl);
  color: var(--leaf-deep);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.toolbar-button-text {
  width: auto;
  min-width: 44px;
  padding: 0 12px;
  background: var(--leaf-deep);
  color: var(--pearl);
}

.toolbar-button:focus-visible,
.toolbar-button:hover {
  border-color: rgba(227, 181, 173, 0.88);
  outline: none;
}

.viewer-title {
  min-width: 0;
  text-align: center;
}

.viewer-title h1 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.viewer-status {
  display: grid;
  min-height: 520px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border: 1px solid rgba(49, 95, 79, 0.16);
  border-radius: 8px;
  background: rgba(251, 251, 247, 0.84);
  box-shadow: var(--shadow);
  text-align: center;
}

.status-symbol {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border: 1px solid rgba(49, 95, 79, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(227, 181, 173, 0.86), rgba(213, 232, 221, 0.92)),
    var(--mint);
}

.viewer-status p {
  max-width: 560px;
  margin: 0;
  color: var(--leaf-deep);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.35;
}

.viewer-status span {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.pdf-viewer-pages {
  display: grid;
  gap: 10px;
  justify-items: center;
  width: 100%;
  overflow-x: auto;
  padding: 10px 0 24px;
  overscroll-behavior-x: contain;
}

.pdf-viewer-page {
  position: relative;
  display: grid;
  width: max-content;
  min-width: 100%;
  justify-items: center;
}

.pdf-viewer-page canvas {
  display: block;
  height: auto;
  background: var(--pearl);
  box-shadow: 0 1px 8px rgba(24, 60, 51, 0.18);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .brand {
    font-size: clamp(2.1rem, 9.2vw, 2.65rem);
  }

  .language-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .shell {
    padding: 30px 12px 24px;
  }

  .hero {
    padding-bottom: 20px;
  }

  .language-panel {
    padding: 10px;
  }

  .language-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .language-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    min-height: 74px;
    padding: 12px 10px;
  }

  .language-flag {
    width: 34px;
    height: 34px;
  }

  .viewer-shell {
    padding: 10px;
    gap: 10px;
  }

  .viewer-toolbar {
    min-height: 52px;
    padding: 8px 10px;
  }

  .toolbar-button {
    width: 34px;
    min-height: 34px;
  }

  .toolbar-button-text {
    width: auto;
    min-width: 40px;
  }

  .viewer-status {
    min-height: 440px;
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-sequence {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
