/*
 * SKIN BEHAVIOUR.
 *
 * `skin-tokens.css` (generated) turns the vendored theme's hard-coded palette
 * into variables; this file is everything a variable cannot express — the dark
 * reading of sections the theme paints with photographs, and the four motion
 * packs the designs are sold on.
 *
 * Scoped to `.mawhub-root[data-skin]`, so an unskinned template is untouched.
 */

/* -------------------------------------------------------------------------- */
/* Typography                                                                  */
/* -------------------------------------------------------------------------- */

/*
 * The theme sets its display face on a long list of headings; the generated
 * tokens already redirect those to `--sk-display`. These are the few places it
 * styles by element rather than by class.
 */
.mawhub-root[data-skin] .logo,
.mawhub-root[data-skin] .navbar-brand {
  font-family: var(--sk-display);
}

/* A script face carries none of the theme's letter-spacing, and the serif
   display faces sit larger on the same body size. */
.mawhub-root[data-skin] .slide-title h2,
.mawhub-root[data-skin] .couple-text h2 {
  letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------- */
/* Dark skins                                                                  */
/* -------------------------------------------------------------------------- */

/*
 * The theme paints four bands with photographs chosen for a white page. On a
 * dark skin they read as holes, so each one gets a veil in the skin's own
 * surface colour rather than a different photograph.
 */
.mawhub-root[data-skin-mode='dark'] .wpo-contact-section,
.mawhub-root[data-skin-mode='dark'] .wpo-contact-section-s2,
.mawhub-root[data-skin-mode='dark'] .wpo-contact-section-s3,
.mawhub-root[data-skin-mode='dark'] .wpo-site-footer,
.mawhub-root[data-skin-mode='dark'] .wpo-site-footer-s2,
.mawhub-root[data-skin-mode='dark'] .wpo-cta-section-s2 {
  position: relative;
  isolation: isolate;
}

.mawhub-root[data-skin-mode='dark'] .wpo-contact-section::before,
.mawhub-root[data-skin-mode='dark'] .wpo-contact-section-s2::before,
.mawhub-root[data-skin-mode='dark'] .wpo-contact-section-s3::before,
.mawhub-root[data-skin-mode='dark'] .wpo-site-footer::before,
.mawhub-root[data-skin-mode='dark'] .wpo-site-footer-s2::before,
.mawhub-root[data-skin-mode='dark'] .wpo-cta-section-s2::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--sk-surface) 88%, transparent),
    color-mix(in srgb, var(--sk-surface-2) 94%, transparent)
  );
}

/* The theme's decorative sprigs and watercolour panels are scanned on white.
   Multiply drops their paper; the light skins keep them as drawn. */
.mawhub-root[data-skin-mode='dark'] .shape-1 img,
.mawhub-root[data-skin-mode='dark'] .shape1 img,
.mawhub-root[data-skin-mode='dark'] .shape2 img,
.mawhub-root[data-skin-mode='dark'] .static-hero-shape img,
.mawhub-root[data-skin-mode='dark'] .wpo-story-section .shape img,
.mawhub-root[data-skin-mode='dark'] .wpo-story-section-s2 .shape img {
  mix-blend-mode: screen;
  opacity: 0.55;
}

/* A white card shadow is invisible on black; a ring is not. */
.mawhub-root[data-skin-mode='dark'] .wpo-event-item .wpo-event-text,
.mawhub-root[data-skin-mode='dark'] .wpo-blog-item,
.mawhub-root[data-skin-mode='dark'] .wpo-team-item,
.mawhub-root[data-skin-mode='dark'] .wpo-contact-form-area {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--sk-border);
}

/* Form fields inherit `--sk-surface`, which leaves them level with the page. */
.mawhub-root[data-skin-mode='dark'] .form-control,
.mawhub-root[data-skin-mode='dark'] select,
.mawhub-root[data-skin-mode='dark'] textarea {
  background-color: var(--sk-surface-2);
  border-color: var(--sk-border);
  color: var(--sk-ink);
}

.mawhub-root[data-skin-mode='dark'] ::placeholder {
  color: var(--sk-muted);
  opacity: 1;
}

/* The header sits over the hero until it sticks; on a dark skin it needs the
   blur to stay legible over a photograph. */
.mawhub-root[data-skin-mode='dark'] .fixed-navbar.active .wpo-site-header {
  background: color-mix(in srgb, var(--sk-surface) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sk-border);
}

/* -------------------------------------------------------------------------- */
/* Motion — the shared reveal                                                  */
/* -------------------------------------------------------------------------- */

/*
 * `useSkinMotion` marks every band with `data-sk-reveal` and flips it to
 * `data-sk-in` as it comes into view. Everything below is the *arrival*; the
 * pack decides how far it travels.
 *
 * Nothing is hidden until the hook has run, so a page that never gets its
 * JavaScript — the static export, a crawler — still reads in full.
 */
.mawhub-root[data-skin] [data-sk-reveal] {
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.mawhub-root[data-skin] [data-sk-reveal='pending'] {
  opacity: 0;
}

.mawhub-root[data-skin] [data-sk-reveal='in'] {
  opacity: 1;
  transform: none;
}

/* --- soft: the free designs fade, and that is all ------------------------- */

.mawhub-root[data-motion='soft'] [data-sk-reveal='pending'] {
  transform: translateY(14px);
}

/* --- reveal: the premium designs rise ------------------------------------- */

.mawhub-root[data-motion='reveal'] [data-sk-reveal='pending'],
.mawhub-root[data-motion='royale'] [data-sk-reveal='pending'] {
  transform: translateY(46px) scale(0.985);
}

/* --- cinematic: bands arrive from below, the hero keeps moving ------------- */

.mawhub-root[data-motion='cinematic'] [data-sk-reveal='pending'] {
  transform: translateY(64px);
}

@media (prefers-reduced-motion: reduce) {
  .mawhub-root[data-skin] [data-sk-reveal] {
    transition: none;
  }
  .mawhub-root[data-skin] [data-sk-reveal='pending'] {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Motion — drifting decoration (reveal, royale)                               */
/* -------------------------------------------------------------------------- */

@keyframes sk-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -18px, 0) rotate(2.5deg);
  }
}

.mawhub-root[data-motion='reveal'] .shape-1 img,
.mawhub-root[data-motion='reveal'] .flower-1 img,
.mawhub-root[data-motion='reveal'] .flower-2 img,
.mawhub-root[data-motion='royale'] .shape-1 img,
.mawhub-root[data-motion='royale'] .static-hero-shape img {
  animation: sk-drift 9s ease-in-out infinite;
  will-change: transform;
}

.mawhub-root[data-motion='reveal'] .flower-2 img,
.mawhub-root[data-motion='royale'] .static-hero-shape img {
  animation-duration: 12s;
  animation-direction: reverse;
}

.mawhub-root[data-motion='reveal'] .shape01 img,
.mawhub-root[data-motion='reveal'] .shape02 img {
  animation: sk-drift 14s ease-in-out infinite;
}

/* -------------------------------------------------------------------------- */
/* Motion — the cinematic hero                                                 */
/* -------------------------------------------------------------------------- */

@keyframes sk-ken-burns {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.12) translate3d(-1.5%, -1.5%, 0);
  }
}

.mawhub-root[data-motion='cinematic'] .wpo-hero-slider .slide-inner {
  animation: sk-ken-burns 14s ease-out both;
  will-change: transform;
}

/* The names sit over the photographs, so they get their own scrim. */
.mawhub-root[data-motion='cinematic'] .wedding-announcement .couple-text {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

.mawhub-root[data-motion='cinematic'] .wpo-hero-slider .slide-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    color-mix(in srgb, var(--sk-surface) 78%, transparent) 100%
  );
}

/* The two photographed bands scroll at their own pace. Only on a pointer
   device: iOS treats a fixed attachment as a repaint on every frame. */
@media (hover: hover) and (pointer: fine) {
  .mawhub-root[data-motion='cinematic'] .wpo-contact-section,
  .mawhub-root[data-motion='cinematic'] .wpo-site-footer {
    background-attachment: fixed;
  }
}

/* -------------------------------------------------------------------------- */
/* Motion — the royale sheen                                                   */
/* -------------------------------------------------------------------------- */

@keyframes sk-sheen {
  0% {
    background-position: -220% 0;
  }
  100% {
    background-position: 220% 0;
  }
}

/*
 * The names and every section heading take a slow highlight across them.
 * `background-clip: text` needs a painted background, so the ink colour is
 * restated as the gradient's own base rather than left to `color`.
 */
.mawhub-root[data-motion='royale'] .slide-title h2,
.mawhub-root[data-motion='royale'] .slide-title-2 h2,
.mawhub-root[data-motion='royale'] .wpo-section-title h2,
.mawhub-root[data-motion='royale'] .wpo-section-title-s2 h2,
.mawhub-root[data-motion='royale'] .wpo-upper-wrap h3 {
  background-image: linear-gradient(
    100deg,
    var(--sk-ink) 0%,
    var(--sk-ink) 38%,
    var(--sk-accent) 50%,
    var(--sk-ink) 62%,
    var(--sk-ink) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sk-sheen 7s linear infinite;
}

@keyframes sk-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--sk-glow-rgb), 0.35);
  }
  50% {
    box-shadow: 0 0 34px 2px rgba(var(--sk-glow-rgb), 0.45);
  }
}

.mawhub-root[data-motion='royale'] .theme-btn,
.mawhub-root[data-motion='royale'] .theme-btn-s2 {
  animation: sk-glow 3.6s ease-in-out infinite;
}

/* A hairline of the accent under each band, so the dark sections still part. */
.mawhub-root[data-motion='royale'] .wpo-couple-section,
.mawhub-root[data-motion='royale'] .wpo-story-section,
.mawhub-root[data-motion='royale'] .wpo-event-section-s2 {
  border-bottom: 1px solid var(--sk-border);
}

@media (prefers-reduced-motion: reduce) {
  .mawhub-root[data-skin] *,
  .mawhub-root[data-skin] *::before,
  .mawhub-root[data-skin] *::after {
    animation: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* The occasion's own ornaments                                                */
/* -------------------------------------------------------------------------- */

/*
 * `SkinDecor` lays an occasion's cut-outs over the hero — balloons for a
 * birthday, a sprig for an engagement. It sits behind every hero element and
 * takes no pointer events, so it can never cover the names or the countdown.
 */
.mawhub-root[data-skin] .sk-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.mawhub-root[data-skin] .sk-decor img {
  position: absolute;
  height: auto;
  max-width: none;
  animation-name: sk-drift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform;
}

/* The hero's own content has to stay above the ornaments. */
.mawhub-root[data-skin] .static-hero,
.mawhub-root[data-skin] .static-hero-s2,
.mawhub-root[data-skin] .static-hero-s3,
.mawhub-root[data-skin] .wpo-hero-slider {
  position: relative;
}

.mawhub-root[data-skin] .static-hero > .container-fluid,
.mawhub-root[data-skin] .static-hero-s2 .hero-container,
.mawhub-root[data-skin] .static-hero-s3 .hero-container,
.mawhub-root[data-skin] .wpo-hero-slider .wedding-announcement {
  position: relative;
  z-index: 1;
}

/* Below about 768px the hero is the whole screen and the cut-outs crowd the
   names, so only the two that sit in the corners stay. */
@media (max-width: 767px) {
  .mawhub-root[data-skin] .sk-decor img:nth-child(n + 3) {
    display: none;
  }
  .mawhub-root[data-skin] .sk-decor img {
    width: 26% !important;
    opacity: 0.45 !important;
  }
}
