/* Shared presentation for authored storefronts. The page template owns flow and hero geometry. */
@layer marketplace-brand-style {
  body[data-brand-style] {
    --brand-style-hairline: color-mix(in srgb, var(--marketplace-ink) 24%, transparent);
    --brand-style-card-edge: var(--brand-style-hairline);
    --brand-style-card-border: 1px solid var(--brand-style-card-edge);
    --brand-style-card-fill: var(--marketplace-surface);
    --brand-style-card-shadow: none;
    --brand-style-image-radius: max(0px, calc(var(--brand-style-card-radius) - 1px));
    --brand-style-image-outline: none;
    --brand-style-caption-rule: none;
    --brand-style-card-radius: 4px;
    --brand-style-rule: none;
    --brand-style-photo-filter: none;
    --brand-style-hover-time: 0s;
    --brand-style-hover-ease: ease-out;
  }

  body[data-style-card='wall-label'] {
    --brand-style-card-radius: 2px;
    --brand-style-card-fill: transparent;
    --brand-style-card-edge: transparent;
    --brand-style-card-border: 0 solid var(--brand-style-card-edge);
    --brand-style-caption-rule: 1px solid var(--brand-style-hairline);
    --brand-style-image-radius: var(--brand-style-card-radius);
    --brand-style-image-outline: inset 0 0 0 1px var(--brand-style-hairline);
  }

  body[data-style-card='ink-panel'] {
    --brand-style-card-radius: 2px;
    --brand-style-card-edge: color-mix(in srgb, var(--marketplace-ink) 52%, transparent);
    --brand-style-caption-rule: 1px solid var(--brand-style-hairline);
    --brand-style-card-shadow: 2px 3px 0 color-mix(in srgb, var(--marketplace-ink) 18%, transparent);
  }

  body[data-style-card='cut-edge'] {
    --brand-style-card-shadow: 0 1px 3px rgb(0 0 0 / 12%);
  }

  body[data-style-card='postcard'] {
    --brand-style-card-radius: 8px;
    --brand-style-card-shadow: 0 4px 14px rgb(0 0 0 / 10%);
    --brand-style-image-outline: inset 0 0 0 3px color-mix(in srgb, var(--marketplace-paper) 75%, transparent);
  }

  body[data-style-card='soft-edge'] {
    --brand-style-card-radius: 12px;
    --brand-style-card-shadow: 0 3px 10px rgb(0 0 0 / 8%);
  }

  body[data-style-ornament='hairline'] { --brand-style-rule: 1px solid var(--brand-style-hairline); }
  body[data-style-ornament='ink-rule'] { --brand-style-rule: 2px solid var(--brand-style-hairline); }
  body[data-style-ornament='double-rule'] { --brand-style-rule: 3px double var(--brand-style-hairline); }
  body[data-style-photo='editorial'] { --brand-style-photo-filter: saturate(0.94); }
  body[data-style-photo='warm-print'] { --brand-style-photo-filter: sepia(0.1) saturate(1.05); }
  body[data-style-motion='quick'] { --brand-style-hover-time: 110ms; }
  body[data-style-motion='soft'] { --brand-style-hover-time: 240ms; }

  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame], .site-header, .site-footer) {
    --font-display: var(--brand-style-display-font);
    --font-body: var(--brand-style-body-font);
    --font-ui: var(--brand-style-label-font);
    font-family: var(--font-body) !important;
  }

  body[data-brand-style] :is(main.universal-template .spot, .spot[data-home-frame]) {
    --spot-style-phone-size: var(--brand-style-hero-phone);
    --spot-style-accent-fill: none;
    --spot-style-accent-clip: border-box;
    --spot-style-accent-ink: var(--brand-style-accent-ink);
    --spot-style-button-radius: var(--brand-style-button-radius);
    --spot-style-button-face: var(--brand-style-label-font);
    --spot-style-button-weight: var(--brand-style-button-weight);
    --spot-style-button-tracking: var(--brand-style-button-tracking);
    --spot-style-button-case: var(--brand-style-button-case);
    --spot-style-button-fill: var(--cta-from);
    --spot-style-sweep-display: none;
  }

  body[data-brand-style] main.universal-template {
    --tile-radius: var(--brand-style-card-radius);
    --tile-cap-title-size: var(--brand-style-card-size);
    --card-motion: 0;
    --card-sheen: 0;
    --card-shadow-rest: none;
    --card-shadow-hover: none;
    --brand-style-ring-display: none;
    background: var(--marketplace-paper) !important;
    color: var(--marketplace-ink) !important;
  }

  body[data-brand-style] .spot[data-home-frame] .spot-h,
  body[data-brand-style] main.universal-template :is(.spot-h, .hero-title, .section-title, .ecosystem-title) {
    font-family: var(--brand-style-display-font) !important;
    font-weight: var(--brand-style-heading-weight) !important;
    text-transform: var(--brand-style-heading-case) !important;
    letter-spacing: var(--brand-style-heading-tracking) !important;
    color: var(--marketplace-ink) !important;
    -webkit-text-fill-color: currentColor !important;
  }

  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame]) :is(.spot-h, .hero-title, .section-title) :is(span, em, a) {
    font-family: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
  }

  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame]) :is(.spot-h em, .hero-title-gradient, .animated-title-hl) {
    background: none !important;
    color: var(--brand-style-accent-ink) !important;
    -webkit-text-fill-color: currentColor !important;
    font-style: var(--brand-style-accent-style) !important;
    animation: none !important;
  }

  body[data-brand-style] .category-ticker,
  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame]) :is(.spot-eyebrow, .section-eyebrow, .tile-cap-top) {
    font-family: var(--brand-style-label-font) !important;
  }
  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame]) :is(.spot-lede, .section-subtitle, .tile-cap-detail) {
    font-family: var(--brand-style-body-font) !important;
  }
  body[data-brand-style] main.universal-template :is(.section-title, .ecosystem-title):not(.about-faq-fold *) {
    font-size: var(--brand-style-section-size) !important;
    line-height: 1.1 !important;
    text-shadow: none !important;
  }
  body[data-brand-style] main.universal-template :is(.section-header, .ps-head) {
    border-block-end: var(--brand-style-rule) !important;
    padding-block-end: 0.75rem;
  }
  body[data-brand-style] main.universal-template .about-faq-fold .aff { border-block-start: var(--brand-style-rule) !important; }

  body[data-brand-style] main.universal-template :is(.events-section, .categories-section, .artists-section, .venues-section, .getaways-section, .blog-section) {
    padding-block-start: var(--brand-style-section-space) !important;
  }

  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame]) .spot-h { font-size: var(--brand-style-hero-desktop) !important; }

  body[data-brand-style] main.universal-template :is(
    .event-card, .blog-card, .getaway-card, .category-card, .loc-card, .artist-card, .venue-card:not(.phone-rows *)
  ) {
    border: var(--brand-style-card-border) !important;
    border-radius: var(--brand-style-card-radius) !important;
    background-color: var(--brand-style-card-fill) !important;
    box-shadow: var(--brand-style-card-shadow) !important;
    transition: border-color var(--brand-style-hover-time) var(--brand-style-hover-ease) !important;
  }
  body[data-brand-style] main.universal-template :is(.event-card, .blog-card, .getaway-card, .loc-card, .venue-card)::after,
  body[data-brand-style] main.universal-template :is(.category-border, .getaway-border, .venue-card-border, .loc-card-border) {
    display: none !important;
  }
  body[data-brand-style] main.universal-template :is(
    .event-card > .event-img, .blog-card > .blog-img, .getaway-card > .getaway-image,
    .loc-card > .loc-card-img, .venue-card:not(.phone-rows *) > .venue-card-image-wrap
  ) {
    border-radius: var(--brand-style-image-radius) var(--brand-style-image-radius) 0 0 !important;
    clip-path: inset(0 round var(--brand-style-image-radius) var(--brand-style-image-radius) 0 0) !important;
    box-shadow: var(--brand-style-image-outline) !important;
  }
  body[data-brand-style] main.universal-template :is(.event-img, .blog-img, .getaway-image, .loc-card-img, .venue-card-image-wrap) img:not(.bs-fit-backdrop) {
    filter: var(--brand-style-photo-filter) !important;
  }
  body[data-brand-style] main.universal-template .tile-cap {
    border-block-start: var(--brand-style-caption-rule) !important;
  }
  body[data-style-card='wall-label'] main.universal-template .tile-cap {
    background: transparent !important;
    padding-inline: 2px !important;
  }
  body[data-style-card='wall-label'] main.universal-template .category-icon {
    background: color-mix(in srgb, var(--section-gradient-to) 10%, transparent) !important;
    box-shadow: none !important;
    color: var(--section-gradient-to) !important;
    border-radius: var(--brand-style-card-radius) !important;
  }
  body[data-style-card='wall-label'] main.universal-template .category-name {
    color: var(--marketplace-ink) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  body[data-brand-style] main.universal-template .tile-cap-title {
    font-family: var(--brand-style-card-font) !important;
    font-weight: var(--brand-style-card-weight) !important;
    letter-spacing: var(--brand-style-heading-tracking) !important;
    text-transform: var(--brand-style-heading-case) !important;
    color: var(--marketplace-ink) !important;
    -webkit-text-fill-color: currentColor !important;
  }
  body[data-brand-style] :is(.category-ticker svg, .spot[data-home-frame] .spot-ctas svg, .site-header button .lucide),
  body[data-brand-style] main.universal-template :is(.tile-cap-icon, .category-icon svg, .aff-chev) {
    stroke-width: var(--brand-style-icon-weight);
  }

  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame], .site-header, .sticky-signup-bar) .bs-cta:not(.bs-cta--quiet) {
    font-family: var(--brand-style-label-font) !important;
    font-weight: var(--brand-style-button-weight) !important;
    border-radius: var(--brand-style-button-radius) !important;
    letter-spacing: var(--brand-style-button-tracking) !important;
    text-transform: var(--brand-style-button-case) !important;
    transition: background-color var(--brand-style-hover-time) var(--brand-style-hover-ease) !important;
  }
  body[data-brand-style] :is(main.universal-template, .spot[data-home-frame]) .spot-ctas .bs-cta::after {
    animation: none !important;
    display: none !important;
  }

  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body[data-brand-style] main.universal-template :is(.event-card, .blog-card, .getaway-card, .category-card, .loc-card, .venue-card):hover {
      border-color: var(--section-gradient-to) !important;
    }
  }
  @media (hover: none) {
    body[data-brand-style] main.universal-template :is(.event-card, .blog-card, .getaway-card, .category-card, .loc-card, .venue-card, .artist-card) {
      --brand-style-card-shadow: none;
      box-shadow: none !important;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    body[data-brand-style] { --brand-style-hover-time: 0s; }
  }
}
