/* Minimal reset + shared primitives. Family CSS builds on this. */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* Raleway defaults to oldstyle figures; the live site forces lining figures
     document-wide, so every digit on the site depends on this. */
  font-variant-numeric: lining-nums proportional-nums;
}
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.45;
  /* Backstop against a horizontal scrollbar: zero-blocks routinely place
     elements past the viewport edge (a centred heading in an over-wide box,
     decorative art bleeding off-screen). Live wraps every record in
     .t-records__overflow-hidden. NOTE this only suppresses the scrollbar — the
     layout overflow still counts towards document scrollWidth, which makes
     full-page screenshots too wide. Each block that bleeds must also clip
     itself (`overflow: clip` on the block), the way the live wrapper does. */
  overflow-x: clip;
  overflow-y: visible;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

.container { max-width: var(--w-content); margin-inline: auto; padding-inline: 20px; }

/* entrance animations (Tilda-style fadeInUp etc.), triggered by IntersectionObserver in main.js.
   Live blocks carry data-animate-distance / -duration; override per element with
   --anim-distance / --anim-duration rather than writing new keyframes.

   The settled state keeps a translate3d rather than `none` on purpose: live
   leaves one behind, which keeps the element on its own composited layer, and
   that switches text from subpixel to grayscale antialiasing. Dropping it makes
   every animated headline render with colour fringing the reference lacks. */
[data-anim] { opacity: 0; --anim-distance: 40px; --anim-duration: .8s; }
[data-anim].in-view { opacity: 1; }
[data-anim="fadeup"] {
  transform: translate3d(0, var(--anim-distance), 0);
  transition: opacity var(--anim-duration) ease, transform var(--anim-duration) ease;
}
[data-anim="fade"] {
  transform: translate3d(0, 0, 0);
  transition: opacity var(--anim-duration) ease;
}
[data-anim="zoomin"] {
  transform: scale3d(.92, .92, 1);
  transition: opacity var(--anim-duration) ease, transform var(--anim-duration) ease;
}
[data-anim="fadeup"].in-view,
[data-anim="zoomin"].in-view { transform: translate3d(0, 0, 0); }
[data-anim-delay="1"] { transition-delay: .15s; }
[data-anim-delay="2"] { transition-delay: .3s; }
[data-anim-delay="3"] { transition-delay: .45s; }
[data-anim-delay="4"] { transition-delay: .6s; }
@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Zero-height marker for an anchor the original put between records (its t215
   record before the t270 helper). Named distinctly: `.rp-anchor` is already an
   event-page heading class (f-ev-utils.css) and must not be collapsed. */
.rp-tail-anchor { display: block; height: 0; font-size: 0; line-height: 0; }

/* A whole zero-block group can be a link (the original emits the group itself as
   an <a>). Keep it visually identical to the div it replaces — the UA's underline
   and link colour are not what live renders (checked on /partners: text-decoration
   none, geometry unchanged). */
a.zb__g { color: inherit; text-decoration: none; }

/* --- popup open state -----------------------------------------------------
   The per-page sheets carry the resting popup rules (`.x-t-popup{display:none;
   opacity:0}` and the container's transform) but the *open* state was dropped in
   porting, so nothing could ever show. These are the platform's own rules
   (tilda-popup-1.1.min.css) under our `x-` prefix; main.js adds the classes.
   Doubled selectors so they win over a page sheet loaded after this one. */
.x-t-body_popupshowed { height: 100vh; min-height: 100vh; overflow: hidden; }
.x-t-popup.x-t-popup_show { opacity: 1; }
.x-t-popup__container.x-t-popup__container-animated {
  transition: transform .3s ease-in-out;
}
.x-t-popup_show .x-t-popup__container { transform: translateY(-50%); }
.x-t-popup_show .x-t-popup__container.x-t-popup__container-static {
  transform: translateY(0);
}
/* zero-block popups (t1093) fade instead of sliding — the original swaps the
   transition on `data-anim="fadein"`; the class it adds at runtime is not in our
   markup, so key off the attribute the markup does carry. */
.x-t-popup[data-anim="fadein"] .x-t-popup__container {
  opacity: 0;
  transition: opacity .3s ease-in-out;
}
.x-t-popup[data-anim="fadein"].x-t-popup_show .x-t-popup__container { opacity: 1; }
.x-t-popup[data-anim="fadein"].x-t-popup_show .x-t-popup__container:not(.x-t-popup__container-static) {
  transform: translateY(-50%);
}

/* A zero-block popup keeps its body in a separate record that the page hides
   (`[data-popup-content]{display:none}` in the family sheet); main.js moves that
   record into the popup at init, exactly as the original's t1093 does, so inside
   a popup it has to be visible again. Two classes deep so it wins wherever the
   family sheet sits in the cascade. */
.x-t-popup .zb[data-popup-content],
.x-t-popup [data-popup-content] { display: block; }
