@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Extralight.otf") format("opentype");
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-ExtralightItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Light.otf") format("opentype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-LightItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-RegularItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-MediumItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Semibold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-SemiboldItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-BoldItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Black.otf") format("opentype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-BlackItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-Extrablack.otf") format("opentype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Cash Sans";
  src: url("./assets/fonts/cash-sans/CashSans-ExtrablackItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #060606;
  --cash: #00d64f;
  --text: #f5f5f5;
  --tile-size: 228px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Cash Sans", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dragging {
  cursor: grabbing;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

.infinite-grid {
  position: fixed;
  inset: -18vh -18vw;
  z-index: 1;
  pointer-events: none;
  transform-style: preserve-3d;
  perspective: 1400px;
}

.grid-tile {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--tile-size);
  height: var(--tile-size);
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  will-change: transform;
  transform-style: preserve-3d;
}

.tile-image {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 0;
  outline: 0;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
  transform: translateZ(18px);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.48));
}

.edge-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(0, 0, 0, 0) 30%,
      rgba(0, 0, 0, 0.24) 68%,
      rgba(0, 0, 0, 0.54) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.48) 0%,
      rgba(0, 0, 0, 0.1) 38%,
      rgba(0, 0, 0, 0.22) 70%,
      rgba(0, 0, 0, 0.52) 100%
    );
}

.top-bar {
  position: fixed;
  left: clamp(0.9rem, 2.6vw, 2.25rem);
  right: clamp(0.9rem, 2.6vw, 2.25rem);
  top: clamp(0.9rem, 2.6vw, 2rem);
  z-index: 12;
  display: grid;
  gap: 1rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 2rem;
  color: #f2f2f2;
}

.brand-mark {
  width: 1.66rem;
  height: 1.66rem;
  border-radius: 0.42rem;
  overflow: hidden;
  display: block;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-label {
  letter-spacing: 0.01em;
  font-size: 1.05rem;
  font-weight: 500;
}

.top-links {
  justify-self: center;
  margin-inline: auto;
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
}

.top-link {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.86rem;
  padding: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.01rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 180ms ease;
}

.top-link:hover,
.top-link[aria-expanded="true"] {
  color: #ffffff;
}

.top-actions {
  justify-self: end;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 0.82rem;
}

.icon-link {
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.88;
  background: transparent;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms ease,
    opacity 180ms ease;
}

.icon-link svg {
  width: 1.14rem;
  height: 1.14rem;
  fill: currentColor;
}

.icon-link:hover {
  transform: translateY(-2px) scale(1.12);
  color: #ffffff;
  opacity: 1;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: #ffffff;
  color: #0c0c0c;
  opacity: 0;
  transform: translateY(-5.5%);
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease;
}

.menu-overlay.active {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0% 0);
}

.mega-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.mega-panel.active {
  opacity: 1;
  pointer-events: auto;
}

.mega-lines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4.8rem, 9vh, 6.8rem) clamp(2.8rem, 8vh, 4.4rem);
  padding-inline: clamp(0.4rem, 1.2vw, 0.95rem);
  margin-left: 0;
  max-width: clamp(24rem, 57vw, 61rem);
}

.mega-line {
  --line-shift-x: 0px;
  --line-shift-y: 22px;
  margin: 0;
  padding: 0;
  border-top: 1px solid #d0d3d8;
  color: #000000;
  font-size: clamp(3.28rem, 9.25vw, 6.18rem);
  line-height: 0.85;
  letter-spacing: -0.02em;
  font-weight: 400;
  cursor: pointer;
  opacity: 0;
  transform: translate3d(var(--line-shift-x), var(--line-shift-y), 0);
  transition:
    color 240ms ease,
    opacity 260ms ease,
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(130ms + var(--stagger) * 58ms);
}

.mega-line:last-child {
  border-bottom: 1px solid #d0d3d8;
}

.mega-panel.active .mega-line {
  opacity: 1;
  --line-shift-y: 0px;
}

.mega-line:hover,
.mega-line.active-detail,
.mega-line:focus-visible {
  color: #000000;
  --line-shift-x: clamp(0.45rem, 1.3vw, 1rem);
}

.mega-line:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.4);
}

.mega-footer {
  display: none !important;
}

.line-detail-popover {
  position: absolute;
  right: clamp(0.9rem, 2.8vw, 2.5rem);
  left: auto;
  top: clamp(7rem, 24vh, 17rem);
  width: clamp(20rem, 33vw, 32rem);
  max-width: calc(100% - clamp(1.8rem, 5.2vw, 4.5rem));
  padding: clamp(0.95rem, 1.8vw, 1.3rem) clamp(1rem, 2.1vw, 1.48rem)
    clamp(1rem, 2.2vw, 1.55rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(1rem, 1.9vw, 1.45rem);
  background: #0a0d12;
  box-shadow: none;
  opacity: 0;
  transform: translate3d(40px, 28px, 0) scale(0.74);
  transform-origin: 80% 0;
  transition:
    opacity 560ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 680ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 18;
}

.line-detail-popover.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.detail-title {
  margin: 0;
  color: #f6f7f9;
  font-size: clamp(1.32rem, 2.15vw, 2.16rem);
  line-height: 0.95;
  letter-spacing: -0.018em;
  font-weight: 600;
}

.detail-meta {
  margin: 0.32rem 0 0;
  color: #a8aeb6;
  font-size: clamp(0.78rem, 0.98vw, 1.02rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-copy {
  margin: 0.68rem 0 0;
  color: #e0e5eb;
  font-size: clamp(0.94rem, 1.06vw, 1.1rem);
  line-height: 1.35;
}

.detail-points {
  margin: 0.78rem 0 0;
  padding-left: 1.12rem;
}

.detail-points li {
  margin: 0.26rem 0;
  color: #d4dae2;
  font-size: clamp(0.88rem, 0.98vw, 1.01rem);
  line-height: 1.34;
}

body.overlay-open .edge-vignette {
  opacity: 0;
}

body.overlay-open .brand,
body.overlay-open .top-link,
body.overlay-open .icon-link {
  color: #131416;
}

body.overlay-open .top-link:hover,
body.overlay-open .top-link[aria-expanded="true"] {
  color: #000000;
}

body.overlay-open .brand-mark {
  background: transparent;
}

body.overlay-open .icon-link {
  color: #111215;
  opacity: 0.84;
}

body.overlay-open .icon-link:hover {
  color: #08090a;
  opacity: 1;
  transform: translateY(-2px) scale(1.12);
}

.top-link:focus-visible,
.brand:focus-visible,
.icon-link:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

@media (max-width: 980px) {
  :root {
    --tile-size: 182px;
  }

  .top-links {
    gap: 1.2rem;
  }

  .top-actions {
    gap: 0.56rem;
  }

  .icon-link {
    width: 1.78rem;
    height: 1.78rem;
  }

  .mega-lines {
    margin-left: 0;
    max-width: min(100%, 46rem);
  }

  .mega-line {
    font-size: clamp(3.02rem, 11.2vw, 5.02rem);
    line-height: 0.85;
  }

  .line-detail-popover {
    left: 50%;
    right: auto;
    width: min(92vw, 35rem);
    transform: translate3d(-50%, 24px, 0) scale(0.82);
  }

  .line-detail-popover.active {
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  .detail-title {
    font-size: clamp(1.26rem, 4.8vw, 1.9rem);
  }

  .detail-meta {
    font-size: clamp(0.74rem, 2vw, 0.9rem);
  }

  .detail-copy {
    font-size: clamp(0.92rem, 2.45vw, 1.06rem);
  }

  .detail-points li {
    font-size: clamp(0.84rem, 2.28vw, 0.98rem);
  }
}

@media (max-width: 760px) {
  :root {
    --tile-size: 152px;
  }

  .top-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.52rem;
  }

  .brand {
    justify-self: center;
  }

  .top-actions {
    justify-self: center;
  }

  .top-links {
    gap: 0.8rem;
  }

  .top-link {
    font-size: 0.9rem;
  }

  .mega-line {
    font-size: clamp(2.66rem, 13.6vw, 4.34rem);
    line-height: 0.86;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-link,
  .icon-link,
  .menu-overlay,
  .mega-line,
  .line-detail-popover {
    transition: none !important;
  }
}
