/* pdf-viewer.css — the brochure viewer: a full-screen surface that opens a
   PDF in place, with its own Download action, instead of a link that
   navigates the reader off the site. Pairs with pdf-viewer.js.

   Modelled on film-modal.css's `.em-reel` — same scrim, same head/stage
   grid, same entrance timing — because a reader who has already learned
   what a full-screen surface on this site feels like from the film player
   should not have to learn it twice for a document. `.em-pdf` is its own
   name (not `.em-reel`) because it is a different component with a
   different job: see the class-name-is-an-interface note in film-modal.css.

   The file depends on no page token beyond the shared z-index scale, and
   even that carries a literal fallback, because this pair is meant to be
   loaded by any page on the site. */

.em-pdf,
.em-pdf * { box-sizing: border-box; }

/* Same tier as the film lightbox (--z-film): both are full-screen surfaces
   that must sit above everything else, including another open dialog such
   as the community brochure panel a PDF trigger can live inside. */
.em-pdf {
  position: fixed; inset: 0; z-index: var(--z-film, 140);
  display: grid; grid-template-rows: auto 1fr; gap: clamp(12px, 2vw, 20px);
  padding: clamp(16px, 3vw, 34px);
  padding-top: calc(clamp(16px, 3vw, 34px) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(clamp(16px, 3vw, 34px) + env(safe-area-inset-bottom, 0px));
}
.em-pdf[hidden] { display: none; }

.em-pdf__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: rgba(7,7,7,.94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .5s ease;
}
.em-pdf.is-open .em-pdf__scrim { opacity: 1; }

.em-pdf__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; min-width: 0;
  opacity: 0; transform: translateY(.5rem);
  transition: opacity .5s ease .1s, transform .6s var(--em-ease-exit, cubic-bezier(.22,1,.36,1)) .1s;
}
.em-pdf.is-open .em-pdf__head { opacity: 1; transform: none; }

.em-pdf__id { min-width: 0; }

.em-pdf__eyebrow {
  margin: 0 0 6px;
  font-family: var(--em-body, 'Source Sans 3', 'Segoe UI', system-ui, sans-serif);
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--unveil-gold, var(--p-metal-soft));
}
.em-pdf__eyebrow[hidden] { display: none; }
.em-pdf__t {
  margin: 0; min-width: 0;
  font-family: var(--em-display, Optima, 'Optima Nova', Candara, 'Trebuchet MS', sans-serif);
  font-weight: 400; font-size: clamp(1.05rem, 3.2vw, 1.6rem); line-height: 1.18;
  letter-spacing: -.01em; color: var(--em-text-on-inverse, #fff);
}

.em-pdf__actions {
  flex: none; display: flex; align-items: center; gap: 8px;
}

.em-pdf__dl {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--em-text-on-inverse, #fff); color: var(--em-night, #111);
  font-family: var(--em-body, 'Source Sans 3', 'Segoe UI', system-ui, sans-serif);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
  transition: background .3s ease, transform .3s ease;
}
.em-pdf__dl svg { width: 13px; height: 13px; display: block; flex: none; }
.em-pdf__dl:hover { background: var(--em-surface-gold-soft); transform: translateY(-1px); }
.em-pdf__dl:focus-visible { outline: 2px solid var(--unveil-gold, var(--p-metal-soft)); outline-offset: 2px; }

.em-pdf__close {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer;
  color: rgba(var(--em-rgb-on-inverse, 255,255,255), .78);
  transition: color .3s ease, background .3s ease;
  -webkit-appearance: none; appearance: none;
}
.em-pdf__close:hover { color: var(--em-text-on-inverse, #fff); background: rgba(var(--em-rgb-on-inverse, 255,255,255), .09); }
.em-pdf__close:focus-visible { outline: 2px solid var(--unveil-gold, var(--p-metal-soft)); outline-offset: 2px; }
.em-pdf__close svg { width: 14px; height: 14px; display: block; }

/* The stage centres the frame and never lets it exceed the screen in either
   direction. min-height:0 because a grid row floors at max-content and an
   iframe's max-content height is unbounded. */
.em-pdf__stage {
  min-height: 0; min-width: 0;
  display: grid; place-items: center;
}
.em-pdf__frame {
  display: block; width: 100%; height: 100%;
  max-width: min(1100px, 100%);
  background: #fff; border: 0; border-radius: var(--em-r, 2px);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  opacity: 0; transform: scale(.985);
  transition: opacity .55s ease .06s, transform .7s var(--em-ease-exit, cubic-bezier(.22,1,.36,1)) .06s;
}
.em-pdf.is-open .em-pdf__frame { opacity: 1; transform: none; }

@media (max-width: 599px) {
  .em-pdf__dl span { display: none; }
  .em-pdf__dl { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .em-pdf__scrim, .em-pdf__head, .em-pdf__frame,
  .em-pdf__dl, .em-pdf__close { transition: none; }
  .em-pdf__dl:hover { transform: none; }
}
