/* /media — every post and film, in shelves (worker.ts mediaPage). Rides on post.css's tokens. */
/* Flat, so the fade under the wall lands on exactly the colour below it. */
.md-body { min-height: 100svh; background: var(--bg); }

.md-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(11, 26, 20, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(246, 239, 226, 0.08);
}
.md-body { --gutter: clamp(16px, 4vw, 56px); }
.md-tabs { display: flex; gap: 6px; }
.md-tabs a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 18px; transition: color 150ms, background-color 150ms;
}
.md-tabs a:hover, .md-tabs a:focus-visible { color: var(--cream); background: rgba(246, 239, 226, 0.08); }

.md { padding-bottom: 56px; }
.md-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(76svh, 720px); display: grid; align-items: end;
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(32px, 5vw, 56px);
}
/* The wall: the stories themselves, tilted, drifting slowly, fading out toward the words. */
.md-wall {
  position: absolute; z-index: -1; inset: -12% -8% -12% -30%;
  display: grid; align-content: center; gap: 16px;
  transform: rotate(-7deg); opacity: 0.6;
  -webkit-mask-image: linear-gradient(to right, #000 18%, rgba(0, 0, 0, 0.5) 46%, transparent 72%);
  mask-image: linear-gradient(to right, #000 18%, rgba(0, 0, 0, 0.5) 46%, transparent 72%);
}
.md-wall-row { display: flex; gap: 16px; width: max-content; animation: md-drift 110s linear infinite; }
.md-wall-row:nth-child(2) { animation-direction: reverse; animation-duration: 140s; }
.md-wall-row:nth-child(3) { animation-duration: 125s; }
.md-wall-row img { height: clamp(150px, 19vw, 230px); width: auto; border-radius: 14px; display: block; }
@keyframes md-drift { to { transform: translateX(50%); } }
.md-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 14%, rgba(11, 26, 20, 0.6) 38%, rgba(11, 26, 20, 0) 66%);
}
.md-hero-text { max-width: 640px; }
.md-jump { display: flex; gap: 10px; flex-wrap: wrap; }
.md-jump .sc-btn { width: auto; max-width: none; min-width: 140px; }
@media (prefers-reduced-motion: reduce) { .md-wall-row { animation: none; } }
@media (max-width: 760px) {
  .md-hero { min-height: 68svh; }
  .md-wall { inset: -10% -60% 20% -60%; opacity: 0.45; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 85%); mask-image: linear-gradient(to bottom, #000 30%, transparent 85%); }
}
.md-hero h1 { margin: 0; font-size: clamp(40px, 7vw, 76px); line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; }
.md-hero p { margin: 18px 0 0; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.8; color: var(--muted); max-width: 52ch; }

.md-sec { padding-top: clamp(28px, 5vw, 56px); scroll-margin-top: 64px; }
.md-sec-head { padding: 0 var(--gutter) 6px; display: grid; gap: 6px; }
.md-sec-head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 900; color: var(--gold); }
.md-sec-head p { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.7; max-width: 60ch; }

.md-row { margin-top: 26px; }
.md-row-head { display: flex; align-items: baseline; gap: 12px; padding: 0 var(--gutter) 12px; }
.md-row-head h3 { margin: 0; font-size: 20px; font-weight: 900; }
.md-row-head span { font-size: 14px; color: var(--muted); }

.md-rail-wrap { position: relative; }
.md-rail {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 10px; scrollbar-width: none;
}
.md-rail::-webkit-scrollbar { display: none; }

.md-card { flex: none; display: grid; align-content: start; gap: 8px; color: var(--cream); text-decoration: none; scroll-snap-align: start; }
.md-post { width: 172px; }
.md-film { width: 150px; }
.md-pic { position: relative; display: block; overflow: hidden; border-radius: 14px; background: #14251E; }
.md-post .md-pic { aspect-ratio: 4 / 5; }
.md-film .md-pic { aspect-ratio: 9 / 16; }
.md-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1); }
.md-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(246, 239, 226, 0.08); pointer-events: none; transition: box-shadow 150ms; }
.md-card:hover .md-pic img { transform: scale(1.04); }
.md-card:hover .md-pic::after { box-shadow: inset 0 0 0 1px rgba(215, 180, 106, 0.55); }
.md-card:focus-visible { outline: none; }
.md-card:focus-visible .md-pic::after { box-shadow: inset 0 0 0 2px var(--gold); }
.md-card:active .md-pic { transform: scale(0.98); }
.md-pic { transition: transform 120ms ease-out; }
.md-t { font-size: 15px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.md-s { margin-top: -5px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-dur {
  position: absolute; bottom: 8px; inset-inline-end: 8px; direction: ltr;
  padding: 2px 7px; border-radius: 8px; background: rgba(0, 0, 0, 0.6);
  font: 600 12px/1.4 system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #fff;
}

/* Arrows only where a mouse needs them; a finger or a trackpad scrolls the rail itself. */
.md-arrow {
  position: absolute; top: calc(50% - 40px); z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer; color: var(--cream);
  background: rgba(16, 30, 24, 0.9); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(246, 239, 226, 0.12);
  transition: transform 120ms ease-out, background-color 150ms;
}
.md-arrow[hidden] { display: none; }
.md-arrow:hover { background: #1C3A30; }
.md-arrow:active { transform: scale(0.94); }
.md-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.md-prev { right: 8px; }
.md-next { left: 8px; }
@media (hover: none) { .md-arrow { display: none; } }

/* The footer: the app's offer with both stores, then the brand, its pages and its four social accounts. */
.md-foot {
  margin-top: clamp(56px, 9vw, 112px);
  padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(246, 239, 226, 0.09);
  background: linear-gradient(to bottom, rgba(215, 180, 106, 0.05), rgba(215, 180, 106, 0) 320px);
}
.md-foot-get {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 40px;
  padding: clamp(36px, 6vw, 64px) 0 clamp(32px, 5vw, 48px);
}
.md-foot-get h2 { margin: 0; grid-column: 1; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; font-weight: 900; color: var(--cream); letter-spacing: -0.01em; }
.md-foot-get p { margin: 10px 0 0; grid-column: 1; color: var(--muted); font-size: 17px; line-height: 1.8; max-width: 46ch; }
.md-stores { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.md-stores .store {
  display: inline-flex; align-items: center; gap: 10px; min-width: 176px; height: 56px; padding: 0 18px;
  border-radius: 16px; text-decoration: none; color: var(--cream);
  background: rgba(246, 239, 226, 0.06); border: 1px solid rgba(246, 239, 226, 0.16);
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.md-stores .store:hover, .md-stores .store:focus-visible { background: rgba(246, 239, 226, 0.11); border-color: rgba(215, 180, 106, 0.55); }
.md-stores .store svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.md-stores .store > span { display: grid; white-space: nowrap; line-height: 1.15; font-size: 17px; font-weight: 700; font-family: system-ui, -apple-system, sans-serif; direction: ltr; text-align: start; }
.md-stores .store small { font-size: 11.5px; font-weight: 400; color: var(--muted); direction: rtl; text-align: end; font-family: var(--font); }

.md-foot-base {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid rgba(246, 239, 226, 0.07);
}
.md-foot-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.md-foot-brand img { width: 44px; height: 44px; border-radius: 11px; display: block; }
.md-foot-brand span { display: grid; gap: 2px; }
.md-foot-brand b { font-size: 19px; font-weight: 900; }
.md-foot-brand small { font-size: 13.5px; color: var(--muted); }
.md-foot-links { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; }
.md-foot-links a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 12px;
  transition: color 150ms, background-color 150ms;
}
.md-foot-links a:hover, .md-foot-links a:focus-visible { color: var(--cream); background: rgba(246, 239, 226, 0.06); }
.md-socials { display: flex; gap: 10px; }
.md-soc {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--cream);
  border: 1px solid rgba(246, 239, 226, 0.16); background: rgba(246, 239, 226, 0.03);
  transition: color 180ms, border-color 180ms, background-color 180ms;
}
.md-soc svg { width: 21px; height: 21px; display: block; }
.md-soc:hover, .md-soc:focus-visible { color: var(--gold); border-color: rgba(215, 180, 106, 0.6); background: rgba(215, 180, 106, 0.08); }
.md-foot :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 760px) {
  .md-foot-get { grid-template-columns: minmax(0, 1fr); }
  .md-stores { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .md-foot { margin-top: 32px; }
  .md-stores { flex-wrap: nowrap; gap: 10px; }
  .md-stores .store { flex: 1 1 0; min-width: 0; height: 54px; padding: 0 12px; gap: 8px; justify-content: center; }
  .md-stores .store > span { font-size: 15.5px; }
  .md-stores .store svg { width: 22px; height: 22px; }
  .md-foot-base { flex-direction: column; align-items: flex-start; }
  .md-foot-links { margin-inline-start: 0; margin-inline-start: -12px; }
}

@media (max-width: 760px) {
  .md-post { width: 138px; }
  .md-film { width: 122px; }
  .md-rail { gap: 10px; }
  .md-tabs a { padding: 8px 10px; font-size: 14px; }
}

/* /media/social: a download button under each card */
.md-cell { flex: none; display: grid; align-content: start; gap: 10px; scroll-snap-align: start; }
.md-cell .md-card { scroll-snap-align: none; }
.md-dl { display: block; text-align: center; padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(215, 180, 106, 0.55); color: var(--gold); font-size: 14px; font-weight: 600; text-decoration: none; }
.md-dl:hover, .md-dl:focus-visible { background: var(--gold); color: #0B1A14; outline: none; }

.md-copy { cursor: pointer; background: transparent; font-family: inherit; }

/* /media: everything but one post and one film is in the app only */
.md-locked .md-pic img { filter: blur(6px) brightness(0.62); transform: scale(1.08); }
.md-card.md-locked:hover .md-pic img { transform: scale(1.1); }
.md-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--cream); font-size: 13px; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.md-lock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
