/* Roshanan 1.4 — managed collections, three-view products and vapor typography. */

/* Category count is no longer fixed to five. */
.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.category-card__symbol {
  max-width: calc(100% - 48px);
  overflow: hidden;
  color: color-mix(in srgb, var(--copper) 92%, #fff);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* Typographic steam fills the quiet side of the cinematic hero. */
.hero__steam-type {
  position: absolute;
  z-index: 1;
  top: 8%;
  right: clamp(18px, 4.2vw, 88px);
  width: min(34vw, 520px);
  height: 70%;
  overflow: hidden;
  pointer-events: none;
  opacity: .96;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to top, transparent 2%, #000 17%, #000 72%, transparent 98%);
  mask-image: linear-gradient(to top, transparent 2%, #000 17%, #000 72%, transparent 98%);
}

.hero__steam-type::before,
.hero__steam-type::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: 7%;
  width: 80px;
  height: 280px;
  border: 1px solid rgba(246, 229, 202, .18);
  border-color: rgba(246, 229, 202, .2) transparent transparent rgba(246, 229, 202, .1);
  border-radius: 52% 48% 42% 58%;
  filter: blur(9px);
  transform: rotate(-13deg) skewY(-8deg);
  animation: roshananSteamRibbon 8.5s ease-in-out infinite alternate;
}

.hero__steam-type::after {
  right: 47%;
  bottom: 13%;
  width: 48px;
  height: 230px;
  opacity: .6;
  animation-delay: -3.4s;
  animation-duration: 10.5s;
}

.hero__steam-word,
.hero__steam-letter {
  position: absolute;
  bottom: -10%;
  display: block;
  color: rgba(255, 242, 219, .2);
  font-family: var(--heading-font);
  font-weight: 700;
  text-shadow: 0 0 28px rgba(255, 232, 195, .3), 0 0 7px rgba(255, 248, 232, .12);
  white-space: nowrap;
  opacity: 0;
  filter: blur(.7px);
  will-change: transform, opacity, filter;
  animation: roshananSteamWord 11s cubic-bezier(.2, .55, .32, 1) infinite;
}

.hero__steam-word--1 { right: 7%; font-size: clamp(30px, 4.8vw, 76px); animation-delay: -1.5s; }
.hero__steam-word--2 { right: 28%; font-family: Georgia, serif; font-size: clamp(14px, 1.55vw, 25px); letter-spacing: .34em; animation-delay: -7.2s; animation-duration: 13s; }
.hero__steam-word--3 { right: 1%; font-size: clamp(13px, 1.4vw, 22px); letter-spacing: .26em; animation-delay: -5.1s; animation-duration: 10s; }
.hero__steam-word--4 { right: 9%; font-family: Georgia, serif; font-size: clamp(8px, .75vw, 12px); letter-spacing: .32em; animation-delay: -9s; animation-duration: 14.5s; }
.hero__steam-word--5 { right: 46%; font-size: clamp(18px, 2.8vw, 46px); animation-delay: -10.8s; animation-duration: 12.2s; }
.hero__steam-letter { font-family: Georgia, var(--heading-font), serif; font-size: clamp(38px, 6vw, 96px); font-weight: 400; }
.hero__steam-letter--1 { right: 62%; animation-delay: -3.6s; animation-duration: 12.7s; }
.hero__steam-letter--2 { right: 17%; animation-delay: -8.4s; animation-duration: 10.8s; }
.hero__steam-letter--3 { right: 74%; animation-delay: -11s; animation-duration: 14s; }

@keyframes roshananSteamWord {
  0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(.78) rotate(-5deg); filter: blur(6px); }
  18% { opacity: .42; filter: blur(1.1px); }
  55% { opacity: .25; transform: translate3d(-24px, -220px, 0) scale(1.04) rotate(3deg); filter: blur(1.6px); }
  82% { opacity: .1; }
  100% { opacity: 0; transform: translate3d(18px, -430px, 0) scale(1.28) rotate(-4deg); filter: blur(9px); }
}

@keyframes roshananSteamRibbon {
  from { opacity: .3; transform: translate3d(0, 10px, 0) rotate(-13deg) skewY(-8deg) scaleX(.84); }
  to { opacity: .65; transform: translate3d(-28px, -24px, 0) rotate(8deg) skewY(5deg) scaleX(1.18); }
}

/* Three product views: front, package back and price/label. */
[data-product-gallery] .product-card__flip,
.roshanan-product-flip--enabled .product-card:hover .product-card__flip,
.roshanan-product-flip--enabled .product-card:focus-within .product-card__flip {
  transform: none !important;
}

[data-product-gallery] .product-card__face {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: perspective(1300px) rotateY(-82deg) translateX(-9%) scale(.975);
  transform-origin: left center;
  transition: opacity .42s ease, visibility .42s ease, transform calc(.74s * var(--motion, 1)) cubic-bezier(.22, 1, .36, 1);
}

[data-product-gallery][data-face="0"] [data-product-face="0"],
[data-product-gallery][data-face="1"] [data-product-face="1"],
[data-product-gallery][data-face="2"] [data-product-face="2"] {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: perspective(1300px) rotateY(0) translateX(0) scale(1);
}

[data-product-gallery][data-face="0"] [data-product-face="1"],
[data-product-gallery][data-face="1"] [data-product-face="2"],
[data-product-gallery][data-face="2"] [data-product-face="0"] {
  transform: perspective(1300px) rotateY(82deg) translateX(9%) scale(.975);
  transform-origin: right center;
}

.product-card__face--price {
  padding: 35px 30px 29px;
  justify-content: flex-end;
  color: #fff7e8;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 230, 188, .19), transparent 27%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 12px),
    linear-gradient(145deg, #8d5e32, #51331f 64%, #2c1d15);
}

.product-card__face--price::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 235, 201, .28);
  border-radius: calc(var(--card-radius) - 8px);
}

.product-card__face--price > * {
  position: relative;
  z-index: 1;
}

.product-card__face--price small { color: #f3d7ad; font-size: 9px; font-weight: 800; }
.product-card__face--price strong { margin-top: 8px; font-family: var(--heading-font); font-size: 28px; line-height: 1.3; }
.product-card__face--price i { margin-top: 7px; color: rgba(255,255,255,.62); font-size: 9px; font-style: normal; }
.product-card__face--price b { margin-top: 18px; display: inline-flex; align-items: center; gap: 7px; color: #ffe6bd; font-size: 10px; }
.product-card__price-figure { margin-top: 14px; color: #fff; font-family: var(--heading-font); font-size: 24px !important; font-style: normal; font-weight: 800; }

.product-card__face--photo {
  padding: 0;
  justify-content: flex-end;
  background: #102f27;
}

.product-card__face--photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(4, 18, 15, .82));
}

.product-card__face--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__photo-caption {
  position: relative;
  z-index: 2;
  padding: 25px 27px;
  display: flex;
  flex-direction: column;
}

.product-card__photo-caption small { color: #efd0a1; font-size: 9px; font-weight: 800; }
.product-card__photo-caption strong { margin-top: 5px; color: #fff; font-family: var(--heading-font); font-size: 24px; line-height: 1.35; }

.product-card__face-nav {
  position: absolute;
  z-index: 8;
  left: 16px;
  bottom: 14px;
  padding: 7px 9px;
  display: flex;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(7, 29, 24, .52);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .13);
  backdrop-filter: blur(10px);
}

.product-card__face-nav button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  cursor: pointer;
  transition: width .3s ease, background .3s ease, transform .3s ease;
}

.product-card__face-nav button:hover { transform: scale(1.22); }
.product-card__face-nav button.is-active { width: 20px; background: #f1d2a3; }
[data-product-gallery]:not([data-face="0"]) .product-card__badge { opacity: 0; transform: translateY(-8px); }

.roshanan-product-flip--disabled [data-product-face="1"],
.roshanan-product-flip--disabled [data-product-face="2"],
.roshanan-product-flip--disabled .product-card__face-nav { display: none; }
.roshanan-product-flip--disabled [data-product-face="0"] { opacity: 1; visibility: visible; transform: none; }

/* Managed academy cards. */
.roshanan-academy__heading p {
  max-width: 650px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.roshanan-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.roshanan-video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: 0 16px 42px rgba(22, 38, 31, .07);
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease;
}

.roshanan-video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 62px rgba(22, 38, 31, .13);
}

.roshanan-video-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #082820;
}

.roshanan-video-card__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.roshanan-video-card__media > span {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  background: rgba(5,26,21,.55);
  backdrop-filter: blur(8px);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: .14em;
  pointer-events: none;
}

.roshanan-video-card__copy { padding: 18px 20px 21px; }
.roshanan-video-card__copy h4 { margin: 0; color: var(--forest); font-size: 21px; line-height: 1.45; }
.roshanan-video-card__copy p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
.roastery-video .button small { margin-right: 7px; opacity: .72; font-size: 8px; }

@media (max-width: 1120px) {
  .hero__steam-type { right: 2.5vw; width: 31vw; opacity: .68; }
}

@media (max-width: 820px) {
  .hero__steam-type { right: auto; left: -2%; width: 48vw; opacity: .48; }
  .roshanan-video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero__steam-type { display: none; }
  .category-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__steam-type::before,
  .hero__steam-type::after,
  .hero__steam-word,
  .hero__steam-letter { animation: none !important; }
  .hero__steam-word--1 { bottom: 48%; opacity: .1; transform: none; filter: blur(2px); }
  [data-product-gallery] .product-card__face { transition-duration: .01ms; }
}
