/* GASLESS project presentation.
   Brand assets and copy are reused from the GASLESS website codebase. */

@font-face {
  font-family: "Gasless Nippo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/projects/gasless/fonts/nippo-700.woff2") format("woff2");
}

:root {
  --gasless-black: #080908;
  --gasless-surface: #111211;
  --gasless-white: #f2f2ec;
  --gasless-white-rgb: 242, 242, 236;
}

.dg-item__image.is-gasless {
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(var(--gasless-white-rgb), 0.56);
  background: var(--gasless-black);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 14px rgba(var(--gasless-white-rgb), 0.09);
}

.dg-item__image.is-gasless::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0 38%, rgba(255, 255, 255, 0.045) 49%, transparent 60%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  pointer-events: none;
  content: "";
}

.gasless-tile__mark {
  position: relative;
  z-index: 1;
  display: block;
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(var(--gasless-white-rgb), 0.14));
  pointer-events: none;
}

.dome-shell__viewer-frame.is-gasless {
  width: min(390px, 48vw);
  height: min(390px, 48vw);
}

.dome-shell__viewer-card.is-gasless {
  isolation: isolate;
  border-color: rgba(var(--gasless-white-rgb), 0.58);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.045), transparent 56%),
    var(--gasless-black);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 0 24px rgba(var(--gasless-white-rgb), 0.12),
    0 20px 52px rgba(0, 0, 0, 0.56);
}

.dome-shell__viewer-card.is-gasless::before {
  --corner-color: rgba(var(--gasless-white-rgb), 0.9);
  z-index: 4;
}

.dome-shell__viewer-card.is-gasless::after {
  z-index: 3;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 50% 48%, transparent 48%, rgba(0, 0, 0, 0.24) 100%);
  pointer-events: none;
}

.gasless-project-link {
  color: var(--gasless-white);
  text-decoration: none;
  outline: none;
  transition: filter 180ms ease, color 180ms ease;
}

.gasless-visual-link {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dome-shell__viewer-card.is-gasless .gasless-visual__mark {
  display: block;
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(var(--gasless-white-rgb), 0.16));
  transition: filter 180ms ease;
  pointer-events: none;
}

.gasless-side {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: clamp(190px, 18vw, 260px);
  transform: translateY(-50%);
  pointer-events: auto;
}

.gasless-side--brand {
  right: calc(100% + clamp(28px, 4vw, 66px));
  display: flex;
  justify-content: center;
}

.gasless-side--copy {
  left: calc(100% + clamp(28px, 4vw, 66px));
  display: flex;
  justify-content: flex-start;
}

.gasless-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
}

.dome-shell__viewer-card.is-gasless .gasless-brand__wordmark,
.gasless-brand__wordmark {
  display: block;
  width: 100%;
  height: auto;
  max-height: 116px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.46));
  transition: filter 180ms ease;
}

.gasless-copy {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  text-align: left;
}

.gasless-copy__text {
  display: inline;
  color: var(--gasless-white);
  font-family: "Gasless Nippo", "Arial Narrow", sans-serif;
  font-size: clamp(18px, 1.45vw, 23px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.045em;
  text-transform: none;
}

.gasless-copy__word {
  display: inline-block;
  white-space: nowrap;
}

.gasless-copy__letter {
  display: inline-block;
  transform: skewX(0deg);
  transform-origin: 50% 75%;
  transition: transform 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .gasless-brand:hover .gasless-brand__wordmark {
    filter:
      drop-shadow(0 8px 18px rgba(0, 0, 0, 0.46))
      drop-shadow(0 0 8px rgba(var(--gasless-white-rgb), 0.28));
  }

  .gasless-visual-link:hover .gasless-visual__mark {
    filter: drop-shadow(0 0 12px rgba(var(--gasless-white-rgb), 0.28));
  }

  .gasless-copy:hover .gasless-copy__letter {
    transform: skewX(-22deg);
  }
}

.gasless-brand:focus-visible .gasless-brand__wordmark {
  filter:
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.46))
    drop-shadow(0 0 8px rgba(var(--gasless-white-rgb), 0.34));
}

.gasless-visual-link:focus-visible .gasless-visual__mark {
  filter: drop-shadow(0 0 12px rgba(var(--gasless-white-rgb), 0.34));
}

.gasless-copy:focus-visible .gasless-copy__letter {
  transform: skewX(-22deg);
}

@media (max-width: 1024px) {
  .dome-shell__viewer-frame.is-gasless {
    width: min(330px, 68vw);
    height: min(330px, 68vw);
  }

  .gasless-side {
    top: calc(100% + 14px);
    width: min(38vw, 270px);
    transform: none;
  }

  .gasless-side--brand {
    right: calc(50% + 8px);
  }

  .gasless-side--copy {
    left: calc(50% + 8px);
  }

  .gasless-brand__wordmark {
    max-height: 80px;
  }

  .gasless-copy__text {
    font-size: clamp(16px, 2.25vw, 20px);
  }
}

@media (max-width: 767px) {
  .dome-shell__viewer-frame.is-gasless {
    top: 33%;
    width: min(270px, 72vw);
    height: min(270px, 72vw);
  }

  .gasless-side {
    right: auto;
    left: 50%;
    width: min(82vw, 320px);
    transform: translateX(-50%);
    text-align: center;
  }

  .gasless-side--brand {
    top: calc(100% + 4px);
  }

  .gasless-side--copy {
    top: calc(100% + 86px);
  }

  .gasless-brand {
    width: min(68vw, 238px);
  }

  .gasless-brand__wordmark {
    width: 100%;
    max-height: 78px;
  }

  .gasless-copy {
    text-align: center;
  }

  .gasless-copy__text {
    font-size: 14px;
    line-height: 1.08;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gasless-project-link,
  .gasless-visual__mark,
  .gasless-brand__wordmark,
  .gasless-copy__letter {
    transition: none;
  }
}
