/* Page openings share the approved photographic moss canvas on phones. */
@media (max-width: 700px) {
  body[data-page][data-mobile-cover-theme] .site-header {
    color: #fff8e9;
  }
  body[data-page][data-mobile-cover-theme] .site-header .menu-toggle {
    color: #fff8e9; border-color: #fff8e999;
  }
  body[data-page][data-mobile-cover-theme] .site-header .menu-toggle span {
    background: #fff8e9;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] {
    --ink: #fff8e9; --forest: #fff8e9; --muted: #e2e8d9;
    --olive-text: #d4dfb7; --line: #e2e8c94d;
    /* One moss palette and falloff for the gift cover and product introductions. */
    --mobile-cover-moss-stops: #1b30206b 0%, #1b302026 22%,
      #1b30200d 34%, #1b302073 48%, #1b3020db 65%, #1b3020fa 84%, #1b3020 100%;
    position: relative !important; isolation: isolate;
    display: flex !important; flex-direction: column; align-items: stretch;
    justify-content: flex-end; width: 100vw !important; max-width: none !important;
    min-height: 100svh !important; height: auto !important; aspect-ratio: auto !important;
    margin: 0 calc(50% - 50vw) !important;
    padding: calc(var(--header, 88px) + 42px) var(--mobile-gutter, 20px)
      calc(76px + env(safe-area-inset-bottom)) !important;
    background: #1b3020 !important; color: #fff8e9;
    border: 0; border-radius: 0; overflow: hidden;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover]::before {
    display: none !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover]::after {
    content: "" !important; display: block !important;
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    width: 100%; height: 100%; margin: 0; border: 0; transform: none;
    background: linear-gradient(var(--mobile-cover-moss-direction, 180deg), var(--mobile-cover-moss-stops));
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-layout] {
    display: contents !important; position: static !important;
    margin: 0; padding: 0; transform: none;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-image] {
    position: absolute !important; inset: 0 !important; z-index: 0 !important;
    display: block !important; width: 100% !important; height: 100% !important;
    min-height: 0 !important; max-height: none !important; aspect-ratio: auto !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; transform: none !important;
    background: transparent !important; opacity: 1 !important; overflow: hidden;
    clip-path: none !important; mask-image: none !important; -webkit-mask-image: none !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-image]::before,
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-image]::after {
    display: none !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-image]
    :is(figure, .media-frame, .about-heritage-image, picture) {
    position: absolute !important; inset: 0 !important; display: block !important;
    width: 100% !important; height: 100% !important; min-height: 0 !important;
    max-height: none !important; aspect-ratio: auto !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; transform: none !important;
    background: transparent !important; clip-path: none !important; overflow: hidden;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-image] img {
    position: absolute !important; inset: 0 !important;
    display: block !important; width: 100% !important; height: 100% !important;
    max-height: none !important; aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: var(--cms-image-position-mobile, 50% 40%) !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; transform: none !important;
    filter: none !important; opacity: 1 !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-decoration],
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-image] figcaption {
    display: none !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] [data-mobile-cover-copy] {
    position: relative !important; inset: auto !important; z-index: 2;
    display: block !important; width: 100% !important; max-width: 540px !important;
    min-width: 0; margin: 0 !important; padding: 0 !important;
    background: transparent !important; border: 0; transform: none !important;
    text-align: left !important; color: #fff8e9;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] h1 {
    margin: 16px 0 20px !important; max-width: 100%;
    color: #fff8e9 !important; font-size: var(--cms-heading-size-mobile, clamp(34px, 9vw, 46px)) !important;
    line-height: 1.12 !important; letter-spacing: -.025em; text-align: left !important;
    text-shadow: none !important; text-wrap: balance;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] h1 em { color: #dce4bc !important; }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] :is(p, a, strong, dt, dd, .book-story-deck) {
    color: #eaf0df !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] p:not(:is(.eyebrow, .tea-kicker, .ct-kicker,
    .gift-kicker, .book-story-kicker, .about-prologue-kicker, .gift-ambassador-value)) {
    max-width: 38em; font-size: var(--cms-body-size-mobile, 14px) !important;
    line-height: 1.75 !important; text-align: left !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] :is(.eyebrow, .tea-kicker, .ct-kicker,
    .gift-kicker, .book-story-kicker, .about-prologue-kicker, .gift-ambassador-value) {
    color: #d4dfb7 !important; font-size: 9px !important;
    line-height: 1.65; letter-spacing: .14em;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] :is(.text-link, .tea-hero-discover,
    .ct-hero-link, .gift-detail-scroll, .museum-scroll) {
    display: inline-flex; align-items: center; min-height: 44px;
    margin-top: 22px; color: #fff8e9 !important; border-color: #dce4bc80 !important;
    font-size: 11px !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] :is(.gift-breadcrumb,
    .founder-breadcrumb, .ngoc-variety-breadcrumb, .fermented-breadcrumb) {
    position: absolute; top: calc(var(--header, 88px) + 10px); left: var(--mobile-gutter, 20px);
    right: var(--mobile-gutter, 20px); z-index: 2; margin: 0; padding: 0;
    font-size: 9px; background: transparent; color: #eaf0df;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] :is(.fermented-index, .founder-themes) {
    position: relative; z-index: 2; margin-top: 24px; color: #eaf0df;
    border-color: #dce4bc4d; background: transparent;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] .about-title-native :is(text, tspan) {
    fill: #fff8e9 !important;
  }
  body[data-page][data-mobile-cover-theme] main [data-mobile-cover] .about-title-art {
    width: 100%; max-width: 430px; background: transparent;
  }
  body[data-page][data-mobile-cover-theme] main .gift-set-page-header {
    position: absolute; top: calc(var(--header, 88px) + 10px); z-index: 3;
    width: calc(100% - 2 * var(--mobile-gutter, 20px));
    left: var(--mobile-gutter, 20px); margin: 0; padding: 0; color: #eaf0df;
  }
  body[data-page][data-mobile-cover-theme] main .gift-set-page-header :is(a, span) { color: #eaf0df; }
  body[data-page][data-mobile-cover-theme] main .gift-set-page { padding-top: 0 !important; }
  body[data-page][data-mobile-cover-theme] main .gift-set-page .gift-set-story { padding-top: 0 !important; }
  body[data-page][data-mobile-cover-theme] main .gift-set-page .gift-journey-wrap > .gift-book-story {
    padding-top: 0 !important;
  }
  /* The details are moved here as original nodes, outside the photographic cover. */
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details {
    --ink: #22352a; --forest: #22352a; --muted: #627060;
    --olive-text: #5b713d; --line: #a9b69566;
    display: block; position: relative; width: 100vw; max-width: none;
    margin: 0 calc(50% - 50vw); padding: 32px var(--mobile-gutter, 20px) 40px;
    background: var(--paper, #f6f4ea); color: var(--ink);
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details > * {
    margin: 0;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details > * + * {
    margin-top: 26px;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details :is(p, dd) {
    color: var(--muted) !important; font-size: 14px; line-height: 1.8;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details :is(a, dt, strong) {
    color: var(--ink) !important;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .fermented-facts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px; padding: 0; border: 0;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .fermented-facts dt {
    font-size: clamp(20px, 5.5vw, 25px); line-height: 1.25;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .fermented-facts dd {
    margin: 10px 0 0; font-size: 11px; line-height: 1.75;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .fermented-index {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    border-color: var(--line); background: transparent;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .fermented-index a {
    min-height: 54px; padding-block: 14px; font-size: 11px; border-color: var(--line);
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .founder-index {
    display: flex; flex-wrap: wrap; gap: 10px 24px;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .founder-index a {
    min-height: 44px; font-size: 11px; border-color: var(--line);
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details .founder-themes {
    display: flex; flex-wrap: wrap; gap: 12px 20px;
    padding: 20px 0 0; border-color: var(--line);
    color: var(--muted); font-size: 9px; line-height: 1.65;
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details > [data-mobile-cover-detail="story"] {
    max-width: 42em; padding: 0; color: var(--muted);
  }
  body[data-page][data-mobile-cover-theme] main .mobile-cover-details > [data-mobile-cover-detail="story"] + [data-mobile-cover-detail="story"] {
    margin-top: 20px;
  }
}

/* Phone openings: a slow arrival from the nearer horizontal edge.
   The about page keeps its separate art direction. */
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  body[data-page]:not([data-page="/gioi-thieu"]) {
    --mobile-intro-duration: 1.7s;
    --mobile-intro-easing: cubic-bezier(.42, 0, .58, 1);
    --mobile-intro-copy-easing: cubic-bezier(.55, 0, .8, .45);
    --mobile-intro-delay: .12s;
  }

  body[data-page]:not([data-page="/gioi-thieu"]) main
    :is([data-mobile-cover-copy], .meet-hero-copy, .book-story-intro)[data-mobile-intro-ready] h1,
  body[data-page="/"] main .hero-carousel .hero-slide.is-active .hero-content[data-mobile-intro-ready] h1 {
    animation: mobile-cover-title-arrive var(--mobile-intro-duration)
      var(--mobile-intro-easing) var(--mobile-intro-delay) both;
  }

  /* Fade the kicker, its rule and the rendered descriptions together.
     Ease in gently so the copy reaches full contrast only as the title settles. */
  body[data-page]:not([data-page="/gioi-thieu"]) main
    :is([data-mobile-cover-copy], .meet-hero-copy, .book-story-intro)[data-mobile-intro-ready]
    p:not([data-mobile-cover-detail]),
  body[data-page="/"] main .hero-carousel .hero-slide.is-active .hero-content[data-mobile-intro-ready] :is(.eyebrow, .lead) {
    animation: mobile-cover-copy-arrive var(--mobile-intro-duration)
      var(--mobile-intro-copy-easing) var(--mobile-intro-delay) both;
  }
}

@keyframes mobile-cover-title-arrive {
  from { opacity: 0; transform: translate3d(var(--mobile-intro-offset-x, -48px), 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes mobile-cover-copy-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
