:root {
  --paper: #f5f5f5;
  --paper-deep: #e7e7e7;
  --ink: #0a0a0a;
  --mx: 50vw;
  --my: 50vh;
  --scroll: 0;
  --edge: 0;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.9), transparent 36%),
    radial-gradient(circle at 86% 80%, rgba(255, 255, 255, 0.8), transparent 32%),
    linear-gradient(150deg, #ffffff 0%, var(--paper) 50%, var(--paper-deep) 100%);
  overflow: hidden;
  overscroll-behavior: none;
}

.liquid-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.noise,
#dotfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  z-index: 1;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.14) 0.6px, transparent 0.6px),
    radial-gradient(rgba(255, 255, 255, 0.62) 0.7px, transparent 0.7px);
  background-size: 3px 3px, 5px 5px;
  mix-blend-mode: multiply;
  opacity: 0.22;
}

#dotfield {
  z-index: 2;
  contain: layout paint;
  will-change: transform;
}

.dot {
  position: absolute;
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 999px;
  left: var(--x);
  top: var(--y);
  background: rgba(0, 0, 0, var(--alpha));
  filter: blur(var(--blur));
  transform: translate(-50%, -50%);
}

.studio {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(1480px, calc(100% - 0.45rem));
  height: 100vh;
  padding: 0.62rem 0 0.58rem;
}

.meta-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(0, 0, 0, 0.58);
  padding: 0.35rem 0.16rem;
}

.composition {
  position: relative;
  margin-top: 0.14rem;
  height: calc(100vh - 1.7rem);
  border: 1px dashed rgba(0, 0, 0, 0.14);
  overflow: clip;
  isolation: isolate;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0));
}

.liquid-layer {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(36px) saturate(125%);
  filter: url(#liquidWarp);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 28px 72px rgba(0, 0, 0, 0.2);
  will-change: transform;
}

.liquid-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    122deg,
    rgba(81, 173, 255, 0.92),
    rgba(255, 255, 255, 0.03),
    rgba(255, 108, 192, 0.9),
    rgba(255, 201, 86, 0.9),
    rgba(127, 255, 182, 0.88)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: calc(0.28 + var(--edge) * 0.72);
}

.layer-a {
  width: min(420px, 74vw);
  aspect-ratio: 1.22;
  left: 16%;
  top: -12%;
}

.layer-b {
  width: min(520px, 84vw);
  aspect-ratio: 1.08;
  right: -10%;
  top: 20%;
}

.layer-c {
  width: min(370px, 68vw);
  aspect-ratio: 1.35;
  left: 24%;
  bottom: -18%;
}

.glass-slab {
  position: absolute;
  display: block;
  z-index: 7;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(30px) saturate(120%);
  filter: url(#liquidWarp);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 26px 70px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  isolation: isolate;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  will-change: transform;
}

.phase-link:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.6);
  outline-offset: 2px;
}

.glass-slab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.45px;
  background: linear-gradient(
    120deg,
    rgba(80, 171, 255, 0.94),
    rgba(255, 255, 255, 0.02),
    rgba(255, 110, 197, 0.94),
    rgba(255, 206, 90, 0.94),
    rgba(133, 255, 186, 0.9)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: calc(0.32 + var(--edge) * 0.68);
}

.glass-slab::after {
  content: "";
  position: absolute;
  inset: -26%;
  border-radius: inherit;
  background: conic-gradient(
    from 210deg at 26% 44%,
    rgba(77, 170, 255, 0.72),
    rgba(255, 127, 205, 0.62),
    rgba(255, 207, 102, 0.58),
    rgba(132, 255, 190, 0.52),
    rgba(255, 255, 255, 0)
  );
  filter: blur(22px);
  mix-blend-mode: screen;
  opacity: calc(0.22 + var(--edge) * 0.52);
}

.glass-slab p {
  margin: 0;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(0, 0, 0, 0.64);
}

.glass-slab h2 {
  margin: 0.3rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.24rem, 2.4vw, 1.96rem);
  color: rgba(0, 0, 0, 0.84);
}

.slab-a {
  left: 10%;
  top: 18%;
  width: min(300px, 58vw);
  min-height: 206px;
}

.slab-b {
  left: 40%;
  top: 10%;
  width: min(390px, 70vw);
  min-height: 258px;
}

.slab-c {
  left: 30%;
  top: 44%;
  width: min(280px, 54vw);
  min-height: 184px;
}

.slab-d {
  right: 6%;
  bottom: 8%;
  width: min(260px, 48vw);
  min-height: 168px;
}

.headline {
  margin: 0;
  position: absolute;
  z-index: 4;
  left: 4%;
  top: 14%;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.1rem, 13.8vw, 11.2rem);
  letter-spacing: -0.03em;
  line-height: 0.74;
  text-transform: uppercase;
  transform-origin: center;
}

.headline span {
  display: block;
}

.headline span:nth-child(2) {
  transform: translateX(23%) rotate(-3.8deg);
}

.headline span:nth-child(3) {
  transform: translateX(8%) rotate(3.4deg);
}

.headline-main {
  color: rgba(0, 0, 0, 0.7);
  mix-blend-mode: multiply;
  filter: blur(1.1px) url(#liquidWarp);
}

.headline-ghost {
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(0, 0, 0, 0.3);
  mix-blend-mode: hard-light;
  filter: blur(2.8px) url(#liquidWarp);
  opacity: 0.82;
  transform: translate(7.2%, 4.8%) rotate(-4.2deg);
}

.manifesto {
  position: absolute;
  z-index: 3;
  right: 5%;
  bottom: 10%;
  width: min(44ch, 74%);
  margin: 0;
  font-size: clamp(0.7rem, 1.02vw, 0.9rem);
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.72);
  letter-spacing: 0.01em;
  transform: rotate(-4deg);
}

.manifesto-ghost {
  opacity: 0.42;
  filter: blur(1px);
  transform: translate(3%, 12%) rotate(3.6deg);
}

.glyph {
  position: absolute;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.54);
  pointer-events: none;
}

.glyph--x {
  right: 1.4%;
  top: -4%;
  font-size: clamp(4.6rem, 16vw, 11rem);
}

.glyph--n {
  left: 1.3%;
  bottom: 3%;
  font-size: clamp(0.95rem, 2.1vw, 1.8rem);
  letter-spacing: 0.11em;
  transform: rotate(-90deg);
  transform-origin: left bottom;
}

@media (max-width: 920px) {
  .studio {
    width: min(1480px, calc(100% - 0.36rem));
  }

  .composition {
    height: calc(100vh - 1.55rem);
  }

  .headline {
    top: 23%;
    left: 3.5%;
    font-size: clamp(2.7rem, 16vw, 6.8rem);
  }

  .manifesto {
    width: min(46ch, 88%);
    right: 4%;
    bottom: 7%;
  }

  .slab-a {
    left: 4%;
    top: 10%;
  }

  .slab-b {
    left: 38%;
    top: 6%;
  }

  .slab-c {
    left: 17%;
    top: 52%;
  }

  .slab-d {
    right: 4%;
    bottom: 6%;
    width: min(240px, 56vw);
  }

}

@media (prefers-reduced-motion: reduce) {
  .glass-slab,
  .liquid-layer,
  .headline,
  .manifesto {
    transition: none !important;
    animation: none !important;
  }
}
