@import url('https://status.manworld.sbs/assets/css/normalize.css') layer(normalize);

@layer normalize, base, demo;

@layer demo {
  body {
    background: light-dark(#fff, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    padding-block: 2rem;
  }

  h1,
  p {
    margin: 0;
  }

  h1.fluid {
    --font-size-min: 22;
    --font-level: 4.25;
  }

  h3 {
    white-space: nowrap;
    margin: 0;
  }

  body > p {
    width: 74ch;
    max-width: calc(100% - 4rem);
    text-wrap: balance;
    font-family: monospace;
    margin-bottom: 0rem;
    line-height: 1.5;
    opacity: 0.8;
    font-weight: 400;

    @media (max-width: 768px) {
      text-align: center;
    }
  }

  li :is(svg, h3) {
    opacity: 0.6;
    transition: opacity calc(var(--speed) * 1.2) var(--easing);
  }

  li :is(a, p) {
    opacity: 0;
    transition: opacity calc(var(--speed) * 1.2) var(--easing);
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
  }

  li img {
    filter: grayscale(1) brightness(1.5);
    scale: 1.1;
    transition-property: filter, scale;
    transition-duration: calc(var(--speed) * 1.2);
    transition-timing-function: var(--easing);
  }

  [data-active='true'] :is(a, p, h3, svg) {
    opacity: var(--opacity, 1);
  }
  [data-active='true'] :is(a, p) {
    transition-delay: calc(var(--speed) * 0.25);
  }

  [data-active='true'] img {
    filter: grayscale(0) brightness(1);
    scale: 1;
    transition-delay: calc(var(--speed) * 0.25);
  }

  article {
/*     outline: 2px dashed canvasText; */
    width: calc(var(--article-width) * 1px);
    height: 100%;
    position: absolute;
    font-family: monospace;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1rem;
    padding-inline: calc(var(--base) * 0.5 - 9px);
    padding-bottom: 1rem;
    overflow: hidden;

    h3 {
      position: absolute;
      top: 1rem;
      left: calc(var(--base) * 0.5);
      transform-origin: 0 50%;
      rotate: 90deg;
      font-size: 1rem;
      font-weight: 300;
      text-transform: uppercase;
      font-family: monospace;
    }
    svg {
      width: 18px;
      fill: none;
    }

    p {
      font-size: 13px;
      text-wrap: balance;
      line-height: 1.25;
      --opacity: 0.8;
    }

    a {
      position: absolute;
      bottom: 1rem;
      height: 18px;
      line-height: 1;
      color: inherit;
      

      &:is(:focus-visible, :hover) {
        outline: none;
        span {
          text-decoration: underline;
          text-underline-offset: 4px;
        }
      }

      span {
        display: inline-block;
        line-height: 18px;
        translate: calc(var(--base) * 0.5);
        font-weight: 500;
      }
    }

    img {
      position: absolute;
      pointer-events: none;
      inset: 0;
      width: 100%;
      height: 100%;
      -o-object-fit: cover;
         object-fit: cover;
      -webkit-mask: radial-gradient(100% 100% at 100% 0, #fff, #0000);
              mask: radial-gradient(100% 100% at 100% 0, #fff, #0000);
    }
  }
  /* gotta use some Math on the container really */
  /* width is "ideal" 7 * 80px + 6 * gap + say 300px or whatever the ideal width is */
  :root {
    --gap: 8px;
    --base: clamp(2rem, 8cqi, 80px);
    --easing: linear(
      0 0%,
      0.1538 4.09%,
      0.2926 8.29%,
      0.4173 12.63%,
      0.5282 17.12%,
      0.6255 21.77%,
      0.7099 26.61%,
      0.782 31.67%,
      0.8425 37%,
      0.8887 42.23%,
      0.9257 47.79%,
      0.9543 53.78%,
      0.9752 60.32%,
      0.9883 67.11%,
      0.9961 75%,
      1 100%
    );
    --speed: 0.6s;
  }
  ul {
    display: grid;
    container-type: inline-size;
    grid-template-columns: 10fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: var(--gap);
    list-style-type: none;
    justify-content: center;
    padding: 0;
    height: clamp(300px, 40dvh, 474px);
    margin: 0;
    width: calc(
      ((var(--items) - 1) * var(--base)) + ((var(--items) - 1) * var(--gap)) +
        var(--ideal)
    );
    width: 820px;
    max-width: calc(100% - 4rem);
    transition: grid-template-columns var(--speed) var(--easing);
    transition: grid-template-columns var(--speed) var(--easing), -ms-grid-columns var(--speed) var(--easing);
  }

  li {
    /* outline: 4px dashed canvasText; */
    background: light-dark(#fff, #000);
    position: relative;
    overflow: hidden;
    min-width: var(--base);
    border-radius: 8px;
    border: 1px solid color-mix(in hsl, canvas, canvasText 50%);
  }
}

@layer base {
  :root {
    --font-size-min: 16;
    --font-size-max: 20;
    --font-ratio-min: 1.2;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
  }

  html {
    color-scheme: light dark;
  }

  [data-theme='light'] {
    color-scheme: light only;
  }

  [data-theme='dark'] {
    color-scheme: dark only;
  }

  :where(.fluid) {
    --fluid-min: calc(
      var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0))
    );
    --fluid-max: calc(
      var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0))
    );
    --fluid-preferred: calc(
      (var(--fluid-max) - var(--fluid-min)) /
        (var(--font-width-max) - var(--font-width-min))
    );
    --fluid-type: clamp(
      (var(--fluid-min) / 16) * 1rem,
      ((var(--fluid-min) / 16) * 1rem) -
        (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) +
        (var(--fluid-preferred) * var(--variable-unit, 100vi)),
      (var(--fluid-max) / 16) * 1rem
    );
    font-size: var(--fluid-type);
  }

  *,
  *:after,
  *:before {
    box-sizing: border-box;
  }

  body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue',
      Helvetica, Arial, sans-serif, system-ui;
  }

  body::before {
    --size: 45px;
    --line: color-mix(in hsl, canvasText, transparent 70%);
    content: '';
    height: 100vh;
    width: 100vw;
    position: fixed;
    background: linear-gradient(
          90deg,
          var(--line) 1px,
          transparent 1px var(--size)
        )
        50% 50% / var(--size) var(--size),
      linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% /
        var(--size) var(--size);
    -webkit-mask: linear-gradient(-20deg, transparent 50%, white);
            mask: linear-gradient(-20deg, transparent 50%, white);
    top: 0;
    transform-style: flat;
    pointer-events: none;
    z-index: -1;
  }

  .bear-link {
    color: canvasText;
    position: fixed;
    top: -22px;
    left: 1rem;
    /*width: 48px;*/
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    /*opacity: 0.8;*/
  }

  :where(.x-link, .bear-link):is(:hover, :focus-visible) {
    opacity: 1;
  }

  .bear-link svg {
    width: 75%;
  }

  /* Utilities */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

  .desktop {
    display: block;
  }

  @media (max-width: 1024px) {
    .desktop {
      display: none;
    }
  }

    .mobilet {
      display: none;
    }
  
    @media (max-width: 1024px) {
      .mobilet {
        display: block;
      }
    }
    
    
.blinking {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}










@import url('https://fonts.googleapis.com/css2?family=Reddit+Mono:wght@200..900&display=swap');
@import url('https://unpkg.com/normalize.css') layer(normalize);

@layer normalize, base, demo, snapping;

@layer snapping {
  @supports (animation-timeline: scroll()) {
    .scroller header,
    .scroller footer {
      scroll-snap-align: unset;
    }
    .scroller header {
      --align: start;
      animation: snap both linear reverse;
      animation-timeline: scroll(nearest);
      animation-range: calc(var(--padding, 0) * 1px) 0;
    }
    .scroller footer {
      --align: end;
      animation: snap both linear;
      animation-timeline: scroll(nearest);
      animation-range: calc(100% - (var(--padding, 0) * 1px)) 100%;
    }
    @keyframes snap {
      to {
        scroll-snap-align: var(--align, start);
      }
    }
  }
}

@layer demo {
  :root {
    --size: 300px;
    --radius: 32;
    --padding: 64px;
    --bg: hsl(180 0% 33%);
    --bar: hsl(0 0% 100% / 0.5);
    --panel: hsl(20 60% 50%);
    timeline-scope: --scroller;
  }
  /**
   * Think the idea here would be to translate a fake scrollbar up/down
   * Clip the edges and rotate a clipped bordered element on the ends
   * If we need the fatness, we need to go with something like a morphing SVG
   * Or we might get away with transform-origin 100% 0 and scale 1.1 to get the thicc
   * Might be easier to drop two SVG at each end though for that.
   * */
  .scroller {
    position: relative;
    width: clamp(300px, 50vmin, 600px);
    aspect-ratio: 3 / 4;
    resize: both;
    overflow: hidden;
    /* padding: 0 0.5rem 0 0; */
    padding: 1rem;
  }

  .scroller img {
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    filter: contrast(1.5) grayscale(1);
  }

  .bar__thumb,
  .bar__track {
    opacity: 0;
    transition: opacity 0.2s;
  }

  [data-rounded-scroll='true'] .scroller :is(.bar__thumb, .bar__track) {
    opacity: 1;
  }

  .scroller > svg {
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    right: 1rem;
    pointer-events: none;
    /* height: 100%; */
    width: calc(var(--radius) * 2px);
    overflow: visible !important;
    z-index: 2;
  }

  [data-rounded-scroll='true'] .scroller div::-webkit-scrollbar {
    display: none;
  }

  [data-rounded-scroll='true'] div::-webkit-scrollbar {
    display: none;
    opacity: 0 !important;
  }

  [data-rounded-scroll='true'] .scroller div {
    scrollbar-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .scroller path {
    stroke-width: calc(var(--stroke-width) * 1px);
  }

  .bar__thumb {
    stroke: color-mix(
      in hsl,
      var(--color, #fff),
      #0000 calc((1 - var(--bar-alpha, 0.5)) * 100%)
    );
    stroke-dasharray: var(--thumb-size) var(--track-length);
  }

  @supports (animation-timeline: scroll()) {
    .bar__thumb {
      animation: scroll both linear;
      animation-timeline: --scroller;
    }
  }

  /* Keyframes are generated via JavaScript for dynamic stuff */

  .bar__track {
    stroke: hsl(0 0% 100% / var(--track-alpha, 0));
  }

  .scroller > div {
    height: 100%;
    width: 100%;
    overflow: auto;
    background: light-dark(#fff, #000);
    border-radius: calc(var(--radius) * 1px);
    display: grid;
    grid-auto-flow: row;
    gap: 0;
    margin: 0;
    padding: calc(var(--padding) * 1px) 0;
    list-style-type: none;
    scroll-snap-type: y mandatory;
    scroll-timeline: --scroller;
    scroll-behavior: smooth;
    outline: 1px solid color-mix(in lch, canvas, canvasText);
    outline-offset: 1px;

    &::after {
      content: '';
      height: calc(var(--stroke, 4) * 1px);
      width: clamp(40px, 50%, 80px);
      background: canvasText;
      border-radius: 100px;
      position: absolute;
      bottom: calc(1rem + 4px);
      left: 50%;
      translate: -50% -50%;
    }
  }

  .scroller > div > * {
    padding-inline: 1.25rem;
  }
  .scroller main :not(:last-child) {
    margin-bottom: 2rem;
  }

  .scroller main p:last-of-type {
    opacity: 0.4;
  }

  .scroller p {
    opacity: 0.6;
    font-size: 0.875rem;
  }

  .scroller header {
    scroll-snap-align: start;
    margin-block: 2rem;
    text-transform: uppercase;
    font-family: 'Reddit Mono', monospace;

    div {
      margin-block: 4rem;
    }

    h1 {
      font-size: 1.25rem;
      font-weight: 300;
      margin: 0;
    }
    p {
      margin: 0;
      font-size: 1rem;
      font-weight: 300;
    }
  }

  .scroller footer {
    scroll-snap-align: end;
    padding-inline: 1rem;
    text-align: center;
    padding-block: 1rem;
    font-size: 0.75rem;
    opacity: 0.5;
  }
}

@layer base {
  :root {
    --font-size-min: 16;
    --font-size-max: 20;
    --font-ratio-min: 1.2;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
  }

  html {
    color-scheme: light dark;
  }

  [data-theme='light'] {
    color-scheme: light only;
  }

  [data-theme='dark'] {
    color-scheme: dark only;
  }

  :where(.fluid) {
    --fluid-min: calc(
      var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0))
    );
    --fluid-max: calc(
      var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0))
    );
    --fluid-preferred: calc(
      (var(--fluid-max) - var(--fluid-min)) /
        (var(--font-width-max) - var(--font-width-min))
    );
    --fluid-type: clamp(
      (var(--fluid-min) / 16) * 1rem,
      ((var(--fluid-min) / 16) * 1rem) -
        (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) +
        (var(--fluid-preferred) * var(--variable-unit, 100vi)),
      (var(--fluid-max) / 16) * 1rem
    );
    font-size: var(--fluid-type);
  }

  *,
  *:after,
  *:before {
    box-sizing: border-box;
  }

  body {
    background: light-dark(#fff, #000);
    display: grid;
    place-items: center;
    min-height: 100vh;
    font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue',
      Helvetica, Arial, sans-serif, system-ui;
  }

  body::before {
    --size: 45px;
    --line: color-mix(in hsl, canvasText, transparent 70%);
    content: '';
    height: 100vh;
    width: 100vw;
    position: fixed;
    background: linear-gradient(
          90deg,
          var(--line) 1px,
          transparent 1px var(--size)
        )
        50% 50% / var(--size) var(--size),
      linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% /
        var(--size) var(--size);
    mask: linear-gradient(-20deg, transparent 50%, white);
    top: 0;
    transform-style: flat;
    pointer-events: none;
    z-index: -1;
  }

  .bear-link {
    color: canvasText;
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 48px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    opacity: 0.8;
  }

  :where(.x-link, .bear-link):is(:hover, :focus-visible) {
    opacity: 1;
  }

  .bear-link svg {
    width: 75%;
  }

  /* Utilities */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

div.tp-dfwv {
  width: 280px;
  * {
    text-transform: lowercase;
  }
}
