@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400..750&display=swap');

/* One palette for the storefront, translated pages, ordering and club.
   Important declarations in this layer take precedence over older page themes. */
@layer rituals-palette {
  @media screen and (forced-colors: none) {
    :root {
      --rituals-ink: #000;
      --rituals-silver: #eceef2;
      --rituals-control: #dde1e7;
      --rituals-active: #c5cbd4;
      --rituals-stroke: #77818e;
      color-scheme: light;
      background: var(--rituals-silver) !important;
    }

    body {
      --mojo-ink: var(--rituals-ink) !important;
      --mojo-accent: var(--rituals-ink) !important;
      --mojo-divider: #c3c9d2 !important;
      --ink: var(--rituals-ink) !important;
      --wine: var(--rituals-ink) !important;
      --cb-cherry: var(--rituals-ink) !important;
      min-height: 100vh;
      background-color: var(--rituals-silver) !important;
      background-image: var(--mojo-pearl, none) !important;
      background-repeat: no-repeat !important;
      background-size: cover !important;
      background-attachment: fixed !important;
    }

    body, body :where(*) {
      color: var(--rituals-ink) !important;
      -webkit-text-fill-color: currentColor !important;
      text-shadow: none !important;
    }

    /* Let the page finish show through layout boxes and transparent product photos. */
    :where(main, header, footer, nav, section, article, aside, div, figure,
           figcaption, ul, ol, li, form, fieldset, label, details, table, th, td,
           h1, h2, h3, h4, h5, h6, p, a, span, small, strong, mark, img):where(:not(.menu-banner)) {
      background-color: transparent !important;
      background-image: none !important;
    }

    /* Fixed controls, overlays and text on photographs need an opaque surface. */
    :where(header, footer, dialog, [popover], .mojo-mobile-nav, .mobile-nav,
           .more-menu, .oh-more > div, .rituals-menu-panel, .category-bar,
           .category-tabs, .table-categories, .admin-tabs, .admin-order-popup,
           .mojo-analytics-choice, .basket-panel, .cart-panel, .panel, .member-card,
           .wallet-card, .mf-header, .mf-composer, .mf-chat-note, .skip-link:focus,
           .ct-sticker, .ct-photo-caption, .ct-photo-index, .store-photo > span,
           .pickup-bar, .hc-callout span, .photo-label, .photo-caption) {
      background-color: var(--rituals-silver) !important;
      background-image: var(--mojo-pearl-panel, none) !important;
    }

    :where(.service-state, .availability-banner, .scan-status, .notice, .wallet-identity,
           .mf-bubble, .table-order-notes, .product-nutrition .nutrition-allergens,
           .table-pill, .admin-tab-count, .wallet-provider-indicator, .ct-step-number) {
      background: var(--rituals-control) !important;
    }

    :where(button, select, option, textarea, input:not([type="checkbox"]):not([type="radio"])) {
      background-color: var(--rituals-silver) !important;
      background-image: none !important;
      border-color: var(--rituals-stroke) !important;
    }

    :where(input, progress) { accent-color: var(--rituals-ink) !important; }
    ::placeholder { color: var(--rituals-ink) !important; opacity: .7; }

    :where(.button, .pill, .ct-button, .rituals-order, .mojo-header-order,
           .mojo-mobile-order, .mobile-order-cart, .mobile-basket-toggle, .table-cart-open,
           .wallet-save-button, .mf-launcher, .mf-open, .mf-add, .mf-submit, .mf-chat-send,
           .hc-primary, .landing-primary, .product-add, .product-go, .detail-add,
           .product-image > button, .landing-secondary, .hc-arrow, .sun-arrows button,
           .ct-rail-controls button) {
      background: var(--rituals-control) !important;
      border: 1px solid var(--rituals-ink) !important;
      box-shadow: none !important;
    }

    :where(.rituals-menu-toggle, .rituals-menu-panel button, .mojo-site-footer button,
           .text-link, .text-button, .hc-dots button, .hc-pause, .mojo-language-picker select) {
      background: transparent !important;
    }

    :where(button, a.button, .rituals-order, .ct-button, .pill):not(:disabled):hover,
    :where(.landing-quick-menu a, .rituals-menu-panel a):hover {
      background-color: var(--rituals-control) !important;
    }

    :where(button[aria-selected="true"], button[aria-pressed="true"], .tabs button.active,
           .category-button.active, .is-selected, .mf-message-user .mf-bubble) {
      background: var(--rituals-active) !important;
      box-shadow: inset 0 -2px var(--rituals-ink) !important;
    }

    :where(.table-progress span, .hc-dots button span) {
      background: var(--rituals-active) !important;
    }
    :where(.table-progress .done, .hc-dots button[aria-current="true"] span,
           .mobile-toggle span, .rituals-menu-toggle span) {
      background: var(--rituals-ink) !important;
    }

    :where(.menu-product h3, .order-product h3)::after,
    .catalog-section-title::before { background: var(--rituals-stroke) !important; }
    .signature-stage::before { content: none !important; }
    .landing-hero::after { background: none !important; }

    :where(a, button, input, select, textarea, summary):focus-visible {
      outline: 2px solid var(--rituals-ink) !important;
      outline-offset: 3px;
    }

    ::selection { background: #c1cad7; color: #000; }
  }

  @media screen and (max-width: 700px) and (forced-colors: none) {
    body { background-attachment: scroll !important; }
  }
}

@layer rituals-palette {
  body, body :where(*) { text-transform: uppercase !important; }
  body :is(input[type="email"], input[type="password"], input[type="url"]) {
    text-transform: none !important;
  }
  @media screen and (forced-colors: none) {
    :root { --rituals-red: #a51d28; }
    body :is(.brand, .brand *, .wordmark, .wordmark *, .logo, .logo *, .scan-header > a:first-child, .scan-header > a:first-child *) {
      color: var(--rituals-red) !important;
    }
    .menu-product h3::after, .menu-product-name::after, .order-product h3::after,
    .catalog-section-title::before { background: var(--rituals-red) !important; }
    body :is(.category-button.active, .category-button[aria-pressed="true"], .category-button[aria-selected="true"]) {
      box-shadow: inset 0 -2px var(--rituals-red) !important;
    }
    body :is(.order-product-image, .menu-product-image, .product-image, .bundle-visual,
             .order-detail-visual, .detail-image-wrap, .table-detail-image, .landing-product-image,
             .signature-stage, .signature-caption, .order-product, .menu-product, .product-card),
    body :is(.order-product-image, .product-image, .bundle-visual, .order-detail-visual,
             .detail-image-wrap, .landing-product-image) img {
      background: transparent !important;
      box-shadow: none !important;
    }
  }
}

/* The floating cart, checkout and notification surfaces share a dark palette. */
@layer rituals-palette {
  @media screen and (forced-colors: none) {
    body :is(.availability-banner, .service-state, .notice,
             #notice, .scan-status, .demo-notice, .admin-order-popup, .mf-notice,
             .mojo-analytics-choice, [role="alert"], [role="status"]:not(.sr-only)) {
      --rituals-ink: #fff;
      --rituals-silver: #171717;
      --rituals-control: #222;
      --rituals-active: #333;
      --rituals-stroke: #929292;
      --mojo-divider: #555;
      color-scheme: dark;
      background: #000 !important;
      color: #fff !important;
      border-color: #666 !important;
    }

    :is(.admin-order-popup, .mojo-analytics-choice) :is(button, .button, input, select, textarea) {
      background-color: #171717 !important;
      border-color: #929292 !important;
      color: #fff !important;
    }
    :is(.cart-panel, .basket-panel, #basket-dialog, #table-cart-dialog) ::placeholder {
      color: #555 !important;
      opacity: 1;
    }
  }
}

@layer rituals-palette {


  @media screen and (forced-colors: none) {
    body :is(button, .button, .pill, .ct-button, .rituals-order,
             .mojo-header-order, .landing-primary, .landing-secondary,
             .hc-primary, .landing-quick-menu a, .product-go, .wallet-save-button)
         :where(span, strong, small) { color: inherit !important; }

    body :is(button, .button, .pill, .ct-button, .rituals-order,
             .mojo-header-order, .landing-primary, .landing-secondary,
             .hc-primary, .landing-quick-menu a, .product-go, .wallet-save-button)
         :where(svg) { color: inherit !important; }

    body :is(button, .button, .pill, .ct-button, .rituals-order,
             .mojo-header-order, .landing-primary, .landing-secondary,
             .hc-primary, .landing-quick-menu a, .product-go, .wallet-save-button):where(:not(
             .mobile-order-cart, .mobile-basket-toggle, .table-cart-open, .mojo-mobile-order,
             .rituals-menu-toggle, .mobile-toggle, .menu-product, .order-product-image, .product-details-trigger)) {
      background: var(--rituals-red) !important;
      color: #fff !important;
      border-color: var(--rituals-red) !important;
    }

    body :is(.category-bar, .category-tabs, .table-categories) button {
      background: transparent !important;
      color: #000 !important;
      border-color: transparent !important;
      box-shadow: none !important;
    }
    body :is(.category-bar, .category-tabs, .table-categories) button:is(.active, [aria-pressed="true"], [aria-selected="true"]) {
      background: var(--rituals-red) !important;
      color: #fff !important;
      box-shadow: none !important;
    }
  }
}

@layer rituals-palette {
  :root {
    --rituals-type: "DM Sans", Arial, sans-serif;
    --rituals-ui-type: "Bebas Neue", "Arial Narrow", sans-serif;
  }
  body,
  body :where(*):not(:where(.brand, .brand *, .wordmark, .wordmark *, .logo, .logo *, svg, svg *)) {
    font-family: var(--rituals-type) !important;
    letter-spacing: normal !important;
  }
  body {font-weight: 400; line-height: 1.5;}
  body :is(h1,h2,h3,h4), body :is(h1,h2,h3,h4) :where(*) {
    font-weight: 400 !important;
    letter-spacing: normal !important;
  }
  body :is(h1,h2), body :is(h1,h2) :where(*) {font-weight: 750 !important;}
  body h1 {font-size: clamp(2.35rem,6vw,5.35rem) !important; line-height: 1.04 !important;}
  body h2 {font-size: clamp(1.5rem,3vw,2.5rem) !important; line-height: 1.15 !important;}
  body :is(.order-product,.menu-product,.product-card) :is(h3,p,.product-details-trigger,.product-bottom strong,.price) {
    font-size: .875rem !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
  }
  body :is(.order-product,.menu-product,.product-card,.table-product) :is(h3,h3 span,.product-details-trigger) {
    font-weight: 700 !important;
  }
  body :is(nav a,button,input,select,textarea):not(:where(.brand,.brand *,.wordmark,.wordmark *,.logo,.logo *)) {
    font-family: var(--rituals-ui-type) !important;
    font-weight: 400 !important;
  }
  body :is(.category-button,.category-bar button,.category-tabs button,.table-categories button,.landing-quick-menu a),
  body :is(.category-button,.category-bar button,.category-tabs button,.table-categories button,.landing-quick-menu a) span {
    font-family: var(--rituals-ui-type) !important;
    font-size: .875rem !important;
    font-weight: 700 !important;
    letter-spacing: .1em !important;
    line-height: 1.58 !important;
  }
}

@layer rituals-palette {
  @media screen and (forced-colors: none) {
    body :is(.menu-product, .order-product, .product-card, .order-product-image,
             .menu-product-image, .menu-product-info, .product-details-trigger,
             .product-image, .bundle-visual, .detail-image-wrap, .order-detail-visual,
             .table-detail-image-wrap, .signature-caption),
    body :is(.menu-product, .order-product, .product-card) h3 {
      background: transparent !important;
      border-color: transparent !important;
      box-shadow: none !important;
      color: #000 !important;
    }
    body .signature-caption { backdrop-filter: none !important; }
  }
}

@layer rituals-palette {
  .mojo-site-header > .brand {
    scale: 1.6;
    transform-origin: center;
    transition: scale .2s ease-out;
  }
  .mojo-site-header.logo-scrolled > .brand { scale: .96; }
  @media (prefers-reduced-motion: reduce) {
    .mojo-site-header > .brand { transition: none; }
  }
  @media screen and (forced-colors: none) {
    body :is(.mobile-order-cart, .mobile-basket-toggle, .table-cart-open,
             .mojo-mobile-order, .cart-panel, .basket-panel, #basket-dialog, #table-cart-dialog) {
      color-scheme: light;
      color: #000 !important;
      background: var(--mojo-pearl-panel, linear-gradient(135deg,#fcfcfe,#e4e7ed 55%,#f8f9fb)) !important;
      border-color: #b6bbc3 !important;
    }
  }
}

/* Reserve a separate row when the enlarged wordmark and order controls cannot fit. */
@media (max-width: 430px) {
  .mojo-site-header.has-rituals-menu:not(.logo-scrolled) {
    grid-template-rows: 52px 44px !important;
    height: auto !important;
  }
  .mojo-site-header.has-rituals-menu:not(.logo-scrolled) > .brand {
    grid-area: 1 / 1 / 2 / -1 !important;
  }
  .mojo-site-header.has-rituals-menu:not(.logo-scrolled) > .header-actions {
    grid-area: 2 / 2 / 3 / -1 !important;
  }
  .mojo-site-header.has-rituals-menu:not(.logo-scrolled) > .rituals-menu-toggle {
    grid-area: 2 / 1 !important;
  }
  .mojo-site-header.has-rituals-menu:not(.logo-scrolled) .rituals-login { position: static !important; transform: none !important; max-width: none !important; }
}

@layer rituals-palette {
  /* Supporting text follows the same regular cut as the catalog. */
  body :is(p, small, figcaption, .menu-ingredients, .product-description,
           .muted, .stock-label, .notice, .payment-note, .identity-note,
           .mf-chat-subtitle, .mf-chat-note, .mojo-footer-fine):not(.brand *, .wordmark *, .logo *),
  body :is(p, small, figcaption, .menu-ingredients, .product-description, .muted) :where(span, em) {
    font-family: var(--rituals-type) !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
  }

  body :is(h1, h2).needs-period::after { content: '.'; }

  @media screen and (forced-colors: none) {
    body :is(.landing-quick-menu, .category-bar, .category-tabs, .table-categories),
    body .landing-quick-menu a,
    body :is(.category-bar, .category-tabs, .table-categories) button,
    body :is(.category-bar, .category-tabs, .table-categories) button:is(.active, [aria-pressed="true"], [aria-selected="true"]),
    body .mojo-site-header :is(.rituals-order, .rituals-login, #account-open, .home-account, .mojo-header-order) {
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      color: #000 !important;
    }
    body .landing-quick-menu a,
    body :is(.category-bar, .category-tabs, .table-categories) button {
      text-decoration: underline !important;
      text-decoration-thickness: 1px !important;
      text-underline-offset: .22em !important;
    }
    body :is(.category-bar, .category-tabs, .table-categories) button:is(.active, [aria-pressed="true"], [aria-selected="true"]) {
      color: var(--rituals-red) !important;
      text-decoration-thickness: 2px !important;
    }
    body :is(.category-bar, .category-tabs, .table-categories) button span { color: inherit !important; }

    body button.product-add {
      display: inline-grid !important;
      place-items: center;
      min-width: 44px;
      min-height: 44px;
      padding: 0 !important;
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      color: var(--rituals-red) !important;
      font-size: 0 !important;
    }
    body button.product-add::before, body button.product-add::after {
      content: '';
      grid-area: 1 / 1;
      width: 18px;
      height: 1.5px;
      background: currentColor;
      border-radius: 2px;
    }
    body button.product-add::after { transform: rotate(90deg); }
    body button.product-add:disabled { opacity: .4; }
  }
}

@layer rituals-palette {
  body .landing-quick-menu a,
  body :is(.category-bar,.category-tabs,.table-categories) button {
    border: 1px solid #aeb1b6 !important;
    border-radius: 999px !important;
    padding: .45em .95em !important;
    text-decoration: none !important;
  }
  body :is(.category-bar,.category-tabs,.table-categories) button:is(.active,[aria-pressed="true"],[aria-selected="true"]) {
    border: 1px solid var(--rituals-red) !important;
    background: var(--rituals-red) !important;
    color: white !important;
    text-decoration: none !important;
  }
  .product-bottom:has(.card-quantity) { flex-wrap: wrap; gap: .25rem; }
  .card-quantity {display:inline-flex;align-items:center;}
  body .card-quantity button {background:transparent !important;color:var(--rituals-red) !important;border:0 !important;padding:0 !important;width:34px;height:44px;font-size:23px;}
  .card-quantity button:disabled {opacity:.33;}
  .card-quantity output {min-width:1.2em;text-align:center;}
  .ig-gallery {max-width:1100px;margin:1.25rem auto;width:94%;}
  .ig-track {display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;}
  .ig-track a {position:relative;flex:0 0 calc((100% - 24px)/3);scroll-snap-align:start;}
  .ig-track img {width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;display:block;}
  body .ig-track a span {position:absolute;bottom:12px;left:12px;background:#fff !important;color:#161616 !important;border-radius:20px;padding:4px 12px;text-transform:uppercase !important;}
  @media(max-width:680px){.ig-track a{flex-basis:83%;}}
}

@layer rituals-palette {
  body #mojo-concept-title {
    font-size: clamp(2.55rem, 7.4vw, 6.4rem) !important;
    line-height: 1.02 !important;
    text-wrap: balance;
    letter-spacing: -.04em !important;
    margin-block-end: clamp(14px, 1.5vw, 22px);
  }
  .mojo-landing-main {
    --section-inset: clamp(20px, 5vw, 76px);
  }
  body .landing-quick-menu {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 12px;
    width: auto !important;
    margin: 0 !important;
    padding: 18px var(--section-inset) !important;
  }
  body .landing-quick-menu a, body .landing-access a {
    flex: 0 1 auto !important;
    width: fit-content !important;
    max-width: 100%;
    min-height: 44px !important;
    padding: 9px 16px !important;
    border-radius: 999px !important;
    text-align: center;
    justify-content: center;
  }
  body .landing-access {gap: 10px 12px;max-width: 100%;}
  body :is(.category-bar,.category-tabs,.table-categories) {
    box-sizing: border-box;
    gap: 8px !important;
    padding-inline: clamp(12px, 3vw, 30px) !important;
    max-width: 100%;
  }
  body :is(.category-bar,.category-tabs,.table-categories) button {
    flex: 0 0 auto !important;
    min-height: 42px;
    width: auto !important;
  }
  body .ig-gallery {width: calc(100% - 2 * var(--section-inset)); margin-block: 0 1rem;}
  .landing-location > *, .landing-concept-copy > * {min-width: 0;}
}

@layer rituals-palette {
  body :is(h1,h2,h3,h4,h5,h6), body :is(h1,h2,h3,h4,h5,h6) :where(*) {
    font-family: var(--rituals-type) !important;
    text-transform: lowercase !important;
    overflow-wrap: break-word;
  }
  body h3 { font-size: 1.25rem !important; line-height: 1.2 !important; }
  body :is(.order-product,.menu-product,.product-card,.table-product) :is(h3,.product-details-trigger) {
    font-family: var(--rituals-type) !important;
    text-transform: lowercase !important;
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
  }
  body p, body :is(.order-product,.menu-product,.product-card) p,
  body :is(.product-description,.menu-ingredients,.landing-concept-description) {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }
  body p, body p :where(span,em), body :is(.product-description,.menu-ingredients) {
    text-transform: uppercase !important;
  }
  body :is(small,figcaption,.stock-label,.payment-note,.mojo-footer-fine) {font-size: .875rem !important;}
}

@layer rituals-palette {
  body .landing-quick-menu {
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,12rem));
    grid-auto-rows: 1fr;
    align-items: stretch;
  }
  body .landing-quick-menu a {
    box-sizing: border-box;
    width: 100% !important;
    height: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  @media (max-width: 760px) {
    body .landing-quick-menu {grid-template-columns: repeat(2,minmax(0,12rem));}
  }
}

@layer rituals-palette {
  body :is(#product-dialog, #table-product-dialog, dialog.order-product-dialog),
  body :is(#product-dialog, #table-product-dialog, dialog.order-product-dialog) * {
    text-transform: lowercase !important;
  }
}
