/* gospel.to Trending: Trending Spec 2c on phones, 5a ("Glass band") from
   560px. Loads on top of app.css and home1a.css (tokens, top bar, footer) and
   browse-dark.css (the solid top bar).
   Phones (2c): the ten cards in a column, each under its big rank number, the
   icon fading into the card, then the details, View app and Share.
   Web (5a): a row of 4:5 glass cards, each one link: the icon fills the card,
   a frosted band at the bottom carries the name and rating and opens on hover
   or focus to show the description and View app. Every hover change is
   written from --h (0 or 1, on the list item) with a transition. */

.tr{--tr-pad:16px;padding:28px 0 48px}
.tr-wrap{padding:0 var(--tr-pad)}
.tr-dot{color:rgba(244,243,239,.4)}

/* breadcrumb */
.tr-bc{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;line-height:1.4;color:rgba(244,243,239,.56);text-transform:lowercase}
.tr-bc a{color:rgba(244,243,239,.64);padding:12px 0;margin:-12px 0;transition:color .2s}
.tr-bc a:hover{color:#fff}

/* header: title, intro, then the count and date (and, on web, the arrows) */
.tr-head{margin:18px 0 0}
.tr-title{margin:0;font-family:var(--serif);font-weight:300;font-size:48px;line-height:1;letter-spacing:-.03em;color:var(--ink)}
.tr-intro{margin:12px 0 0;max-width:560px;font-size:16px;line-height:1.5;color:rgba(244,243,239,.72)}
.tr-count{margin:8px 0 0;font-size:13px;line-height:1.4;color:rgba(244,243,239,.56)}
.tr-ctrl{display:none}
.tg{display:none}
.tr-arrow{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;cursor:pointer;color:var(--ink);
  background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);transition:background .2s,opacity .3s}
.tr-arrow:hover{background:rgba(255,255,255,.12)}
.tr-arrow[aria-disabled="true"]{opacity:.3;cursor:default}
.tr-arrow[aria-disabled="true"]:hover{background:rgba(255,255,255,.06)}

/* the cards */
.tr-list{list-style:none;margin:16px 0 0;padding:0 var(--tr-pad);display:flex;flex-direction:column;gap:12px}
.tc{display:flex;flex-direction:column;min-width:0}
/* the rank: a band above the card, the digits running on behind the card's top */
.tc-band{position:relative;z-index:0;height:64px;padding-left:12px;pointer-events:none;-webkit-user-select:none;user-select:none}
.tc-n{display:block;font-family:var(--serif);font-weight:400;font-size:112px;line-height:1;letter-spacing:-.05em;
  font-variant-numeric:lining-nums;font-feature-settings:"lnum";color:transparent;-webkit-text-fill-color:transparent;
  background:linear-gradient(180deg,#f4f3ef 10%,rgba(244,243,239,.18));-webkit-background-clip:text;background-clip:text}
.tc-card{position:relative;z-index:1;flex:1;display:flex;flex-direction:column;border-radius:22px;background:#131316;overflow:hidden}
/* the 1px ring, over the icon too */
.tc-card::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);pointer-events:none}
.tc-art{position:relative;display:block;aspect-ratio:1/1;background:#1b1b1f;container-type:inline-size}
.tc-art img{display:block;width:100%;height:100%;object-fit:cover}
.tc-mono{display:grid;place-items:center;width:100%;height:100%;font-family:var(--serif);font-weight:300;font-size:96px;font-size:44cqi;line-height:1}
.tc-art::after{content:"";position:absolute;left:0;right:0;bottom:0;height:20%;background:linear-gradient(rgba(19,19,22,0),#131316);pointer-events:none}
.tc-body{flex:1;display:flex;flex-direction:column;padding:16px 18px 20px}
.tc-name{margin:0;font-family:var(--sans);font-weight:600;font-size:20px;line-height:1.25;color:var(--ink);overflow-wrap:anywhere}
/* phone: one line, star and rating, ratings, category, price, a dot between each */
.tc-meta{margin:8px 0 0;font-size:13.5px;line-height:1.4;color:rgba(244,243,239,.64)}
.tc-meta b{font-weight:500;color:var(--ink)}
.tc-meta .tr-dot{margin:0 6px}
.tc-star{display:inline-block;width:12px;height:12px;margin-right:5px;vertical-align:-1px;color:var(--gold)}
.tc-desc{margin:10px 0 0;font-size:15px;line-height:1.5;color:rgba(244,243,239,.76)}
.tc-acts{display:flex;gap:10px;margin-top:auto;padding-top:16px}
.tc-view{flex:1;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 16px;border-radius:14px;
  background:var(--ink);color:#0a0a0a;font-weight:600;font-size:16px;white-space:nowrap;transition:background .2s}
.tc-view:hover{background:#fff}
.tc-go{flex:none}
.tc-share{position:relative;flex:none;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:14px;cursor:pointer;
  color:var(--ink);background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);transition:background .2s}
.tc-share:hover{background:rgba(255,255,255,.12)}
.tc-share .ico{display:block;width:18px;height:18px}
/* "Link copied", over the button, where a share sheet is not available */
.tc-say{position:absolute;bottom:calc(100% + 8px);right:0;padding:5px 10px;border-radius:8px;background:#26262b;color:var(--ink);
  font-size:13px;font-weight:500;line-height:1.4;white-space:nowrap;opacity:0;transition:opacity .2s;pointer-events:none}
.tc-share.said .tc-say{opacity:1}
.tc-say:empty{padding:0}
.tc-view:focus-visible,.tc-share:focus-visible,.tr-arrow:focus-visible,.tr-next:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* after the cards: on to the categories */
.tr-next{display:block;max-width:560px;margin:32px 0 0;padding:20px 22px;border-radius:22px;color:var(--ink);
  background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);transition:background .2s}
.tr-next:hover{background:rgba(255,255,255,.07)}
.tr-next-label{display:block;font-size:13px;line-height:1.4;color:rgba(244,243,239,.56)}
.tr-next-name{display:block;margin:6px 0 0;font-weight:600;font-size:20px;line-height:1.3}
.tr-arw{display:inline-block;transition:transform .3s var(--ease)}
.tr-next:hover .tr-arw{transform:translateX(4px)}
.tr-next-desc{display:block;margin:6px 0 0;font-size:15px;line-height:1.5;color:rgba(244,243,239,.64)}

/* web (5a), from 560px. The page margin is 64px at 1280 (less on narrower
   windows, the site's content column on wider ones). Cards are 264 x 330
   (4:5), smaller on windows under about 800px tall so the row and its controls
   stay in view (--cw, at least 200px wide); the number and its space scale with
   them. */
@media (min-width:560px){
  .tr{--tr-pad:max(clamp(24px,5vw,64px),calc((100% - var(--max)) / 2));--cw:clamp(200px,calc((100vh - 372px) * .637),264px);padding:40px 0 72px}
  .tr-bc{font-size:14px}
  .tr-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 40px;margin-top:20px}
  .tr-headtext{flex:0 1 560px;min-width:0}
  .tr-title{font-size:56px}
  .tr-intro{font-size:17px}
  .tr-count{margin:0;font-size:14px}

  /* the row: to both window edges, the first card on the margin; it fades out
     over 40px on the left (the margin only) and 112px on the right. Room under
     the cards for their shadow, taken back from the space before the controls. */
  .tr-list{flex-direction:row;gap:24px;margin:12px 0 -72px;padding:12px 0 72px var(--tr-pad);overflow-x:auto;overflow-y:hidden;
    overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:var(--tr-pad);scrollbar-width:none;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 112px),transparent);
    mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 112px),transparent)}
  .tr-list::-webkit-scrollbar{display:none}
  .tr-list::after{content:"";flex:0 0 calc(var(--tr-pad) - 24px)}
  .tc{--h:0;flex:0 0 var(--cw);width:var(--cw);scroll-snap-align:start}
  .tc:hover,.tc:focus-within{--h:1}
  .tc-card{display:none}

  /* the number: 84px of room above the card, 8px in; the card's top edge is at
     56% of its height, where it has almost faded out. It drifts against the
     card as the row scrolls (--p) and rises 8px on hover. */
  .tc-band{height:calc(var(--cw) * 84 / 264);padding-left:8px;transform:translate(calc(var(--p, 0) * -24px),calc(var(--h) * -8px));transition:transform .6s var(--ease)}
  .tc-n{font-weight:300;font-size:calc(var(--cw) * 150 / 264);
    background:linear-gradient(180deg,#f4f3ef 0%,rgba(244,243,239,.7) 30%,rgba(244,243,239,.05) 56%,rgba(244,243,239,0) 62%);-webkit-background-clip:text;background-clip:text}

  /* the card: one link, five layers (backdrop, icon, sheen, light, band) */
  .tg{position:relative;z-index:1;display:block;height:calc(var(--cw) * 1.25);border-radius:28px;overflow:hidden;background:#131316;color:var(--ink);
    box-shadow:0 0 0 1px rgba(255,255,255,.08),0 40px 80px -40px rgba(0,0,0,.95),0 -18px 36px -22px rgba(0,0,0,.9);
    transform:perspective(1100px) translateY(calc(var(--h) * -4px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition:transform .6s var(--ease);-webkit-tap-highlight-color:transparent}
  .tg:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
  .tg-back,.tg-icon,.tg-sheen,.tg-light{position:absolute;left:0;right:0;top:0;pointer-events:none}
  .tg-back{bottom:0;overflow:hidden}
  .tg-back img,.tg-back .tc-mono{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.24);filter:blur(40px) saturate(1.4);opacity:.9}
  .tg-icon{height:var(--cw);overflow:hidden;container-type:inline-size}
  .tg-icon img,.tg-icon .tc-mono{width:100%;height:100%;object-fit:cover;transform:scale(calc(1 + var(--h) * .04));transition:transform 1s var(--ease)}
  .tg-icon img{display:block}
  .tg-sheen{height:30%;background:linear-gradient(rgba(255,255,255,.16),rgba(255,255,255,0))}
  .tg-light{bottom:0;background:radial-gradient(210px circle at var(--mx, 50%) var(--my, 40%),rgba(255,255,255,.18),rgba(255,255,255,0));
    opacity:var(--h);transition:opacity .5s var(--ease)}

  /* the glass band. 66% dark rather than the prototype's 50%, so the rating
     line keeps its contrast over white and very light icons (spec section 5). */
  .tg-band{position:absolute;left:0;right:0;bottom:0;padding:15px 18px 17px;background:rgba(12,12,14,.66);
    -webkit-backdrop-filter:blur(22px) saturate(1.6);backdrop-filter:blur(22px) saturate(1.6);box-shadow:inset 0 1px 0 rgba(255,255,255,.14)}
  .tg-name{display:block;font-weight:600;font-size:17px;line-height:1.25;color:var(--ink);text-wrap:balance}
  .tg-meta{display:block;margin-top:5px;font-size:13px;line-height:1.3;color:rgba(244,243,239,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tg-meta b{font-weight:500;color:var(--ink)}
  .tg-meta .tr-dot{margin:0 6px}
  /* hidden until hover or focus (or always, where there is no hover): its
     text stays in the link for screen readers */
  .tg-more{display:block;height:calc(max(var(--h), var(--open, 0)) * 88px);overflow:hidden;transition:height .6s var(--ease)}
  .tg-desc,.tg-view{opacity:max(var(--h), var(--open, 0));transition:opacity .45s var(--ease)}
  .tg-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin-top:10px;
    font-size:13.5px;line-height:1.45;color:rgba(244,243,239,.84)}
  .tg-view{display:flex;align-items:center;gap:6px;margin-top:10px;font-weight:600;font-size:13px;line-height:1.3;color:var(--ink)}

  /* under the row: the progress bar on the left, the arrows on the right */
  .tr-ctrl{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:24px}
  .tr-prog{position:relative;flex:none;width:200px;height:2px;border-radius:2px;background:rgba(255,255,255,.12);overflow:hidden}
  .tr-thumb{position:absolute;left:0;top:0;height:100%;width:40%;border-radius:2px;background:var(--ink);transition:transform .25s linear,width .25s linear}
  .tr-arrows{display:flex;gap:8px}
  .tr-next{margin-top:64px;border-radius:20px}
}
/* touch screens have no hover: the band shows the description and View app */
@media (min-width:560px) and (hover:none){ .tr{--open:1} }
/* on load the breadcrumb, header, each card in rank order, then the controls
   fade in and rise 26px, 70ms apart: the first time in a session */
@media (min-width:560px) and (prefers-reduced-motion:no-preference){
  html:not(.tr-seen) .tr-rise{animation:tr-rise 1s var(--ease) both;animation-delay:calc(var(--i, 0) * 70ms)}
}
@keyframes tr-rise{from{opacity:0;translate:0 26px}to{opacity:1;translate:0 0}}
/* reduced motion: no tilt, zoom, drift or lift; the band opens as a plain fade */
@media (min-width:560px) and (prefers-reduced-motion:reduce){
  .tc-band,.tg,.tg-icon img,.tg-icon .tc-mono{transform:none;transition:none}
  .tg-more{transition:none}
}
@media (prefers-reduced-motion: reduce){
  .tr-arrow,.tc-view,.tc-share,.tr-next,.tr-arw,.tc-say,.tr-thumb{transition:none}
}
