/* ============================================================================
   SRAtix hosted registration page: header, hero band, footer, consent banner
   and return bar around the real embed.

   Driven by the same tokens as the widget (--sratix-*), so an event theme
   (sratix-theme-<name>.css, loaded before this file) restyles the whole page.
   A theme may also set the optional page tokens below; each falls back to a
   widget token, so a theme that sets none still produces a coherent page.

   Optional page tokens (all unset by default):
     --sratix-hp-header-bg  --sratix-hp-header-fg  --sratix-hp-header-border
     --sratix-hp-topbar-bg  --sratix-hp-topbar-fg  --sratix-hp-topbar-border
     --sratix-hp-topbar-accent
     --sratix-hp-logo-height  --sratix-hp-logo-max-width
     --sratix-hp-hero-bg    --sratix-hp-hero-fg    --sratix-hp-hero-accent
     --sratix-hp-hero-text  --sratix-hp-hero-overlay
     --sratix-hp-hero-transform  --sratix-hp-hero-tracking
     --sratix-hp-hero-image-clip
     --sratix-hp-footer-bg  --sratix-hp-footer-fg  --sratix-hp-footer-muted
     --sratix-hp-heading-font  --sratix-hp-heading-weight
     --sratix-hp-menu-transform  --sratix-hp-menu-weight
     --sratix-hp-button-bg  --sratix-hp-button-fg  --sratix-hp-button-transform
     --sratix-hp-button-tracking  --sratix-hp-button-weight
   ========================================================================= */

:root {
  --hp-header-bg: var(--sratix-hp-header-bg, var(--sratix-navy-light));
  --hp-header-fg: var(--sratix-hp-header-fg, var(--sratix-text));
  --hp-header-border: var(--sratix-hp-header-border, var(--sratix-border-h));
  --hp-topbar-bg: var(--sratix-hp-topbar-bg, var(--hp-header-bg));
  --hp-topbar-fg: var(--sratix-hp-topbar-fg, var(--hp-header-fg));
  --hp-topbar-border: var(--sratix-hp-topbar-border, var(--hp-header-border));
  --hp-topbar-accent: var(--sratix-hp-topbar-accent, var(--sratix-primary));
  --hp-hero-bg: var(--sratix-hp-hero-bg, var(--sratix-navy-mid));
  --hp-hero-fg: var(--sratix-hp-hero-fg, var(--sratix-text-strong));
  --hp-hero-accent: var(--sratix-hp-hero-accent, var(--sratix-primary));
  --hp-hero-text: var(--sratix-hp-hero-text, var(--sratix-text));
  --hp-footer-bg: var(--sratix-hp-footer-bg, var(--sratix-navy-mid));
  --hp-footer-fg: var(--sratix-hp-footer-fg, var(--sratix-text));
  --hp-footer-muted: var(--sratix-hp-footer-muted, var(--sratix-text-muted));
  --hp-heading-font: var(--sratix-hp-heading-font, var(--sratix-font));
  --hp-heading-weight: var(--sratix-hp-heading-weight, 700);
  --hp-button-bg: var(--sratix-hp-button-bg, var(--sratix-primary));
  --hp-button-fg: var(--sratix-hp-button-fg, var(--sratix-on-accent));
  --hp-wide: 1180px;
}

html { -webkit-text-size-adjust: 100%; }

.sx-hp {
  margin: 0;
  background: var(--sratix-navy);
  color: var(--sratix-text);
  font-family: var(--sratix-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.sx-hp *, .sx-hp *::before, .sx-hp *::after { box-sizing: border-box; }
/* A link takes the colour of its surroundings, except a link styled as a button:
   `.sx-hp a` (0,1,1) used to beat `.sx-hp-button` (0,1,0), so the return link kept
   the bar's text colour (navy on the IHF gradient) instead of the theme's button
   text colour (--hp-button-fg). :where() leaves this rule at the specificity it
   has for every other link. */
.sx-hp a:where(:not(.sx-hp-button)) { color: inherit; }
.sx-hp :focus-visible { outline: 2px solid var(--sratix-primary); outline-offset: 2px; }

.sx-hp-skip {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 10001;
  padding: 10px 16px;
  background: var(--hp-button-bg);
  color: var(--hp-button-fg);
  text-decoration: none;
}
.sx-hp-skip:focus { top: 8px; }

/* Read by screen readers, not drawn: the event name on a tickets-only page. */
.sx-hp-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Preview banner (draft events, opened with the preview token) ── */
.sx-hp-preview {
  background: #fff3cd;
  color: #5c4400;
  font: 600 14px/1.4 system-ui, sans-serif;
  text-align: center;
  padding: 8px 16px;
}

/* ── Header: a thin bar for the language and the way back, then the logo and
   the menu on one row ── */
.sx-hp-header {
  background: var(--hp-header-bg);
  color: var(--hp-header-fg);
  border-bottom: 1px solid var(--hp-header-border);
}
.sx-hp-topbar {
  background: var(--hp-topbar-bg);
  color: var(--hp-topbar-fg);
  border-bottom: 1px solid var(--hp-header-border);
}
.sx-hp-topbar__inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.sx-hp-header__inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.sx-hp-header__inner--solo { justify-content: center; }
.sx-hp-brand { order: 1; display: inline-flex; align-items: center; text-decoration: none; color: inherit; min-height: 44px; }
.sx-hp-brand__logo {
  display: block;
  height: var(--sratix-hp-logo-height, 56px);
  width: auto;
  max-width: var(--sratix-hp-logo-max-width, 240px);
  object-fit: contain;
}
.sx-hp-brand__name { font-family: var(--hp-heading-font); font-weight: var(--hp-heading-weight); font-size: 1.15rem; letter-spacing: 0.02em; }

.sx-hp-nav { order: 2; margin-left: auto; }
.sx-hp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.sx-hp-nav a {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  font-family: var(--hp-heading-font);
  font-size: 14px;
  font-weight: var(--sratix-hp-menu-weight, 500);
  letter-spacing: 0.06em;
  text-transform: var(--sratix-hp-menu-transform, none);
  color: var(--hp-header-fg);
}
.sx-hp-nav a:hover { color: var(--sratix-primary); }
/* Between the phone layout and a wide screen the menu tightens, so an
   eight-item menu stays on the logo's row on a 1024px screen. */
@media (min-width: 901px) and (max-width: 1180px) {
  .sx-hp-header__inner { column-gap: 16px; }
  .sx-hp-nav a { padding: 12px 8px; font-size: 13px; }
}

.sx-hp-lang { margin-right: auto; }
.sx-hp-lang ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.sx-hp-lang a {
  display: block;
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.7;
}
.sx-hp-lang a[aria-current="true"] { opacity: 1; box-shadow: inset 0 -2px 0 var(--hp-topbar-accent); }
.sx-hp-lang a:hover { opacity: 1; }

.sx-hp-back {
  padding: 4px 12px;
  text-decoration: none;
  font-family: var(--hp-heading-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--hp-topbar-border);
  border-radius: var(--sratix-radius-sm);
  color: var(--hp-topbar-fg);
  white-space: nowrap;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-hp-back::before { content: "\2190\00a0"; }
.sx-hp-back:hover { border-color: var(--hp-topbar-accent); color: var(--hp-topbar-accent); }
.sx-hp-topbar :focus-visible { outline-color: var(--hp-topbar-accent); }

.sx-hp-burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hp-header-border);
  border-radius: var(--sratix-radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.sx-hp-burger__bar,
.sx-hp-burger__bar::before,
.sx-hp-burger__bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
  position: relative;
  transition: transform 160ms ease, top 160ms ease, opacity 160ms ease;
}
.sx-hp-burger__bar::before { position: absolute; top: -6px; }
.sx-hp-burger__bar::after { position: absolute; top: 6px; }
.sx-hp-burger[aria-expanded="true"] .sx-hp-burger__bar { background: transparent; }
.sx-hp-burger[aria-expanded="true"] .sx-hp-burger__bar::before { top: 0; transform: rotate(45deg); }
.sx-hp-burger[aria-expanded="true"] .sx-hp-burger__bar::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .sx-hp-topbar__inner { padding: 0 16px; gap: 12px; }
  .sx-hp-back { min-width: 0; max-width: 62%; }
  .sx-hp-header__inner { padding: 8px 16px; gap: 8px 16px; }
  /* The logo and the menu button share the row. */
  .sx-hp-brand { flex: 1 1 calc(100% - 64px); min-width: 0; }
  .sx-hp-header__inner--solo .sx-hp-brand { flex: 0 1 auto; justify-content: center; }
  .sx-hp-brand__logo { height: calc(var(--sratix-hp-logo-height, 56px) * 0.8); max-width: 100%; }
  .sx-hp-burger { display: inline-flex; order: 2; margin-left: auto; }
  /* With script, the menu folds under the burger. Without it, it stays open. */
  .sx-hp-nav { order: 3; width: 100%; margin-left: 0; }
  .sx-hp-nav ul { flex-direction: column; }
  .sx-hp-nav a { padding: 14px 4px; border-top: 1px solid var(--hp-header-border); }
  .sx-hp-js .sx-hp-nav { display: none; }
  .sx-hp-js .sx-hp-nav.is-open { display: block; }
}
@media (max-width: 480px) {
  .sx-hp-back { padding: 4px 10px; }
  .sx-hp-lang a { padding: 8px 6px; }
}

/* ── Hero ── */
.sx-hp-hero {
  position: relative;
  background: var(--hp-hero-bg);
  color: var(--hp-hero-text);
  overflow: hidden;
}
.sx-hp-hero__inner {
  max-width: var(--hp-wide);
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  gap: 24px 40px;
  align-items: center;
}
/* The picture takes a fixed column, so the title gets the width and keeps to
   two lines instead of stacking one word per line. */
.sx-hp-hero--image .sx-hp-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); padding-top: 28px; padding-bottom: 28px; }
.sx-hp-hero__kicker {
  margin: 0 0 8px;
  color: var(--hp-hero-accent);
  font-family: var(--hp-heading-font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sx-hp-hero__title {
  margin: 0 0 14px;
  color: var(--hp-hero-fg);
  font-family: var(--hp-heading-font);
  font-weight: var(--hp-heading-weight);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: var(--sratix-hp-hero-tracking, 0.01em);
  text-transform: var(--sratix-hp-hero-transform, none);
  overflow-wrap: anywhere;
}
.sx-hp-facts { margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, max-content)); gap: 10px 40px; }
.sx-hp-fact { margin: 0; }
.sx-hp-fact dt {
  color: var(--hp-hero-accent);
  font-family: var(--hp-heading-font);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.sx-hp-fact dd { margin: 0; font-size: 1.12rem; line-height: 1.4; color: var(--hp-hero-fg); }
.sx-hp-fact__sub { font-size: 0.95rem; opacity: 0.85; }
.sx-hp-hero__text { max-width: 72ch; line-height: 1.6; }
.sx-hp-hero__text p { margin: 0 0 10px; }
.sx-hp-hero__text:empty { display: none; }
/* Three lines of the description, the rest behind "Read more" (hosted-page.js
   adds the button only when the text is longer). Without script it shows in full. */
.sx-hp-js .sx-hp-hero__text:not(.is-open) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.sx-hp-js .sx-hp-hero__text:not(.is-open) p { margin-bottom: 0; }
.sx-hp-more {
  margin: 6px 0 0;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--hp-hero-accent);
  font-family: var(--hp-heading-font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.sx-hp-more[hidden] { display: none; }
.sx-hp-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.sx-hp-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 300px;
  min-height: 200px;
  object-fit: cover;
  clip-path: var(--sratix-hp-hero-image-clip, none);
}
@media (max-width: 900px) {
  .sx-hp-hero__inner,
  .sx-hp-hero--image .sx-hp-hero__inner { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; }
  /* Below the copy the picture stays short: the tickets come first. */
  .sx-hp-hero__image { min-height: 0; max-height: 160px; clip-path: none; }
}
/* On a phone the picture is left out (it is decoration, alt=""), which brings the
   ticket list about 180px higher. */
@media (max-width: 600px) {
  .sx-hp-hero__image { display: none; }
}

/* ── Registration area: the widget sits in the page flow, not full-bleed ── */
.sx-hp-main { flex: 1 0 auto; background: var(--sratix-navy); }
.sx-hp .sratix-page-wrap {
  width: auto;
  margin-left: 0;
  margin-right: 0;
  min-height: 0;
  z-index: auto;
  background: transparent;
  padding: 32px 24px 72px;
  overflow-x: visible;
}
.sx-hp .sratix-page-inner { max-width: var(--hp-wide); }
@media (max-width: 600px) {
  .sx-hp .sratix-page-wrap { padding: 24px 12px 56px; }
}
/* Tickets only: the header sits right above the ticket heading, with no hero between. */
.sx-hp--tickets-only .sratix-page-wrap { padding-top: 48px; }
@media (max-width: 600px) {
  .sx-hp--tickets-only .sratix-page-wrap { padding-top: 28px; }
}
/* The confirmation's own button leads to this server's root. The return bar replaces it. */
.sx-hp .sratix-exhibitor-confirmation:not(.sratix-payment-refused) .sratix-confirmation-dismiss { display: none !important; }
.sx-hp .sratix-error { color: var(--sratix-text); }

/* ── Buttons ── */
.sx-hp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--sratix-radius-sm);
  background: var(--hp-button-bg);
  color: var(--hp-button-fg);
  font-family: var(--hp-heading-font);
  font-size: 14px;
  font-weight: var(--sratix-hp-button-weight, 600);
  letter-spacing: var(--sratix-hp-button-tracking, 0.04em);
  text-transform: var(--sratix-hp-button-transform, none);
  text-decoration: none;
  cursor: pointer;
}
.sx-hp-button:hover { filter: brightness(1.08); }
.sx-hp-button--quiet {
  background: transparent;
  color: var(--sratix-text);
  border: 1px solid var(--sratix-border-h);
}
.sx-hp-button--quiet:hover { filter: none; border-color: var(--sratix-primary); color: var(--sratix-primary); }
.sx-hp-linkbutton {
  all: unset;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sx-hp-linkbutton:hover { color: var(--sratix-primary); }
.sx-hp-linkbutton:focus-visible { outline: 2px solid var(--sratix-primary); outline-offset: 2px; }

/* ── Return bar (after an order) ── */
.sx-hp-return {
  max-width: var(--hp-wide);
  margin: 16px auto 0;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  border: 1px solid var(--sratix-border-h);
  border-radius: var(--sratix-radius-lg);
  background: var(--sratix-navy-light);
  color: var(--sratix-text);
}
.sx-hp-return__note { margin: 0; font-size: 0.95rem; color: var(--sratix-text-muted); }
/* Inside the confirmation card (hosted-page.js puts it in the card's actions
   row): the card is the frame, so the bar keeps only its layout. */
.sx-hp-return--in-card {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  justify-content: center;
}
.sx-hp-return--in-card .sx-hp-button { min-width: 220px; text-align: center; }
@media (max-width: 600px) {
  .sx-hp-return--in-card { flex-direction: column; }
  .sx-hp-return--in-card .sx-hp-button { width: 100%; }
}

/* ── Footer ── */
.sx-hp-footer {
  flex-shrink: 0;
  background: var(--hp-footer-bg);
  color: var(--hp-footer-fg);
}
.sx-hp-footer__inner { max-width: var(--hp-wide); margin: 0 auto; padding: 36px 24px 28px; }
.sx-hp-footer__groups { display: flex; flex-wrap: wrap; gap: 28px 64px; margin-bottom: 28px; }
.sx-hp-footer__group h2 {
  margin: 0 0 10px;
  font-family: var(--hp-heading-font);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.sx-hp-footer__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sx-hp-footer__group a,
.sx-hp-footer__group .sx-hp-linkbutton { font-size: 0.9rem; text-decoration: none; opacity: 0.9; }
.sx-hp-footer__group a:hover,
.sx-hp-footer__group .sx-hp-linkbutton:hover { text-decoration: underline; opacity: 1; color: inherit; }
.sx-hp-footer__brand { margin: 0; font-size: 0.8rem; color: var(--hp-footer-muted); }
/* The organiser's menu placed in the footer: one centred row on a desktop, the
   link groups and the platform line centred under it. */
.sx-hp-footer__menu { margin: 0 0 28px; padding-bottom: 24px; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.sx-hp-footer__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; }
.sx-hp-footer__menu a {
  font-family: var(--hp-heading-font);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
}
.sx-hp-footer__menu a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sx-hp-footer--menu .sx-hp-footer__groups { justify-content: center; text-align: center; }
.sx-hp-footer--menu .sx-hp-footer__group ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.sx-hp-footer--menu .sx-hp-footer__brand { text-align: center; }
@media (max-width: 600px) {
  .sx-hp-footer__inner { padding: 28px 16px 24px; }
  .sx-hp-footer__menu ul { flex-direction: column; align-items: center; gap: 12px; }
}

/* ── Consent banner ── */
.sx-hp-consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10000;
  width: min(560px, calc(100vw - 32px));
  padding: 18px 20px;
  background: var(--sratix-navy-light);
  color: var(--sratix-text);
  border: 1px solid var(--sratix-border-h);
  border-radius: var(--sratix-radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.sx-hp-consent[hidden] { display: none; }
.sx-hp-consent__title { margin: 0 0 6px; font-family: var(--hp-heading-font); font-weight: 600; font-size: 1rem; color: var(--sratix-text-strong); }
.sx-hp-consent__text { margin: 0 0 14px; font-size: 0.9rem; line-height: 1.5; color: var(--sratix-text-muted); }
.sx-hp-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ── Unknown page ── */
.sx-hp--missing { align-items: center; justify-content: center; text-align: center; }
.sx-hp-missing { padding: 48px 24px; max-width: 560px; }
.sx-hp-missing h1 { font-family: var(--hp-heading-font); margin: 0 0 12px; color: var(--sratix-text-strong); }
.sx-hp-missing p { margin: 0; color: var(--sratix-text-muted); line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  .sx-hp * { transition: none !important; }
}
