/* =========================================================
   MELOBLOCK LP — "Liquid Blocks"
   Layout: a night studio. The hero is a playable console beside the
   floating glass note; every section below is a stacked module.
   ========================================================= */
:root {
  /* Color */
  --ink: #06061a; /* page ground, derived from the logo navy */
  --ink-2: #0d0d2e; /* raised surfaces */
  --text: #f1efff;
  --muted: #a7a3cf;
  --line: rgba(196, 190, 255, 0.14);
  --cyan: #29d3ff;
  --violet: #8a5bff;
  --magenta: #ee2bff;
  --grad: linear-gradient(115deg, var(--cyan) 0%, var(--violet) 50%, var(--magenta) 100%);

  /* Type */
  --f-display: "Anybody", "Zen Kaku Gothic New", system-ui, sans-serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;

  /* Scale */
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --step-3: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.2rem + 5.4vw, 5.75rem);

  --radius: 28px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 1200px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

.mono {
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.sp {
  display: none;
}

@media (max-width: 640px) {
  .sp {
    display: inline;
  }
}

/* ---------- Background: aurora + grain ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.aurora__blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  animation: drift 28s ease-in-out infinite alternate;
}

.aurora__blob--a {
  background: var(--violet);
  top: -25vmax;
  right: -15vmax;
}

.aurora__blob--b {
  background: var(--cyan);
  bottom: -30vmax;
  left: -20vmax;
  opacity: 0.18;
  animation-duration: 34s;
}

.aurora__blob--c {
  background: var(--magenta);
  top: 40%;
  left: 45%;
  width: 34vmax;
  height: 34vmax;
  opacity: 0.12;
  animation-duration: 22s;
}

@keyframes drift {
  to {
    transform: translate3d(-8vmax, 6vmax, 0) scale(1.15);
  }
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 60;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
}

/* ---------- Liquid glass ---------- */
.glass {
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.05)),
    rgba(13, 13, 46, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--step-0);
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.25s;
}

.btn__arrow {
  font-family: var(--f-mono);
  transition: transform 0.25s;
}

.btn:hover .btn__arrow {
  transform: translate(2px, -2px);
}

.btn--primary {
  background: var(--text);
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 10px 40px -10px rgba(138, 91, 255, 0.9);
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: var(--grad);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn--primary:hover {
  transform: translateY(-2px);
}

.btn--primary:hover::before {
  opacity: 0.9;
}

.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.7em 1.15em;
  font-size: var(--step--1);
}

.btn--lg {
  padding: 1.15em 2.2em;
  font-size: var(--step-1);
}

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--f-mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: blink 1.6s ease-in-out infinite;
}

.dot--soft {
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-title {
  font-size: var(--step-3);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  z-index: 50;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  translate: -50% 0;
  width: min(var(--maxw), calc(100% - var(--gutter) - var(--gutter-r)));
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 10px 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 36, 0.5);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav__logo img {
  height: 14px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
}

.nav__links a {
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav > .btn {
  margin-left: 4px;
}

@media (max-width: 760px) {
  .nav__links {
    display: none;
  }
  .nav > .btn {
    margin-left: auto;
  }
}

/* ---------- Shared section wrapper ---------- */
main > section {
  width: 100%;
  max-width: calc(var(--maxw) + 64px);
  margin-inline: auto;
  padding-left: max(var(--gutter), 32px);
  padding-right: max(var(--gutter-r), 32px);
  padding-block: clamp(80px, 12vw, 160px);
}

@media (max-width: 640px) {
  main > section {
    padding-left: var(--gutter);
    padding-right: var(--gutter-r);
  }
}

/* ---------- HERO ---------- */
main > .hero {
  padding-top: calc(env(safe-area-inset-top, 0px) + 140px);
  padding-bottom: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas:
    "copy visual"
    "seq seq";
  gap: clamp(32px, 5vw, 56px) 24px;
  align-items: center;
}

.hero__copy {
  grid-area: copy;
  display: grid;
  gap: 28px;
  min-width: 0;
}

.kinetic {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: min(18vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0;
}

.kinetic__line {
  display: block;
  white-space: nowrap;
}

.ch {
  display: inline-block;
  font-variation-settings: "wdth" 112;
  transition:
    font-variation-settings 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: stretch-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--ci, 0) * 45ms);
}

.ch:hover {
  font-variation-settings: "wdth" 150;
  transform: translateY(-0.04em);
}

@keyframes stretch-in {
  from {
    font-variation-settings: "wdth" 50;
    transform: translateY(0.08em);
  }
}

.kinetic__line--grad .ch {
  text-shadow: 0 0 40px color-mix(in srgb, currentColor 45%, transparent);
}

.hero__lead {
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__visual {
  grid-area: visual;
  position: relative;
  aspect-ratio: 1;
  max-width: 100%;
  display: grid;
  place-items: center;
}

.hero__halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 60%, rgba(41, 211, 255, 0.45), transparent 55%),
    radial-gradient(circle at 65% 35%, rgba(238, 43, 255, 0.45), transparent 55%);
  filter: blur(50px);
}

.hero__note {
  position: relative;
  width: 82%;
  filter: drop-shadow(0 30px 60px rgba(138, 91, 255, 0.45));
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-14px) rotate(-1.5deg);
  }
}

.cube {
  position: absolute;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 18px rgba(41, 211, 255, 0.35);
  animation: float 9s ease-in-out infinite;
}

.cube--1 {
  top: 6%;
  left: 6%;
  animation-delay: -2s;
}

.cube--2 {
  bottom: 10%;
  right: 2%;
  width: 72px;
  box-shadow: inset 0 0 22px rgba(238, 43, 255, 0.4);
  animation-delay: -5s;
}

.cube--3 {
  top: 48%;
  left: -2%;
  width: 28px;
  border-radius: 8px;
  animation-delay: -1s;
}

/* ---------- Sequencer ---------- */
.seq {
  grid-area: seq;
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 18px;
  min-width: 0;
}

.seq__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.seq__title {
  display: grid;
  line-height: 1.4;
}

.seq__id {
  font-size: 0.6875rem;
  color: var(--muted);
}

.seq__title strong {
  font-size: var(--step-1);
}

.seq__controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.seq__bpm {
  font-size: var(--step--1);
  color: var(--muted);
}

.seq__play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--ink);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06), 0 10px 30px -6px rgba(138, 91, 255, 0.9);
  transition: transform 0.2s;
}

.seq__play:hover {
  transform: scale(1.06);
}

.seq__play svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.seq__play .i-stop,
.seq__play[aria-pressed="true"] .i-play {
  display: none;
}

.seq__play[aria-pressed="true"] .i-stop {
  display: block;
}

.seq__grid {
  display: grid;
  gap: 8px;
}

.seq__row {
  display: grid;
  grid-template-columns: 148px 1fr;
  align-items: center;
  gap: 14px;
}

.seq__label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: var(--step--1);
  line-height: 1.3;
}

.seq__label i {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}

.seq__label b {
  font-weight: 700;
  display: block;
}

.seq__label small {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.seq__cells {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 5px;
}

.cell {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s,
    transform 0.12s;
}

.cell:nth-child(4n + 1) {
  background-color: rgba(255, 255, 255, 0.07);
}

.cell:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.cell.is-on {
  background: var(--c);
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 14px color-mix(in srgb, var(--c) 70%, transparent);
}

.cell.is-now {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.cell.is-on.is-now {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 26px var(--c);
}

.seq__row--you .cell:not(.is-on) {
  border: 1px dashed color-mix(in srgb, var(--c) 60%, transparent);
  animation: invite 2.4s ease-in-out infinite;
  animation-delay: calc(var(--s) * 60ms);
}

@keyframes invite {
  50% {
    background: color-mix(in srgb, var(--c) 16%, transparent);
  }
}

.seq__hint {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 22px;
  background: rgba(255, 255, 255, 0.015);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee span {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  font-variation-settings: "wdth" 130;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(241, 239, 255, 0.5);
}

.marquee span:nth-of-type(even) {
  color: var(--text);
  -webkit-text-stroke: 0;
}

.marquee i {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--grad);
  rotate: 45deg;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Manifesto ---------- */
.manifesto {
  display: grid;
  gap: 32px;
}

.manifesto__title {
  font-size: var(--step-4);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.manifesto__body {
  max-width: 30em;
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2.125rem);
  font-weight: 700;
  line-height: 1.75;
}

.manifesto__body .sc {
  color: rgba(241, 239, 255, 0.26);
  transition: color 0.3s;
}

.manifesto__body .sc.is-lit {
  color: var(--text);
}

/* ---------- How (stacking cards) ---------- */
.stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18vh;
}

.stack__card {
  position: sticky;
  top: calc(110px + var(--i) * 22px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015) 50%),
    rgba(13, 13, 46, 0.94);
}

.stack__text {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.stack__num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 10vw, 8rem);
  font-variation-settings: "wdth" 140;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(196, 190, 255, 0.35);
}

.stack__tag {
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

.stack__text h3 {
  font-size: var(--step-3);
  font-weight: 900;
  line-height: 1.3;
}

.stack__text p:last-child {
  color: var(--muted);
  max-width: 34em;
}

.stack__ui {
  min-width: 0;
}

/* Mock UI pieces */
.mock {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(6, 6, 26, 0.75);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(138, 91, 255, 0.5);
}

.mock__label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.mock__row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mock__row > div {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.mock__art {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--grad);
}

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--cyan), var(--violet), var(--magenta), var(--cyan));
}

.mock__title {
  font-weight: 700;
}

.mock__sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.mock__btn {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: var(--step--1);
  background: var(--text);
  color: var(--ink);
}

.mock__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mock__btn--ok {
  background: var(--grad);
  color: var(--ink);
}

.mock__btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 64px;
}

.wave i {
  flex: 1;
  border-radius: 3px;
  background: linear-gradient(to top, var(--cyan), var(--magenta));
  height: calc(18% + var(--h, 40) * 0.82%);
  opacity: 0.9;
}

.wave i:nth-child(7n + 1) { --h: 30; }
.wave i:nth-child(7n + 2) { --h: 72; }
.wave i:nth-child(7n + 3) { --h: 48; }
.wave i:nth-child(7n + 4) { --h: 95; }
.wave i:nth-child(7n + 5) { --h: 60; }
.wave i:nth-child(7n + 6) { --h: 22; }
.wave i:nth-child(7n + 7) { --h: 80; }

.versions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.versions li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: var(--step--1);
}

.versions li.is-active {
  border-color: transparent;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.chip--owner {
  border-color: rgba(41, 211, 255, 0.5);
  color: var(--cyan);
}

.chip--lyricist {
  border-color: rgba(238, 43, 255, 0.5);
  color: #f58bff;
}

.chip--live {
  background: var(--grad);
  color: var(--ink);
  border: 0;
  font-weight: 500;
}

/* ---------- Features (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "hero hero roles"
    "hero hero enc"
    "ver gas gas";
  gap: 16px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 32px);
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
}

.tile:nth-child(1) { grid-area: hero; }
.tile:nth-child(2) { grid-area: roles; }
.tile:nth-child(3) { grid-area: enc; }
.tile:nth-child(4) { grid-area: ver; }
.tile:nth-child(5) { grid-area: gas; }

/* cursor-following light */
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(138, 91, 255, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.tile:hover::before {
  opacity: 1;
}

.tile__tag {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.tile h3 {
  font-size: var(--step-2);
  font-weight: 900;
  line-height: 1.35;
}

.tile p:not(.tile__tag) {
  color: var(--muted);
  font-size: 0.9375rem;
}

.tile--hero h3 {
  font-size: var(--step-3);
}

.tile--hero p:not(.tile__tag) {
  max-width: 30em;
}

.tile > :last-child:not(p) {
  margin-top: auto;
  padding-top: 12px;
}

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
}

.chain__block {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  min-width: 128px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(6, 6, 26, 0.6);
  font-size: var(--step--1);
  line-height: 1.4;
}

.chain__block b {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
}

.chain__block--live {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 0 30px -6px rgba(238, 43, 255, 0.6);
}

.chain__link {
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  opacity: 0.6;
}

.lock {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lock svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.4;
  filter: drop-shadow(0 0 8px rgba(41, 211, 255, 0.6));
}

.lock span {
  font-size: 0.75rem;
  color: var(--muted);
}

.vline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vline span {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px 0;
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  color: var(--muted);
}

.vline span.is-active {
  background: var(--grad);
  color: var(--ink);
  border-color: transparent;
  font-weight: 500;
}

.tile:nth-child(5) {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr;
  column-gap: 32px;
}

.tile:nth-child(5) > :not(.gas) {
  grid-column: 1;
}

.gas {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  display: grid;
  justify-items: end;
  line-height: 1;
}

.gas span {
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.gas strong {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-variation-settings: "wdth" 120;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Coming next */
.next {
  margin-top: 16px;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--radius);
  border: 1px dashed rgba(196, 190, 255, 0.25);
  display: grid;
  gap: 22px;
}

.next__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.next__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.next__list li {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-inline: 24px;
  border-left: 1px solid var(--line);
}

.next__list li:first-child {
  padding-left: 0;
  border-left: 0;
}

.next__list h4 {
  font-size: var(--step-1);
  font-weight: 700;
}

.next__list p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Label Pass ---------- */
.pass {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.pass__copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.pass__copy > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 32em;
}

.pass__stage {
  perspective: 1200px;
  display: grid;
  place-items: center;
}

.pass-card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 5 / 7;
  padding: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 26px;
  overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(41, 211, 255, 0.35), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, rgba(238, 43, 255, 0.4), transparent 60%),
    linear-gradient(160deg, #15154a, #0a0a26);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 60px 100px -40px rgba(138, 91, 255, 0.7);
}

.pass-card__holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  opacity: 0.55;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(41, 211, 255, 0.55) calc(var(--hx, 40%) - 10%),
    rgba(255, 255, 255, 0.7) var(--hx, 40%),
    rgba(238, 43, 255, 0.55) calc(var(--hx, 40%) + 10%),
    transparent 80%
  );
}

.pass-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--step--1);
}

.pass-card__top img {
  height: 11px;
  width: auto;
}

.pass-card__note {
  width: 78%;
  align-self: center;
  justify-self: center;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  transform: translateZ(40px);
}

.pass-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  line-height: 1.4;
}

.pass-card__bottom .muted {
  font-size: 0.625rem;
  letter-spacing: 0.16em;
}

.pass-card__label {
  font-family: var(--f-display);
  font-weight: 800;
  font-variation-settings: "wdth" 120;
  font-size: var(--step-1);
}

.pass-card__member {
  text-align: right;
}

/* ---------- FAQ ---------- */
.faq__list {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.faq details {
  border-radius: 20px;
  padding: 0 24px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.5;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--f-mono);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--cyan);
  transition: rotate 0.3s;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details p {
  padding-bottom: 24px;
  color: var(--muted);
  max-width: 40em;
}

/* ---------- Final CTA ---------- */
main > .final {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 32px;
  padding-block: clamp(100px, 14vw, 200px);
}

.final__kicker {
  font-size: var(--step-2);
  font-weight: 700;
}

.final__title {
  font-size: min(10.5vw, 9rem);
}

.final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 1.1em 1.6em;
  border-radius: 999px;
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  color: var(--ink);
  background: var(--grad);
  box-shadow: 0 10px 40px -10px rgba(238, 43, 255, 0.8);
}

.badge .dot {
  background: var(--ink);
  box-shadow: none;
}

/* In-development notice under the hero CTAs */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  color: var(--muted);
}

.status .dot {
  flex: none;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}

/* ---------- Footer ---------- */
.footer {
  max-width: calc(var(--maxw) + 64px);
  margin-inline: auto;
  padding-left: max(var(--gutter), 32px);
  padding-right: max(var(--gutter-r), 32px);
  padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}

.footer__logo {
  height: 13px;
  width: auto;
}

.footer__links {
  display: flex;
  gap: 28px;
  font-size: var(--step--1);
  color: var(--muted);
}

.footer__links a:hover {
  color: var(--text);
}

.footer__copy {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Scroll-driven entrance (progressive enhancement) ---------- */
@supports (animation-timeline: view()) {
  .tile,
  .next,
  .faq details,
  .pass-card,
  .section-head {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
  @keyframes rise {
    from {
      transform: translateY(40px) scale(0.98);
    }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "hero hero"
      "roles enc"
      "ver ver"
      "gas gas";
  }
}

@media (max-width: 860px) {
  main > .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual"
      "seq";
    padding-top: calc(env(safe-area-inset-top, 0px) + 116px);
  }
  .hero__visual {
    width: min(420px, 90%);
    justify-self: center;
  }
  .stack__card {
    grid-template-columns: 1fr;
    top: calc(90px + var(--i) * 16px);
  }
  .pass {
    grid-template-columns: 1fr;
  }
  .next__list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .next__list li {
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .next__list li:first-child {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 640px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-areas: "hero" "roles" "enc" "ver" "gas";
  }
  .tile:nth-child(5) {
    grid-template-columns: 1fr;
  }
  .gas {
    grid-column: 1;
    grid-row: auto;
    justify-items: start;
  }
  .seq__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .seq__cells {
    gap: 3px;
  }
  .cell {
    border-radius: 4px;
  }
  .seq__head {
    align-items: flex-start;
  }
  .stack {
    gap: 10vh;
  }
  .stack__card {
    position: relative;
    top: auto;
  }
  .footer__copy {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- 404 ---------- */
main > .notfound {
  min-height: 100vh;
  align-content: center;
}

.notfound .kinetic {
  font-variation-settings: "wdth" 112;
}

.notfound .kinetic__line--grad {
  width: fit-content;
  justify-self: center;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================
   Responsive refinements (phones / tablets)
   ========================================================= */

/* Japanese line breaking: keep phrases together in headings.
   auto-phrase works in Chromium; .nw spans cover other browsers. */
h1,
h2,
h3,
h4,
summary,
.hero__lead,
.final__kicker {
  word-break: auto-phrase;
}

.nw {
  display: inline-block;
}

/* Long single-line values in mock UIs truncate instead of wrapping */
.mock__row > div .mock__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pass-card__member p,
.seq__bpm {
  white-space: nowrap;
}

@media (max-width: 860px) {
  .hero__visual {
    width: min(340px, 80%);
  }
}

@media (max-width: 640px) {
  .hero__lead {
    font-size: 1.1875rem;
  }

  .manifesto__title {
    font-size: 8.6vw;
  }

  .section-title,
  .stack__text h3,
  .tile--hero h3 {
    font-size: 1.75rem;
  }

  .stack__num {
    font-size: 4rem;
  }

  .seq__title strong {
    font-size: 1rem;
  }

  .seq__bpm {
    display: none;
  }

  .seq__play {
    width: 46px;
    height: 46px;
  }

  /* On-chain history reads top to bottom on phones */
  .chain {
    flex-direction: column;
    align-items: stretch;
  }

  .chain__link {
    width: 2px;
    height: 14px;
    margin-left: 24px;
    background: linear-gradient(180deg, var(--cyan), var(--violet));
  }

  .faq details {
    padding: 0 18px;
  }

  .faq summary {
    font-size: 1rem;
  }

  .final__kicker {
    font-size: 1.125rem;
  }

  .final__actions {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .nav {
    gap: 12px;
    padding-left: 16px;
  }

  .nav__logo img {
    height: 12px;
  }

  .btn--sm {
    padding: 0.65em 0.95em;
  }
}

/* Grid tracks must be allowed to shrink below their nowrap content */
.mock {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 860px) {
  main > .hero,
  .pass,
  .stack__card {
    grid-template-columns: minmax(0, 1fr);
  }

  .pass__stage {
    min-width: 0;
  }
}

/* =========================================================
   Mock UI rows: grid layout so labels never collide with names
   ========================================================= */
.mock__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
}

.mock__row > div p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.versions li {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

.versions__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .stack__card {
    padding: 22px 18px;
  }

  .mock {
    padding: 18px 16px;
    gap: 16px;
  }

  /* Phones: role chip moves under the name instead of beside it */
  .mock__row {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 8px;
  }

  .mock__row > :first-child {
    grid-row: span 2;
  }

  .mock__row > .chip {
    grid-column: 2;
    justify-self: start;
  }

  .versions li {
    padding: 12px;
    gap: 8px;
  }
}
