/* Animated: richer motion for this design only. A real photograph with floating objects (drawn by
   js/motion-animated.js) stays fixed behind every page; moving between pages swaps only the content, so
   the scene never restarts. Headline words bounce in, sections pop in with a springy bounce and buttons
   wobble on hover. Everything is off for visitors who prefer reduced motion, and without the effect
   the design looks exactly as it normally does. */

/* Moving between pages fades the content instead of cutting */
@view-transition {
  navigation: auto;
}

/* The live WebGL scene starts immediately with a tiny 360° texture and upgrades to the
   full-quality background once it loads. No static poster is shown. */
/* Reserve room for the scrollbar so the window width never changes when a page gets longer or shorter */
html.pf-3d.design-animated {
  scrollbar-gutter: stable;
  /* No page-level background: some layouts paint one, which makes the body paint its own solid
     background over the scene (the body colour then fills the window behind the scene as usual) */
  background: none;
}

#pf-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.pf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* shown the moment the first frame is drawn: no fade-in */
  opacity: 0;
}

.pf-canvas.is-on {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  /* The navigation bar is fully transparent and stays pinned at the top over the scene */
  html.pf-3d.design-animated nav.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  /* the page you are on stays clearly visible over the photograph */
  html.pf-3d.design-animated nav.site-nav .active,
  html.pf-3d.design-animated nav.site-nav [aria-current='page'] {
    color: #fff !important;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 3px rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
    padding-bottom: 0.1rem;
  }

  html.pf-3d.design-animated nav.site-nav a {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 3px rgba(255, 255, 255, 0.9);
  }

  /* Phone menu: a dark panel so the white links are readable, and a matching menu button */
  @media (max-width: 768px) {
    html.pf-3d.design-animated nav.site-nav .nav-toggle {
      background: rgba(255, 255, 255, 0.14);
      border-color: rgba(255, 255, 255, 0.45);
      color: #fff;
      -webkit-backdrop-filter: blur(12px) saturate(1.4);
      backdrop-filter: blur(12px) saturate(1.4);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 0, 0, 0.18);
    }

    /* frosted glass: the scene shows through, blurred, with a light tint so the links stay readable */
    html.pf-3d.design-animated nav.site-nav #nav-links {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)), rgba(16, 28, 22, 0.38);
      -webkit-backdrop-filter: blur(22px) saturate(1.5);
      backdrop-filter: blur(22px) saturate(1.5);
      border: 1px solid rgba(255, 255, 255, 0.28);
      border-top: 0;
      border-radius: 0 0 18px 18px;
      box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18), 0 14px 34px rgba(0, 0, 0, 0.25);
    }

    html.pf-3d.design-animated nav.site-nav #nav-links a,
    html.pf-3d.design-animated nav.site-nav #nav-links .active,
    html.pf-3d.design-animated nav.site-nav #nav-links [aria-current='page'] {
      color: #fff !important;
      text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
      border-bottom: 0;
      padding-bottom: 0.65rem;
    }

    html.pf-3d.design-animated nav.site-nav #nav-links a:hover,
    html.pf-3d.design-animated nav.site-nav #nav-links a.active,
    html.pf-3d.design-animated nav.site-nav #nav-links [aria-current='page'] {
      background: rgba(255, 255, 255, 0.18);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
      font-weight: 700;
    }
  }

  /* The footer is completely transparent, over the scene */
  html.pf-3d.design-animated footer.site-footer {
    position: relative;
    z-index: 10;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }

  html.pf-3d.design-animated footer.site-footer,
  html.pf-3d.design-animated footer.site-footer a,
  html.pf-3d.design-animated footer.site-footer span,
  html.pf-3d.design-animated footer.site-footer p {
    color: #fff !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.7);
  }

  /* Social icons (side bar and footer) have no background of their own: a thin light outline and a white
     icon with a soft shadow, so they blend into the page */
  html.pf-3d.design-animated .social-rail__link,
  html.pf-3d.design-animated .footer-social a {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #fff !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  html.pf-3d.design-animated .social-rail__link svg,
  html.pf-3d.design-animated .footer-social a svg {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
  }

  html.pf-3d.design-animated .social-rail__link:hover,
  html.pf-3d.design-animated .footer-social a:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    transform: translateY(-2px);
  }

  /* The home page's headline sits directly on the photograph, so it gets a soft halo */
  html.pf-3d.design-animated .landing h1 {
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.95), 0 0 4px rgba(255, 255, 255, 0.9);
  }

  /* Every page fills the window, from the top (behind the floating bar) to the bottom (above the footer) */
  html.pf-3d.design-animated main#app-content {
    min-height: max(30rem, calc(100vh - 4.3rem));
    min-height: max(30rem, calc(100svh - 4.3rem));
  }

  html.pf-3d.design-animated main > section:first-child:not(.landing) {
    padding-top: max(6.5rem, 12vh);
  }

  /* Page content sits on a soft panel in the design's own page colour, so its normal text colours read
     clearly over the photograph on every page */
  html.pf-3d.design-animated main > section:not(.landing) > .container {
    background: color-mix(in srgb, var(--light, #fff) 88%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.14);
  }

  /* The opening section of the home page sits directly over the live scene */
  html.pf-3d.design-animated .landing,
  html.pf-3d.design-animated .landing > [class^="landing-"],
  html.pf-3d.design-animated .landing-nature,
  html.pf-3d.design-animated .landing-coastal,
  html.pf-3d.design-animated .landing-hospitality,
  html.pf-3d.design-animated .landing-festival {
    background: transparent !important;
    min-height: max(30rem, calc(100vh - 4.3rem));
    min-height: max(30rem, calc(100svh - 4.3rem));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* Hide decorative photo/curve/accent blocks so the live scene shows through */
  html.pf-3d.design-animated .landing [class*="__accent"],
  html.pf-3d.design-animated .landing [class*="__photo"],
  html.pf-3d.design-animated .landing [class*="__curve"] {
    display: none !important;
  }

  html.pf-3d.design-animated .landing [class$="__copy"] {
    text-align: center;
    max-width: 60rem;
  }

  /* Hero copy must be light against the animated photograph */
  html.pf-3d.design-animated .landing h1,
  html.pf-3d.design-animated .landing p,
  html.pf-3d.design-animated .landing .landing-tagline {
    color: #fff !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65), 0 1px 3px rgba(0, 0, 0, 0.5);
  }

  /* Headline words bounce in one after another */
  .pf-word {
    display: inline-block;
    animation: pf-word-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms + 120ms);
  }

  @keyframes pf-word-pop {
    from { opacity: 0; transform: translateY(0.6em) scale(0.8) rotate(-4deg); }
    to   { opacity: 1; transform: none; }
  }

  /* Page content fades while one page is swapped for another */
  html.pf-3d.design-animated main#app-content {
    /* opacity only: moving the content would also move the pinned title and bubbles inside it */
    transition: opacity 0.3s ease;
  }

  html.pf-3d.design-animated main#app-content.pf-leaving {
    opacity: 0;
  }

  /* Sections pop in with a spring instead of a plain fade */
  html.design-animated.motion-ready .motion-reveal {
    opacity: 0;
    transform: translateY(28px) scale(0.92) rotate(-1deg);
    transition: opacity 0.5s ease, transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: var(--motion-delay, 0ms);
  }

  html.design-animated.motion-ready .motion-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Buttons: a quick wobble on hover */
  html.design-animated .btn-primary:hover,
  html.design-animated .btn-secondary:hover {
    animation: pf-wobble 0.5s ease;
  }

  @keyframes pf-wobble {
    0%, 100% { transform: scale(1.03); }
    30% { transform: rotate(-3deg) scale(1.06); }
    60% { transform: rotate(2.5deg) scale(1.04); }
  }
}

@media (prefers-reduced-motion: no-preference) {
  html.pf-3d.design-animated .landing:not(:has(> .landing-nature))::after,
  html.pf-3d.design-animated .landing .landing-nature::after { background: none; }
  html.pf-3d.design-animated .landing h1,
  html.pf-3d.design-animated .landing p,
  html.pf-3d.design-animated .landing-tagline,
  html.pf-3d.design-animated nav.site-nav a,
  html.pf-3d.design-animated nav.site-nav #nav-links a {
    color: #fff !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.65) !important;
  }
  html.pf-3d.design-animated .landing .btn-primary { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
}

/* Services as freely floating bubbles, matching the soap bubbles in the scene: clear glass with a bright
   rim and a rainbow sheen. js/motion-animated.js moves them around the whole window and keeps them from touching.
   Each service's text sits inside its own bubble and moves with it as one piece. */
@media (prefers-reduced-motion: no-preference) {
  html.pf-3d.design-animated main > section:not(.landing) > .container:has(.services-grid) {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0 clamp(1rem, 4vw, 2rem);
  }

  html.pf-3d.design-animated .container:has(.services-grid) > h2,
  html.pf-3d.design-animated .container:has(.services-grid) > p {
    color: #fff !important;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.65);
  }

  /* Wider screens: the page title sits in the middle of the window and the bubbles float freely,
     passing in front of it. Phones keep the title above the column. */
  @media (min-width: 641px) {
    html.pf-3d.design-animated .container:has(.services-grid) > h2 {
      position: fixed;
      inset: 0;
      margin: auto;
      width: fit-content;
      max-width: min(80vw, 46rem);
      height: fit-content;
      pointer-events: none;
    }

    /* No pop-in movement here: moving the grid or the title would drag the pinned bubbles with it.
       The bubbles have their own arrival effect, and the title only fades in. */
    html.pf-3d.design-animated .services-grid,
    html.pf-3d.design-animated .container:has(.services-grid) > h2 {
      transform: none !important;
    }

    html.pf-3d.design-animated .services-grid {
      opacity: 1 !important;
    }
  }

  html.pf-3d.design-animated .services-grid {
    display: block !important;
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
  }

  html.pf-3d.design-animated .services-grid .service-card.is-grabbed {
    cursor: grabbing;
    z-index: 5;
  }

  html.pf-3d.design-animated .services-grid .service-card {
    position: fixed;
    left: 0;
    top: 0;
    /* hidden until the bubble script has placed it (then it fades in as it arrives) */
    opacity: 0;
    /* bubbles can be grabbed and thrown */
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    z-index: 4;
    box-sizing: border-box;
    width: var(--pf-d, 16rem);
    height: var(--pf-d, 16rem);
    min-height: 0 !important;
    margin: 0 !important;
    aspect-ratio: auto !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(var(--pf-d, 16rem) * 0.16) calc(var(--pf-d, 16rem) * 0.13) !important;
    border-radius: 50% !important;
    clip-path: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
    will-change: transform;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    background:
      radial-gradient(circle at 50% 50%, rgba(10, 20, 30, 0.34) 0%, rgba(10, 20, 30, 0.2) 55%, rgba(255, 255, 255, 0.1) 88%, rgba(255, 255, 255, 0.28) 100%) !important;
    -webkit-backdrop-filter: blur(2px) saturate(140%);
    backdrop-filter: blur(2px) saturate(140%);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.28),
      inset 0 0 28px rgba(255, 255, 255, 0.28),
      inset 16px 14px 34px rgba(255, 255, 255, 0.3),
      inset -16px -14px 34px rgba(90, 190, 255, 0.34),
      inset 0 -18px 30px rgba(255, 235, 120, 0.14),
      0 10px 36px rgba(0, 0, 0, 0.16) !important;
  }

  /* Two soft light glints, like the highlights on the scene's bubbles */
  html.pf-3d.design-animated .services-grid .service-card::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 15%;
    width: 24%;
    height: 12%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
    transform: rotate(-32deg);
    pointer-events: none;
  }

  html.pf-3d.design-animated .services-grid .service-card::after {
    content: '';
    position: absolute;
    right: 17%;
    bottom: 9%;
    width: 13%;
    height: 7%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    transform: rotate(-32deg);
    pointer-events: none;
  }

  html.pf-3d.design-animated .services-grid .service-card h3 {
    font-size: clamp(0.8rem, calc(var(--pf-d, 16rem) * 0.062), 1.05rem);
    line-height: 1.2;
    margin: 0 0 0.4rem;
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75), 0 1px 2px rgba(0, 0, 0, 0.7);
  }

  html.pf-3d.design-animated .services-grid .service-card h3::after {
    display: none;
  }

  html.pf-3d.design-animated .services-grid .service-card p {
    font-size: clamp(0.7rem, calc(var(--pf-d, 16rem) * 0.05), 0.88rem);
    line-height: 1.36;
    margin: 0;
    color: #fff !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.7);
  }


  /* On phones the bubbles are too small to float freely and still hold their text, so they sit in a
     column, each one big enough to read, and just bob gently */
  @media (max-width: 640px) {
    html.pf-3d.design-animated .services-grid {
      display: flex !important;
      flex-direction: column;
      align-items: center;
      gap: 1.25rem;
      height: auto;
      padding: 1.25rem 0 2rem;
    }

    html.pf-3d.design-animated .services-grid .service-card {
      position: relative;
      transform: none !important;
      opacity: 1 !important;
      cursor: auto;
      touch-action: auto;
      width: min(68vw, 16rem);
      height: min(68vw, 16rem);
      --pf-d: min(68vw, 16rem);
      animation: pf-bubble-bob 7s ease-in-out infinite alternate !important;
    }

    /* zig-zag column: each bubble tucks up a little against the previous one (they still never touch) */
    html.pf-3d.design-animated .services-grid .service-card + .service-card {
      margin-top: -2rem !important;
    }

    html.pf-3d.design-animated .services-grid .service-card:nth-child(even) {
      animation-delay: -3s !important;
      align-self: flex-end;
    }

    html.pf-3d.design-animated .services-grid .service-card:nth-child(odd) {
      align-self: flex-start;
    }

    @keyframes pf-bubble-bob {
      from { translate: 0 -5px; }
      to   { translate: 0 6px; }
    }
  }
}

/* Features page: no big panel. The heading sits straight on the scene and every feature is its own
   smaller frosted-glass card, placed alternately on the left and on the right so the photograph shows
   through the middle. */
@media (prefers-reduced-motion: no-preference) {
  html.pf-3d.design-animated main > section:not(.landing) > .container:has(.pl-feature-rows) {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0 clamp(1rem, 4vw, 2rem);
    max-width: min(78rem, 100%);
  }

  html.pf-3d.design-animated .pl-features-intro,
  html.pf-3d.design-animated .pl-features-intro * {
    color: #fff !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.65);
  }

  html.pf-3d.design-animated .pl-feature-rows {
    display: flex !important;
    flex-direction: column;
    gap: 1.75rem !important;
    margin-top: 2rem;
  }

  html.pf-3d.design-animated .pl-feature-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.9rem !important;
    align-items: start !important;
    box-sizing: border-box;
    width: min(100%, 34rem);
    padding: 1.1rem 1.25rem 1.3rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.22), rgba(10, 20, 30, 0.42) 55%, rgba(10, 20, 30, 0.5));
    -webkit-backdrop-filter: blur(9px) saturate(140%);
    backdrop-filter: blur(9px) saturate(140%);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.18),
      inset 0 0 30px rgba(255, 255, 255, 0.1),
      0 14px 40px rgba(0, 0, 0, 0.25);
    animation: pf-feature-drift 9s ease-in-out infinite alternate;
  }

  html.pf-3d.design-animated .pl-feature-row:nth-child(odd) {
    align-self: flex-start;
    margin-left: clamp(0rem, 4vw, 3rem);
  }

  html.pf-3d.design-animated .pl-feature-row:nth-child(even) {
    align-self: flex-end;
    margin-right: clamp(0rem, 4vw, 3rem);
    animation-delay: -4s;
  }

  /* The picture goes on top of its card, text below */
  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__media {
    order: -1;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__media img {
    width: 100%;
    height: 10.5rem;
    object-fit: cover;
    border-radius: 1.1rem;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  }

  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__content {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    text-align: left;
  }

  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__content,
  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__content * {
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.65);
  }

  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__content h3 {
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 0.2rem 0 0.45rem;
  }

  html.pf-3d.design-animated .pl-feature-row .pl-feature-row__content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
  }

  @keyframes pf-feature-drift {
    from { translate: 0 -5px; }
    to   { translate: 0 6px; }
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 700px) {
  html.pf-3d.design-animated .pl-feature-row:nth-child(odd),
  html.pf-3d.design-animated .pl-feature-row:nth-child(even) {
    align-self: stretch;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

/* Every other content page: no big panel. Headings sit straight on the scene and the content is split
   into smaller frosted-glass cards (contact, about, FAQ, events, documents, gallery, menu, partners and
   the legal pages), so the photograph shows through between them. */
@media (prefers-reduced-motion: no-preference) {
  /* the pages below drop the big panel */
  html.pf-3d.design-animated main > section:not(.landing) > .container:has(#about-body, .contact-form-panel, #faq-list, #events-list, #documents-list, #gallery-list, #menu-list, #sponsors-list, #privacy-body, #terms-body) {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0 clamp(1rem, 4vw, 2rem);
    max-width: min(78rem, 100%);
  }

  html.pf-3d.design-animated main > section > .container > h2,
  html.pf-3d.design-animated main > section > .container > h2 + p,
  html.pf-3d.design-animated main > section > .container > .muted-note,
  html.pf-3d.design-animated main > section > .container > [id$="-list"] > .muted-note {
    color: #fff !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.65);
  }

  /* the glass card itself */
  html.pf-3d.design-animated #about-body > p,
  html.pf-3d.design-animated .contact-channels-panel,
  html.pf-3d.design-animated .contact-form-panel,
  html.pf-3d.design-animated .faq-item,
  html.pf-3d.design-animated .event-card,
  html.pf-3d.design-animated .gallery-item,
  html.pf-3d.design-animated #documents-list > li,
  html.pf-3d.design-animated #menu-list > *,
  html.pf-3d.design-animated #sponsors-list > *,
  html.pf-3d.design-animated #privacy-body,
  html.pf-3d.design-animated #terms-body {
    box-sizing: border-box;
    margin: 0;
    padding: 1.3rem 1.5rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.22), rgba(10, 20, 30, 0.42) 55%, rgba(10, 20, 30, 0.5)) !important;
    -webkit-backdrop-filter: blur(9px) saturate(140%);
    backdrop-filter: blur(9px) saturate(140%);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.18),
      inset 0 0 30px rgba(255, 255, 255, 0.1),
      0 14px 40px rgba(0, 0, 0, 0.25) !important;
    color: #fff !important;
  }

  /* white text inside the cards (form fields and buttons keep their own colours) */
  html.pf-3d.design-animated :is(#about-body > p, .contact-channels-panel, .contact-form-panel, .faq-item, .event-card, .gallery-item, #documents-list > li, #menu-list > *, #sponsors-list > *, #privacy-body, #terms-body) :where(h2, h3, h4, p, li, span, label, summary, small, strong, em, dt, dd, legend, figcaption, a):not(:is(button, .btn, input, select, textarea, option, .btn *, button *)) {
    color: #fff !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  }

  html.pf-3d.design-animated .contact-mode button {
    color: #fff !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
  }

  html.pf-3d.design-animated .contact-mode button[aria-pressed='true'],
  html.pf-3d.design-animated .contact-mode button[aria-selected='true'],
  html.pf-3d.design-animated .contact-mode button.is-active,
  html.pf-3d.design-animated .contact-mode button.active {
    background: rgba(255, 255, 255, 0.3) !important;
  }

  html.pf-3d.design-animated :is(.contact-channels-panel, .contact-form-panel) :is(li, hr) {
    border-color: rgba(255, 255, 255, 0.28) !important;
  }

  /* ---- About: every paragraph is its own card, alternating left and right ---- */
  html.pf-3d.design-animated #about-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  html.pf-3d.design-animated #about-body > p {
    width: min(100%, 38rem);
    animation: pf-card-drift 9s ease-in-out infinite alternate;
  }

  html.pf-3d.design-animated #about-body > p:nth-child(odd) {
    align-self: flex-start;
  }

  html.pf-3d.design-animated #about-body > p:nth-child(even) {
    align-self: flex-end;
    animation-delay: -4s;
  }

  /* ---- Contact: details on the left, the form on the right ---- */
  html.pf-3d.design-animated .container:has(.contact-form-panel) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  html.pf-3d.design-animated .container:has(.contact-form-panel) > h2 {
    margin-bottom: 0;
  }

  @media (min-width: 900px) {
    html.pf-3d.design-animated .container:has(.contact-form-panel) {
      grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }

    html.pf-3d.design-animated .container:has(.contact-form-panel) > h2 {
      grid-column: 1 / -1;
    }
  }

  /* ---- Lists: a column of separate cards ---- */
  html.pf-3d.design-animated #faq-list,
  html.pf-3d.design-animated #documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 46rem;
    margin: 1.5rem auto 0;
    padding: 0;
    list-style: none;
  }

  html.pf-3d.design-animated #events-list,
  html.pf-3d.design-animated #gallery-list,
  html.pf-3d.design-animated #menu-list,
  html.pf-3d.design-animated #sponsors-list {
    gap: 1.25rem;
  }

  /* ---- Legal pages: one calm card, kept narrow enough to read ---- */
  html.pf-3d.design-animated #privacy-body,
  html.pf-3d.design-animated #terms-body {
    max-width: 52rem;
    margin: 1.5rem auto 0;
    padding: 1.6rem 1.8rem;
  }

  @keyframes pf-card-drift {
    from { translate: 0 -4px; }
    to   { translate: 0 5px; }
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 700px) {
  html.pf-3d.design-animated #about-body > p:nth-child(odd),
  html.pf-3d.design-animated #about-body > p:nth-child(even) {
    align-self: stretch;
    width: 100%;
  }

  html.pf-3d.design-animated .contact-channels-panel,
  html.pf-3d.design-animated .contact-form-panel,
  html.pf-3d.design-animated #privacy-body,
  html.pf-3d.design-animated #terms-body {
    padding: 1.1rem 1.1rem;
  }
}
