/* ────────────────────────────────────────────────
   diceFriend / sdrift.net — v2
   minimalism · outline mesh · entropy
   ──────────────────────────────────────────────── */

:root {
  --paper:    #f1ede5;
  --paper-2:  #e7e1d4;
  --bone:     #d4cdbf;
  --ink:      #0d0c0a;
  --ink-soft: #6c655c;
  --mute:     #9a9286;
  --hair:     rgba(13, 12, 10, 0.16);
  --hair-2:   rgba(13, 12, 10, 0.32);
  --shadow:   #0d0c0a;

  --display: 'Bricolage Grotesque', 'Space Grotesk', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'cv01';
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ─── shell ────────────────────────────────────── */
.shell { width: 100%; max-width: 1480px; margin: 0 auto; padding-inline: 36px; }
.shell.wide { max-width: 1600px; }
@media (max-width: 720px) { .shell { padding-inline: 20px; } }

/* ─── nav ──────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand .logo {
  height: 46px;
  width: auto;
  display: block;
}
.brand .crumb { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand .crumb .now { color: var(--ink); font-weight: 500; }
.brand .crumb .sep { color: var(--mute); }
.nav-actions { display: flex; align-items: center; gap: 22px; }
.nav-die {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  perspective: 140px;
  margin-inline: 2px -4px;
}
.nav-die-cube {
  --s: 14px;
  width: var(--s);
  height: var(--s);
  position: relative;
  transform-style: preserve-3d;
  animation: nav-die-spin 7s linear infinite;
}
.nav-die .face {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 78%, white);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 2px;
}
.nav-die .face i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ink);
  align-self: center;
  justify-self: center;
}
.nav-die .front { transform: translateZ(calc(var(--s) / 2)); }
.nav-die .back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.nav-die .right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.nav-die .left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.nav-die .top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.nav-die .bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.nav-die .front i:nth-child(1) { grid-area: 1 / 1; }
.nav-die .front i:nth-child(2) { grid-area: 2 / 2; }
.nav-die .front i:nth-child(3) { grid-area: 3 / 3; }
.nav-die .back i:nth-child(1) { grid-area: 1 / 1; }
.nav-die .back i:nth-child(2) { grid-area: 1 / 3; }
.nav-die .back i:nth-child(3) { grid-area: 3 / 1; }
.nav-die .back i:nth-child(4) { grid-area: 3 / 3; }
.nav-die .right i:nth-child(1) { grid-area: 2 / 2; }
.nav-die .left i:nth-child(1) { grid-area: 1 / 1; }
.nav-die .left i:nth-child(2) { grid-area: 3 / 3; }
.nav-die .top i:nth-child(1) { grid-area: 1 / 1; }
.nav-die .top i:nth-child(2) { grid-area: 1 / 3; }
.nav-die .top i:nth-child(3) { grid-area: 2 / 2; }
.nav-die .top i:nth-child(4) { grid-area: 3 / 1; }
.nav-die .top i:nth-child(5) { grid-area: 3 / 3; }
.nav-die .bottom i:nth-child(1) { grid-area: 1 / 1; }
.nav-die .bottom i:nth-child(2) { grid-area: 1 / 3; }
.nav-die .bottom i:nth-child(3) { grid-area: 2 / 1; }
.nav-die .bottom i:nth-child(4) { grid-area: 2 / 3; }
.nav-die .bottom i:nth-child(5) { grid-area: 3 / 1; }
.nav-die .bottom i:nth-child(6) { grid-area: 3 / 3; }
@keyframes nav-die-spin {
  from { transform: rotateX(-18deg) rotateY(0deg) rotateZ(2deg); }
  to { transform: rotateX(-18deg) rotateY(360deg) rotateZ(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-die-cube { animation: none; transform: rotateX(-18deg) rotateY(32deg) rotateZ(2deg); }
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hair-2);
  height: 28px;
}
.lang-switch button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  padding: 0 8px;
  height: 100%;
  text-transform: uppercase;
}
.lang-switch button + button { border-left: 1px solid var(--hair-2); }
.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.nav-link {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 6px 0;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--ink);
  transition: width .2s;
}
.nav-link:hover::after { width: 100%; }

.nav-back {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  transition: background .15s, color .15s;
}
.nav-back:hover { background: var(--ink); color: var(--paper); }

/* ─── typography utilities ─────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ''; width: 20px; height: 1px; background: var(--ink);
}
.eyebrow.bare::before { display: none; }

.section-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.hh-display {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: lowercase;
}

.upper { text-transform: uppercase; letter-spacing: 0.08em; }
.dim { color: var(--ink-soft); }
.mono { font-family: var(--mono); }

/* ─── HERO ─────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: 64px 30px;
  border-bottom: 1px solid var(--hair);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: end;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }

.hero-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(72px, 14vw, 232px);
  line-height: 0.82;
  letter-spacing: -0.05em;
}
.hero-mark .fr { font-style: italic; font-weight: 700; letter-spacing: -0.04em; }
.hero-mark .dot { display: inline-block; width: 0.14em; height: 0.14em; background: var(--ink); margin-left: 0.08em; vertical-align: baseline; }

.hero-tag {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--ink-soft); line-height: 1.6;
  max-width: 460px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.hero-tag b { color: var(--ink); font-weight: 600; }

.hero-right { position: relative; min-height: 360px; align-self: stretch; display: flex; align-items: flex-end; justify-content: flex-end; }
.hero-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1378 / 1858;
  max-width: 440px;
}
.hero-photo-wrap .photo {
  position: absolute; inset: 0;
  background: url('assets/dice-top-cut-tr.png') center/contain no-repeat;
  filter: contrast(1.04);
}

.hero-stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 40px;
}
.hero-stat {
  padding: 16px 20px;
  border-right: 1px solid var(--hair);
}
.hero-stat:last-child { border-right: 0; }
.hero-stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--mute); text-transform: uppercase; }
.hero-stat .v { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
@media (max-width: 880px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat { border-bottom: 1px solid var(--hair); }
  .hero-stat:nth-child(odd) { border-right: 1px solid var(--hair); }
  .hero-stat:nth-child(even) { border-right: 0; }
}

/* ─── big banner word ──────────────────────────── */
.banner {
  padding-block: 90px;
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.banner .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(96px, 22vw, 360px);
  line-height: 0.78;
  letter-spacing: -0.06em;
  text-transform: lowercase;
  white-space: nowrap;
}
.banner .word .stroke {
  -webkit-text-stroke: 1.5px var(--ink); color: transparent;
  font-style: italic;
  font-weight: 500;
}
.banner .row2 {
  display: flex; justify-content: space-between; align-items: end;
  margin-top: 22px; gap: 60px;
}
.banner .row2 p {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink-soft);
  max-width: 52ch;
  border-top: 1px solid var(--ink); padding-top: 12px;
  flex: 1;
}
.banner .row2 p.banner-right {
  max-width: 36ch;
  text-align: right;
  border-top-color: var(--ink);
}

/* ─── section ──────────────────────────────────── */
.section { padding-block: 100px; border-bottom: 1px solid var(--hair); position: relative; }
.section-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px;
  align-items: end; margin-bottom: 60px;
}
.section-head .left { display: flex; flex-direction: column; gap: 12px; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}
.section-head .hint {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink-soft); max-width: 36ch; text-align: right;
}
#tryby .section-head .modes-hint {
  max-width: 48ch;
  transform: translateX(18px);
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .hint { text-align: left; }
  #tryby .section-head .modes-hint { transform: none; }
}

/* ─── manifest ─────────────────────────────────── */
.manifest-grid {
  display: grid; grid-template-columns: 1fr 0.75fr; gap: 60px;
  align-items: center;
}
@media (max-width: 880px) { .manifest-grid { grid-template-columns: 1fr; } }
.manifest h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: 26px;
}
.manifest h3 em { font-style: italic; color: var(--ink-soft); font-weight: 500; }
.manifest p {
  font-size: 15.5px; line-height: 1.7; color: var(--ink-soft);
  max-width: 60ch; margin-bottom: 14px;
}
.manifest .dice-side {
  position: relative;
}
.manifest .dice-side img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

/* ─── anatomy diagram ─────────────────────────── */
.anatomy {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.anatomy-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  max-width: 1280px;
  margin: 0 auto;
  border: 1px solid var(--hair);
  background:
    linear-gradient(var(--hair) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, var(--hair) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--paper);
}
@media (max-width: 880px) {
  .anatomy-frame { aspect-ratio: 4 / 5; }
}
.anatomy-device {
  position: absolute;
  /* Explicit width/height — aspect-ratio + percent-height was being clamped.
     42.66% width × 92% height inside a 16:10 frame preserves 1378:1858. */
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 35.6%;
  height: 80%;
  background: url('assets/dice-top-cut.png') center/100% 100% no-repeat;
  filter: contrast(1.04);
}
.anatomy-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
}
.anatomy-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.anatomy-overlay line {
  stroke: var(--ink);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  opacity: .88;
  transition: opacity .18s, stroke-width .18s;
}
.anatomy-overlay line.on {
  stroke: var(--ink);
  stroke-width: 1.2;
  opacity: 1;
}
.anatomy-label {
  position: absolute;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  pointer-events: auto;
  opacity: .62;
  transition: opacity .18s, transform .18s;
  width: 190px;
  padding: 12px 14px;
  border: 1px solid var(--hair-2);
  background: color-mix(in srgb, var(--paper) 88%, white);
}
.anatomy-label.on { opacity: 1; }
.anatomy-label.short,
.anatomy-label.side-top {
  width: 150px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}
.anatomy-label.side-left,
.anatomy-label.side-right,
.anatomy-label.side-bottom {
  width: 180px;
}
.anatomy-label.side-left {
  margin-left: 34px;
}
.anatomy-label.side-right {
  margin-left: -34px;
}
.anatomy-label.side-bottom {
  width: 310px;
  text-align: center;
}
.anatomy-label .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.05;
}
.anatomy-label.short .name { font-size: 16px; }
.anatomy-label .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 2px;
  text-transform: lowercase;
}
.anatomy-label .sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 4px;
}
.anatomy-label.side-left { text-align: right; }
.anatomy-label.side-left .sub { text-align: right; }

.anatomy-hot {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 3;
}
.anatomy-hot::before {
  content: none;
}
.anatomy-hot:hover::before, .anatomy-hot.on::before {
  opacity: 0;
}
.anatomy-mobile-list {
  display: none;
}

@media (max-width: 880px) {
  #anatomia .section-head .hint {
    display: none;
  }
  .anatomy-overlay {
    display: none;
  }
  .anatomy-frame {
    max-width: 620px;
    overflow: hidden;
  }
  .anatomy-device {
    width: 58%;
    height: 76%;
    top: 52%;
  }
  .anatomy-mobile-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
  }
  .anatomy-mobile-list > div {
    display: grid;
    grid-template-columns: minmax(112px, 0.42fr) 1fr;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px dashed var(--hair);
    font-family: var(--mono);
  }
  .anatomy-mobile-list > div:first-child {
    border-top: 0;
  }
  .anatomy-mobile-list b {
    font-family: var(--display);
    font-size: 17px;
    line-height: 1;
    text-transform: uppercase;
  }
  .anatomy-mobile-list span {
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: .04em;
  }
}

/* ─── modes ────────────────────────────────────── */
.modes-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
@media (max-width: 880px) { .modes-grid { grid-template-columns: 1fr; } }
.mode {
  position: relative;
  padding: 40px;
  border-right: 1px solid var(--ink);
  min-height: 460px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 22px;
}
.mode:last-child { border-right: 0; }
@media (max-width: 880px) {
  .mode { border-right: 0; border-bottom: 1px solid var(--ink); }
  .mode:last-child { border-bottom: 0; }
}
.mode .top { display: flex; justify-content: space-between; align-items: baseline; }
.mode .glyph {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 0.85; letter-spacing: -0.04em;
}
.mode .num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--mute); text-transform: uppercase; }
.mode .name {
  font-family: var(--display); font-weight: 600;
  font-size: 26px; letter-spacing: -0.015em;
}
.mode p { color: var(--ink-soft); line-height: 1.65; max-width: 50ch; font-size: 14.5px; }
.mode ul { list-style: none; display: grid; gap: 6px; }
.mode ul li {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--ink-soft);
  display: grid; grid-template-columns: 110px 1fr; gap: 20px;
  padding-block: 6px; border-top: 1px dashed var(--hair);
}
.mode ul li:first-child { border-top: 0; }
.mode ul li b { color: var(--ink); font-weight: 600; letter-spacing: 0.1em; }

.mode .photo-strip {
  width: 100%; aspect-ratio: 16/9;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  mix-blend-mode: multiply;
  filter: grayscale(0.2);
}

/* ─── ENTROPY / DICE section ───────────────────── */
.entropy {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 880px) { .entropy { grid-template-columns: 1fr; gap: 36px; } }
.entropy .copy h3 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.92; letter-spacing: -0.04em;
  text-transform: lowercase;
  margin-bottom: 22px;
  text-wrap: balance;
}
.entropy .copy h3 em {
  font-style: italic; font-weight: 500;
  -webkit-text-stroke: 1.5px var(--ink); color: transparent;
}
.entropy .copy p { color: var(--ink-soft); font-size: 16px; line-height: 1.7; max-width: 52ch; margin-bottom: 14px; }
.entropy .copy .ledger {
  margin-top: 26px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.entropy .copy .ledger > div {
  padding: 14px 0;
  border-right: 1px dashed var(--hair);
  padding-right: 18px;
}
.entropy .copy .ledger > div:last-child { border-right: 0; padding-left: 18px; padding-right: 0; }
.entropy .copy .ledger .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.entropy .copy .ledger .v { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.entropy .stage {
  position: relative;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
}
.dice-panel {
  width: min(100%, 460px);
  display: grid;
  gap: 26px;
  justify-items: center;
}
.dice-object {
  width: min(72vw, 280px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 42px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 18px 18px 0 var(--bone);
  transform: rotate(-4deg);
  transition: transform .18s, box-shadow .18s;
}
.dice-object:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 12px 12px 0 var(--bone);
}
.dice-object .dot {
  border-radius: 50%;
  border: 1px solid rgba(241,237,229,.34);
}
.dice-object .dot.on {
  background: var(--paper);
  border-color: var(--paper);
}
.dice-readout {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.dice-readout > div {
  padding: 14px 18px;
  border-right: 1px dashed var(--hair);
}
.dice-readout > div:last-child { border-right: 0; }
.dice-readout .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
}
.dice-readout .v {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  margin-top: 8px;
}

/* ─── signals (CV / MIDI) ──────────────────────── */
.signals { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
@media (max-width: 880px) { .signals { grid-template-columns: 1fr; } }
.signal { padding: 36px 40px; border-right: 1px solid var(--ink); }
.signal:last-child { border-right: 0; }
@media (max-width: 880px) {
  .signal { border-right: 0; border-bottom: 1px solid var(--ink); }
  .signal:last-child { border-bottom: 0; }
}
.signal .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.signal h4 { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.015em; }
.signal .pill { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.signal p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; max-width: 48ch; margin-bottom: 18px; }
.signal table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.signal td { padding: 10px 0; border-top: 1px dashed var(--hair); letter-spacing: 0.02em; }
.signal td:first-child { color: var(--mute); text-transform: uppercase; letter-spacing: 0.14em; font-size: 10px; }
.signal td:last-child { text-align: right; color: var(--ink); font-weight: 500; }
.signal-bridge {
  margin-top: 34px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: .55fr 1fr;
  gap: 40px;
  padding: 28px 0 32px;
}
.signal-bridge .bridge-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
}
.signal-bridge h3 {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 70px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.04em;
}
.signal-bridge p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  max-width: 76ch;
}
.bridge-ledger {
  grid-column: 2;
  display: grid;
  gap: 0;
  font-family: var(--mono);
  font-size: 12px;
  border-top: 1px dashed var(--hair);
}
.bridge-ledger > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 34px;
  row-gap: 6px;
  padding-block: 13px;
  border-bottom: 1px dashed var(--hair);
}
.bridge-ledger span {
  color: var(--mute);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 10px;
}
.bridge-ledger b {
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: .02em;
}
@media (max-width: 880px) {
  .signal-bridge { grid-template-columns: 1fr; gap: 18px; }
  .bridge-ledger { grid-column: 1; }
}
@media (max-width: 560px) {
  .bridge-ledger > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ─── OS picker ────────────────────────────────── */
.os-layout { display: grid; grid-template-columns: 0.42fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 880px) { .os-layout { grid-template-columns: 1fr; } }

.os-list { display: flex; flex-direction: column; }
.os-pick {
  display: grid; grid-template-columns: 36px 1fr auto;
  align-items: center; gap: 16px;
  padding: 20px 4px;
  border-top: 1px solid var(--hair);
  text-align: left;
  transition: padding-left .2s, background .15s;
}
.os-pick:first-child { border-top: 1px solid var(--ink); }
.os-pick:last-child { border-bottom: 1px solid var(--ink); }
.os-pick:hover { padding-left: 14px; }
.os-pick.active { background: var(--ink); color: var(--paper); padding-left: 14px; }
.os-pick.active .desc, .os-pick.active .idx, .os-pick.active .size { color: rgba(241,237,229,0.6); }
.os-pick .idx { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--mute); }
.os-pick .meta { display: flex; flex-direction: column; gap: 4px; }
.os-pick .name {
  font-family: var(--display); font-weight: 700;
  font-size: 22px; letter-spacing: -0.02em; text-transform: lowercase;
}
.os-pick .desc { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-soft); }
.os-pick .size { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-soft); }

.terminal {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  position: relative;
  min-height: 380px;
  display: flex; flex-direction: column;
}
.terminal .tbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hair);
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.terminal .tbar .dots { display: flex; gap: 6px; }
.terminal .tbar .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink); }
.terminal .tbar .dot.live { background: var(--ink); }
.terminal .body { padding: 22px 22px 8px; flex: 1; }
.os-summary {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--hair);
}
.os-summary h3 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 54px);
  line-height: .9;
  letter-spacing: -0.035em;
}
.os-summary p {
  max-width: 76ch;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}
.os-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 8px;
  border: 1px solid var(--hair-2);
  color: var(--ink-soft);
}
.terminal pre {
  font-family: var(--mono);
  white-space: pre-wrap; word-break: break-all;
  font-size: 12.5px; line-height: 1.7;
}
.terminal .prompt { color: var(--ink-soft); margin-right: 8px; }
.terminal .meta-line { color: var(--mute); margin-top: 14px; font-size: 11px; letter-spacing: 0.04em; }
.terminal .meta-line b { color: var(--ink); }
.terminal .copy {
  position: absolute; right: 14px; top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink); padding: 6px 10px;
  background: var(--paper);
  transition: background .15s, color .15s;
}
.terminal .copy:hover { background: var(--ink); color: var(--paper); }
.terminal .copy.copied { background: var(--ink); color: var(--paper); }
.terminal .navi-button {
  position: absolute; right: 82px; top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink); padding: 6px 10px;
  background: var(--ink);
  color: var(--paper);
  transition: background .15s, color .15s;
}
.terminal .navi-button:hover { background: var(--ink-soft); color: var(--paper); }
.terminal .steps {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--hair);
  display: grid; gap: 6px;
}
.terminal .step {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px;
  font-size: 12px; letter-spacing: 0.02em;
}
.terminal .step .n { color: var(--mute); font-size: 10px; letter-spacing: 0.14em; }
.terminal .step b { color: var(--ink); font-weight: 600; }

/* ─── gallery ──────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  border: 1px solid var(--hair);
  overflow: hidden;
}
.gallery figure img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .6s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; bottom: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ─── shop / sigil ─────────────────────────────── */
.shop {
  position: relative;
  border-top: 1px solid var(--ink);
  padding-block: 100px;
  background: var(--paper);
}
.shop-grid {
  display: grid; grid-template-columns: 0.45fr 1fr; gap: 80px;
  align-items: center;
}
@media (max-width: 980px) { .shop-grid { grid-template-columns: 1fr; gap: 40px; } }

.sigil-card {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--paper) url('assets/sigil-instruments-logo.png') center / 84% auto no-repeat;
  border: 1px solid var(--ink);
}
.shop h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.95; letter-spacing: -0.035em;
  text-transform: lowercase;
  text-wrap: balance;
  margin-bottom: 22px;
}
.shop h2 em { font-style: italic; font-weight: 500; color: var(--ink-soft); }
.shop p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; max-width: 56ch; margin-bottom: 22px; }
.shop-meta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 30px;
}
.shop-meta > div {
  padding: 14px 0; border-right: 1px dashed var(--hair); padding-right: 18px;
}
.shop-meta > div:nth-child(2n) { padding-left: 18px; padding-right: 0; border-right: 0; }
.shop-meta > div:nth-child(n+3) { border-top: 1px dashed var(--hair); }
.shop-meta > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; padding-right: 0; }
.shop-meta .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.shop-meta .v { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

.shop-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.shop-policy {
  margin-top: 24px;
  display: grid;
  gap: 0;
  max-width: 68ch;
  border-top: 1px dashed var(--hair);
  border-bottom: 1px dashed var(--hair);
}
.shop-policy > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px dashed var(--hair);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
}
.shop-policy > div:first-child { border-top: 0; }
.shop-policy span {
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
}
.shop-policy b {
  color: var(--ink-soft);
  font-weight: 400;
}
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 22px;
  border: 1px solid var(--ink);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: transparent; color: var(--ink); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── footer ──────────────────────────────────── */
.foot { padding-block: 50px; border-top: 1px solid var(--ink); }
.foot-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.foot-row a:hover { color: var(--ink); }
.foot-mark {
  display: flex; align-items: center; gap: 14px;
}
.foot-mark .logo {
  height: 44px; width: auto; display: block;
}

/* ─── mobile layout pass ───────────────────────── */
@media (max-width: 640px) {
  .shell { padding-inline: 16px; }

  .nav { position: sticky; }
  .nav-row {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding-block: 7px 9px;
  }
  .brand {
    gap: 10px;
    letter-spacing: 0.1em;
    min-width: 0;
  }
  .brand .logo { height: 36px; }
  .brand .crumb {
    gap: 6px;
    min-width: 0;
  }
  .brand .crumb .sep { display: none; }
  .brand .crumb .now {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-actions {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-actions::-webkit-scrollbar { display: none; }
  .nav-link,
  .nav-back {
    flex: 0 0 auto;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .lang-switch { flex: 0 0 auto; height: 27px; }

  .hero {
    padding-block: 34px 22px;
  }
  .hero-grid { gap: 20px; }
  .hero-mark {
    font-size: clamp(52px, 18vw, 74px);
    line-height: .9;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
  }
  .hero-tag {
    font-size: 11px;
    letter-spacing: 0.02em;
    max-width: 100%;
    margin-top: 16px;
  }
  .hero-right {
    min-height: 0;
    justify-content: center;
  }
  .hero-photo-wrap {
    max-width: min(66vw, 240px);
    max-height: 34vh;
  }
  .hero-photo-wrap .photo {
    background-size: contain;
  }
  .hero-stats {
    margin-top: 28px;
    grid-template-columns: 1fr 1fr;
  }
  .hero-stat {
    padding: 13px 12px;
    min-width: 0;
  }
  .hero-stat .v {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .banner {
    padding-block: 48px;
  }
  .banner .word {
    font-size: clamp(72px, 23vw, 112px);
    letter-spacing: -0.045em;
  }
  .banner .row2 {
    display: grid;
    gap: 18px;
  }
  .banner .row2 p,
  .banner .row2 p.banner-right {
    text-align: left;
    max-width: 100%;
  }

  .section {
    padding-block: 64px;
  }
  .section-head {
    gap: 18px;
    margin-bottom: 34px;
  }
  .section-head h2,
  .entropy .copy h3 {
    font-size: clamp(38px, 14vw, 56px);
    letter-spacing: -0.03em;
  }
  .section-head .hint {
    max-width: 100%;
    font-size: 11px;
  }
  #anatomia .section-head .hint {
    display: none;
  }

  .manifest-grid { gap: 28px; }
  .manifest h3 { font-size: clamp(28px, 9vw, 38px); }
  .manifest .dice-side img {
    width: min(72vw, 260px);
    margin-inline: auto;
  }

  .anatomy-frame {
    aspect-ratio: 4 / 4.75;
    max-width: 330px;
    overflow: hidden;
    background-size: 48px 48px, 48px 48px, auto;
  }
  .anatomy-device {
    width: 64%;
    height: 72%;
    top: 52%;
  }

  .mode {
    padding: 26px 18px;
    min-height: auto;
  }
  .mode .top {
    align-items: end;
  }
  .mode .glyph {
    font-size: clamp(58px, 20vw, 82px);
  }
  .mode ul li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .entropy {
    gap: 28px;
  }
  .entropy .copy .ledger,
  .dice-readout,
  .shop-meta {
    grid-template-columns: 1fr;
  }
  .entropy .copy .ledger > div,
  .dice-readout > div,
  .shop-meta > div {
    border-right: 0;
    border-top: 1px dashed var(--hair);
    padding: 12px 0;
  }
  .entropy .copy .ledger > div:first-child,
  .dice-readout > div:first-child,
  .shop-meta > div:first-child {
    border-top: 0;
  }
  .entropy .copy .ledger > div:last-child,
  .dice-readout > div:last-child,
  .shop-meta > div:nth-child(2n),
  .shop-meta > div:last-child:nth-child(odd) {
    padding-left: 0;
    padding-right: 0;
  }
  .dice-object {
    width: min(68vw, 230px);
    gap: 16px;
    padding: 32px;
    box-shadow: 10px 10px 0 var(--bone);
  }

  .signal {
    padding: 26px 18px;
  }
  .signal .top {
    display: grid;
    gap: 5px;
  }
  .signal td:last-child {
    text-align: left;
    padding-left: 12px;
  }
  .signal-bridge {
    padding-block: 24px;
  }
  .signal-bridge h3 {
    font-size: clamp(34px, 12vw, 50px);
  }

  .os-layout { gap: 24px; }
  .os-pick {
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 16px 2px;
  }
  .os-pick .size {
    grid-column: 2;
  }
  .terminal {
    min-height: 0;
    font-size: 12px;
  }
  .terminal .tbar {
    padding: 13px 14px;
  }
  .terminal .tbar span {
    max-width: 44%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .terminal .body {
    padding: 56px 16px 8px;
  }
  .terminal .copy,
  .terminal .navi-button {
    top: 48px;
    padding: 6px 9px;
  }
  .terminal .copy { right: 16px; }
  .terminal .navi-button { right: 78px; }
  .terminal pre {
    font-size: 11px;
    line-height: 1.55;
  }
  .terminal .steps {
    padding: 16px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery figure {
    aspect-ratio: 4 / 5;
  }

  .shop {
    padding-block: 64px;
  }
  .shop-grid {
    gap: 28px;
  }
  .sigil-card {
    max-width: 260px;
    width: 100%;
    margin-inline: auto;
    background-size: 86% auto;
  }
  .shop h2 {
    font-size: clamp(34px, 12vw, 48px);
  }
  .shop-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .shop-policy > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .btn {
    justify-content: center;
    width: 100%;
    padding: 15px 18px;
    text-align: center;
  }
  .foot-row {
    display: grid;
    gap: 16px;
  }
  .foot-mark .logo {
    height: 36px;
  }
}

@media (max-width: 380px) {
  .hero-mark { font-size: 48px; }
  .anatomy-mobile-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .anatomy-mobile-list b {
    font-size: 16px;
  }
  .terminal .navi-button { right: 74px; }
  .terminal .copy,
  .terminal .navi-button {
    letter-spacing: .1em;
    padding-inline: 8px;
  }
}
