/*
 * Partner landing page design system.
 * Served as a static file so the same stylesheet powers the live site and
 * the static HTML export. All partner-specific values arrive as CSS custom
 * properties (--ps-*) set on the .partner-site root element.
 */

@font-face {
  font-family: "Theinhardt";
  src: url("fonts/Theinhardt-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Theinhardt";
  src: url("fonts/Theinhardt-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Theinhardt";
  src: url("fonts/Theinhardt-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Edie and Eddy";
  src: url("fonts/Edie-and-Eddy-Text-Medium.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swift";
  src: url("fonts/SwiftLTW04-Light.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.partner-site {
  --ps-max-width: 72rem;
  --ps-shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
  background: var(--ps-surface, #ffffff);
  color: var(--ps-surface-foreground, #111111);
  font-family: var(--ps-font-body, ui-sans-serif, system-ui, sans-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.partner-site *,
.partner-site *::before,
.partner-site *::after {
  box-sizing: border-box;
}

.partner-site img {
  display: block;
  height: auto;
  max-width: 100%;
}

/*
 * :where() keeps the reset at class specificity (0,1,0) so component
 * classes like .ps-section__title can re-introduce margins further down.
 */
.partner-site :where(h1, h2, h3, p, ul, dl) {
  margin: 0;
}

.partner-site :focus-visible {
  outline: 3px solid var(--ps-primary, #5b2082);
  outline-offset: 3px;
  border-radius: 2px;
}

.ps-container {
  margin-inline: auto;
  max-width: var(--ps-max-width);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  width: 100%;
}

.ps-skip-link {
  background: var(--ps-primary);
  border-radius: 0 0 var(--ps-radius) 0;
  color: var(--ps-primary-foreground);
  left: 0;
  padding: 0.75rem 1.25rem;
  position: fixed;
  text-decoration: none;
  top: 0;
  transform: translateY(-120%);
  transition: transform 150ms ease;
  z-index: 60;
}

.ps-skip-link:focus-visible {
  transform: translateY(0);
}

/* Header */

.ps-header {
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--ps-surface) 88%, transparent);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  position: sticky;
  top: 0;
  z-index: 40;
}

.ps-header__inner {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 4.25rem;
}

.ps-header__brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font-family: var(--ps-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.ps-header__logo {
  display: block;
  height: 2.5rem;
  max-width: 14rem;
  object-fit: contain;
  width: auto;
}

.ps-header__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ps-header__nav a {
  border-radius: calc(var(--ps-radius) * 0.75);
  color: inherit;
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.ps-header__nav a:hover {
  background: var(--ps-accent);
  color: var(--ps-accent-foreground);
}

.ps-header__languages ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ps-header__languages a,
.ps-header__languages span {
  border-radius: calc(var(--ps-radius) * 0.75);
  color: inherit;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.75;
  padding: 0.4rem 0.6rem;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.ps-header__languages span[aria-current="page"] {
  font-weight: 700;
  opacity: 1;
}

.ps-header__languages a:hover {
  background: var(--ps-accent);
  color: var(--ps-accent-foreground);
  opacity: 1;
}

@media (max-width: 40rem) {
  .ps-header__nav {
    display: none;
  }
}

/* Typography helpers */

.ps-eyebrow {
  color: currentColor;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
  opacity: 0.75;
  text-transform: uppercase;
}

.ps-section__title {
  font-family: var(--ps-font-heading);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.ps-prose p + p {
  margin-top: 1em;
}

/* Rich text (WYSIWYG output: p, br, strong, em, a, ul, ol, li) */

.ps-rich-text p + p,
.ps-rich-text p + ul,
.ps-rich-text p + ol,
.ps-rich-text ul + p,
.ps-rich-text ol + p {
  margin-top: 1em;
}

.ps-rich-text ul,
.ps-rich-text ol {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.4rem;
}

.ps-rich-text a {
  color: var(--ps-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.ps-section--tinted .ps-rich-text a,
.ps-section--brand .ps-rich-text a,
.ps-hero .ps-rich-text a,
.ps-footer .ps-rich-text a {
  color: inherit;
}

/* Image aspect-ratio modifiers (default without a class is 4:3) */

.partner-site .ps-img--auto {
  aspect-ratio: auto;
}

.partner-site .ps-img--1-1 {
  aspect-ratio: 1 / 1;
}

.partner-site .ps-img--4-3 {
  aspect-ratio: 4 / 3;
}

.partner-site .ps-img--3-2 {
  aspect-ratio: 3 / 2;
}

.partner-site .ps-img--16-9 {
  aspect-ratio: 16 / 9;
}

.ps-link {
  color: var(--ps-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.ps-link:hover {
  text-decoration-thickness: 2.5px;
}

.ps-button {
  border-radius: calc(var(--ps-radius) * 1.2);
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  min-height: 3rem;
  padding: 0.8rem 1.75rem;
  text-align: center;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.ps-button--primary {
  background: var(--ps-primary);
  box-shadow: var(--ps-shadow);
  color: var(--ps-primary-foreground);
}

.ps-button--primary:hover {
  transform: translateY(-2px);
}

/* Hero */

.ps-hero {
  background: var(--ps-hero-background);
  color: var(--ps-hero-foreground);
  overflow: clip;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  position: relative;
}

.ps-hero__inner {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.ps-hero--image-right .ps-hero__inner {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

@media (max-width: 48rem) {
  .ps-hero--image-right .ps-hero__inner {
    grid-template-columns: 1fr;
  }
}

.ps-hero--minimal .ps-hero__inner,
.ps-hero--full-bleed .ps-hero__inner {
  max-width: 52rem;
  text-align: center;
}

.ps-hero--full-bleed {
  min-height: 70svh;
  display: grid;
  align-items: center;
}

.ps-hero__headline {
  font-family: var(--ps-font-heading);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.ps-hero__text {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-top: clamp(1.5rem, 2.5vw, 2rem);
  max-width: 38rem;
  opacity: 0.92;
}

.ps-hero--minimal .ps-hero__text,
.ps-hero--full-bleed .ps-hero__text {
  margin-inline: auto;
}

.ps-hero__actions {
  margin-top: 2.25rem;
}

.ps-hero__media {
  border-radius: calc(var(--ps-radius) * 2);
  box-shadow: var(--ps-shadow);
  overflow: clip;
}

.ps-hero__image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* Media on the left instead of the right (hero split layout) */

.ps-hero.ps-media-start .ps-hero__inner {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.ps-hero.ps-media-start .ps-hero__media {
  order: -1;
}

@media (max-width: 48rem) {
  .ps-hero.ps-media-start .ps-hero__inner {
    grid-template-columns: 1fr;
  }

  .ps-hero.ps-media-start .ps-hero__media {
    order: 0;
  }
}

/* Hero with a full-bleed background image */

.ps-hero--background {
  align-items: center;
  color: #ffffff;
  display: grid;
  isolation: isolate;
  min-height: min(46rem, 78svh);
}

.ps-hero--background.ps-hero--overlay-brand {
  color: var(--ps-primary-foreground);
}

.ps-hero--background.ps-hero--overlay-none {
  color: var(--ps-hero-foreground);
}

.ps-hero__bg {
  inset: 0;
  overflow: clip;
  position: absolute;
  z-index: -1;
}

.ps-hero__bg-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ps-hero__overlay {
  inset: 0;
  position: absolute;
}

.ps-hero__overlay--dark {
  background: #0d0a12;
}

.ps-hero__overlay--brand {
  background: color-mix(in srgb, var(--ps-primary) 80%, #0d0a12);
}

.ps-hero__overlay--gradient-up {
  background: linear-gradient(
    to top,
    rgba(10, 8, 14, 0.98),
    rgba(10, 8, 14, 0.65) 45%,
    rgba(10, 8, 14, 0.2)
  );
}

.ps-hero--background .ps-hero__inner {
  grid-template-columns: 1fr;
}

.ps-hero--background .ps-hero__copy {
  max-width: 42rem;
}

.ps-hero--align-center .ps-hero__inner {
  text-align: center;
}

.ps-hero--align-center .ps-hero__copy {
  margin-inline: auto;
}

.ps-hero--align-center .ps-hero__text {
  margin-inline: auto;
}

/* Sections */

.ps-section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.ps-section--plain {
  background: var(--ps-surface);
}

.ps-section--tinted {
  background: var(--ps-accent);
  color: var(--ps-accent-foreground);
}

.ps-section--tinted .ps-link {
  color: inherit;
}

.ps-section--brand {
  background: var(--ps-hero-background);
  color: var(--ps-hero-foreground);
}

/* About */

.ps-about__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.ps-about__inner:has(.ps-about__media) {
  align-items: center;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.ps-about--image-left .ps-about__inner:has(.ps-about__media) {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.ps-about--image-left .ps-about__media {
  order: -1;
}

.ps-about.ps-media-start .ps-about__inner:has(.ps-about__media) {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.ps-about.ps-media-start .ps-about__media {
  order: -1;
}

@media (max-width: 48rem) {
  .ps-about__inner:has(.ps-about__media),
  .ps-about--image-left .ps-about__inner:has(.ps-about__media),
  .ps-about.ps-media-start .ps-about__inner:has(.ps-about__media) {
    grid-template-columns: 1fr;
  }

  .ps-about--image-left .ps-about__media,
  .ps-about.ps-media-start .ps-about__media {
    order: 0;
  }
}

.ps-about__media {
  border-radius: calc(var(--ps-radius) * 2);
  box-shadow: var(--ps-shadow);
  overflow: clip;
}

.ps-about__image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* Info block */

.ps-info__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.ps-info__inner:has(.ps-info__media) {
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.ps-info.ps-media-start .ps-info__inner:has(.ps-info__media) {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.ps-info.ps-media-start .ps-info__media {
  order: -1;
}

@media (max-width: 48rem) {
  .ps-info__inner:has(.ps-info__media),
  .ps-info.ps-media-start .ps-info__inner:has(.ps-info__media) {
    grid-template-columns: 1fr;
  }

  .ps-info.ps-media-start .ps-info__media {
    order: 0;
  }
}

.ps-info__media {
  border-radius: calc(var(--ps-radius) * 2);
  box-shadow: var(--ps-shadow);
  overflow: clip;
}

.ps-info__image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.ps-info__list {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin-top: 1.75rem;
  padding: 0;
}

.ps-info__list-item {
  padding-left: 2rem;
  position: relative;
}

.ps-info__list-item::before {
  background: var(--ps-primary);
  border-radius: 999px;
  content: "";
  height: 0.6rem;
  left: 0.35rem;
  position: absolute;
  top: 0.55em;
  width: 0.6rem;
}

.ps-section--tinted .ps-info__list-item::before,
.ps-section--brand .ps-info__list-item::before {
  background: currentColor;
}

.ps-info__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  list-style: none;
  margin-top: 1.75rem;
  padding: 0;
}

/* Chat */

.ps-chat__card {
  background: var(--ps-surface);
  border-radius: calc(var(--ps-radius) * 2);
  box-shadow: var(--ps-shadow);
  color: var(--ps-surface-foreground);
  margin-inline: auto;
  max-width: 44rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  text-align: center;
}

.ps-chat__card .ps-prose {
  margin-inline: auto;
  max-width: 36rem;
}

.ps-chat__hint {
  font-size: 0.9rem;
  margin-top: 1.5rem;
  opacity: 0.7;
}

/* Contact */

.ps-contact__details {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 2rem;
}

.ps-contact__item dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.65;
  text-transform: uppercase;
}

.ps-contact__item dd {
  font-size: 1.05rem;
  margin: 0.35rem 0 0;
}

.ps-contact__address p + p {
  margin-top: 0.25em;
}

/* Footer */

.ps-footer {
  background: #1c1a1e;
  color: #f4f2f1;
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}

.ps-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.ps-footer__organization {
  font-family: var(--ps-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.ps-footer__note {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 30rem;
  opacity: 0.75;
}

.ps-footer__links ul {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ps-footer .ps-link {
  color: #f4f2f1;
}

.ps-footer__meta {
  border-top: 1px solid rgba(244, 242, 241, 0.16);
  font-size: 0.8rem;
  margin-top: 2.5rem;
  opacity: 0.65;
  padding-top: 1.5rem;
}

/* Cookie notice (information only, Swiss DSG) */

.ps-cookie-notice {
  align-items: center;
  background: var(--ps-surface);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: calc(var(--ps-radius) * 1.5);
  bottom: 1.25rem;
  box-shadow: var(--ps-shadow);
  color: var(--ps-surface-foreground);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  left: 1.25rem;
  /* Keep clear of the chat bubble in the bottom-right corner. */
  max-width: min(26rem, calc(100vw - 8.5rem));
  padding: 1rem 1.25rem;
  position: fixed;
  z-index: 50;
}

.ps-cookie-notice[hidden] {
  display: none;
}

.ps-cookie-notice__text {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.9;
}

.ps-cookie-notice__dismiss {
  background: var(--ps-primary);
  border: 0;
  border-radius: calc(var(--ps-radius) * 0.9);
  color: var(--ps-primary-foreground);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
}

@media (max-width: 40rem) {
  .ps-cookie-notice {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: none;
  }
}

/*
 * Reveal animations.
 * Progressive enhancement in three tiers:
 *  1. prefers-reduced-motion → no animation at all
 *  2. CSS scroll-driven animations where supported
 *  3. IntersectionObserver fallback via partner-site.js (adds .ps-visible)
 */

@media (prefers-reduced-motion: no-preference) {
  .partner-site [data-reveal] {
    opacity: 0.001;
    transform: translateY(1.5rem);
    transition:
      opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .partner-site [data-reveal].ps-visible {
    opacity: 1;
    transform: none;
  }

  /* Without JavaScript nothing must stay hidden. */
  .partner-site.ps-no-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  @supports (animation-timeline: view()) {
    .partner-site.ps-scroll-timeline [data-reveal],
    .partner-site.ps-scroll-timeline [data-reveal].ps-visible {
      animation: ps-reveal both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
      opacity: 1;
      transform: none;
      transition: none;
    }

    .partner-site.ps-scroll-timeline .ps-hero[data-reveal] {
      animation: none;
    }

    .partner-site.ps-scroll-timeline [data-parallax] {
      animation: ps-parallax linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    /*
     * Immersive parallax tier (scroll-driven CSS only; the IntersectionObserver
     * fallback keeps simple reveals to avoid scroll-linked JS jank).
     */

    /* Hero background: slow drift against the scroll direction. The scale
       provides the head-room the translation moves through. */
    .partner-site.ps-scroll-timeline .ps-hero__bg-image {
      animation: ps-hero-bg-parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 120svh;
    }

    /* Section images: gentle drift inside their clipped frames. */
    .partner-site.ps-scroll-timeline [data-parallax-media] img {
      animation: ps-img-drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    /* Staggered reveals for list items and contact rows. */
    .partner-site.ps-scroll-timeline .ps-info__list-item,
    .partner-site.ps-scroll-timeline .ps-contact__item {
      animation: ps-reveal both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }

    .partner-site.ps-scroll-timeline .ps-info__list-item:nth-child(2),
    .partner-site.ps-scroll-timeline .ps-contact__item:nth-child(2) {
      animation-range: entry 10% entry 50%;
    }

    .partner-site.ps-scroll-timeline .ps-info__list-item:nth-child(3),
    .partner-site.ps-scroll-timeline .ps-contact__item:nth-child(3) {
      animation-range: entry 20% entry 60%;
    }

    .partner-site.ps-scroll-timeline .ps-info__list-item:nth-child(n + 4),
    .partner-site.ps-scroll-timeline .ps-contact__item:nth-child(n + 4) {
      animation-range: entry 30% entry 70%;
    }
  }

  .ps-hero__copy {
    animation: ps-hero-enter 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .ps-hero[data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@keyframes ps-reveal {
  from {
    opacity: 0.001;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ps-parallax {
  from {
    transform: translateY(2.5rem);
  }

  to {
    transform: translateY(-2.5rem);
  }
}

@keyframes ps-hero-bg-parallax {
  from {
    transform: scale(1.12) translateY(0);
  }

  to {
    transform: scale(1.12) translateY(9%);
  }
}

@keyframes ps-img-drift {
  from {
    transform: scale(1.1) translateY(-3.5%);
  }

  to {
    transform: scale(1.1) translateY(3.5%);
  }
}

@keyframes ps-hero-enter {
  from {
    opacity: 0.001;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
