/* ============================================================
   STRUCTURED LIQUIDITY — component layer
   ============================================================ */

/* ---- NAV (floating Liquid Glass bar — a layer on top) ---- */
.nav {
  position: fixed; top: clamp(0.6rem, 1.6vw, 1rem); left: 50%; transform: translateX(-50%) translateZ(0);
  width: min(1200px, 94vw); z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.6rem 0.55rem clamp(0.9rem, 2vw, 1.3rem);
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  background: linear-gradient(135deg, rgba(var(--glass-tint),0.16), rgba(var(--glass-tint),0.05));
  border: var(--border-w) solid rgb(var(--edge));
  box-shadow: 6px 6px 0 0 var(--hard-shadow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.nav .links { display: flex; gap: 1.3rem; align-items: center; }
.nav .links a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim); text-decoration: none;
  position: relative; transition: color 0.2s;
}
.nav .links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s ease;
}
.nav .links a.active { color: var(--ink); }
.nav .links a.active:not(.nav-cta)::after { transform: scaleX(1); }
.nav .links a:hover { color: var(--ink); }
.nav .links a.nav-cta { color: var(--accent-ink); font-family: var(--display); font-weight: 800; font-size: 0.82rem; text-transform: none; letter-spacing: -0.01em; }
.nav .links a.nav-cta:hover { color: var(--accent-ink); }
@media (max-width: 700px) { .nav .links a:not(.nav-cta) { display: none; } }

/* ---- SECTION DOT-NAV (fixed right rail) ---- */
.dotnav { position: fixed; right: clamp(0.7rem, 2vw, 1.4rem); top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 0.85rem; }
.dotnav a { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; text-decoration: none; }
.dotnav .dd { width: 11px; height: 11px; flex: none; border: 2px solid rgb(var(--edge)); background: rgba(var(--glass-tint),0.12); box-shadow: 2px 2px 0 0 var(--hard-shadow); transition: background 0.2s, transform 0.15s; }
.dotnav a:hover .dd { transform: translate(-1px,-1px); }
.dotnav a.active .dd { background: var(--accent); }
.dotnav .dl { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); padding: 0.18rem 0.45rem; border: 1.5px solid rgb(var(--edge)); background: var(--bg-2); box-shadow: 2px 2px 0 0 var(--hard-shadow); opacity: 0; transform: translateX(6px); transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.dotnav a:hover .dl, .dotnav a.active .dl { opacity: 1; transform: none; }
@media (max-width: 820px) { .dotnav { display: none; } }

/* ---- LOGO GLYPH — a rigid container holding a liquid fill.
   The square + border + flat shadow = STRUCTURE; the accent
   liquid with its curved meniscus = LIQUIDITY. ---- */
.glyph {
  --s: 34px;
  width: var(--s); height: var(--s);
  position: relative; flex: none;
  border-radius: 0;
  border: 2.5px solid rgb(var(--edge));
  background: linear-gradient(135deg, rgba(var(--glass-tint),0.14), rgba(var(--glass-tint),0.04));
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  box-shadow: 3px 3px 0 0 var(--hard-shadow), inset 0 1px 0 rgba(255,255,255,0.5);
  overflow: hidden;
}
.glyph::before {            /* the liquid fill + curved meniscus */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -8%;
  height: 58%;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #fff) 0%, var(--accent) 42%);
  border-radius: 46% 46% 0 0 / 70% 70% 0 0;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.45);
}
.glyph::after {             /* specular gloss across the top glass */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(160deg, rgba(255,255,255,0.4), transparent 70%);
  pointer-events: none;
}
.glyph.lg { --s: 60px; border-width: 3px; box-shadow: 5px 5px 0 0 var(--hard-shadow), inset 0 1px 0 rgba(255,255,255,0.5); }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand .name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }

/* ---- BUTTONS ---- */
.btn {
  font-family: var(--display); font-weight: 700; font-size: 0.98rem;
  padding: 0.85rem 1.5rem; border-radius: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: var(--border-w) solid rgb(var(--edge));
  color: var(--ink); text-decoration: none;
  transition: transform 0.12s cubic-bezier(.2,.8,.2,1), box-shadow 0.12s;
  position: relative;
}
.btn.glassy {
  background: linear-gradient(135deg, rgba(var(--glass-tint),0.14), rgba(var(--glass-tint),0.05));
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: var(--hard-x) var(--hard-y) 0 0 var(--hard-shadow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn.solid { background: var(--accent); color: var(--accent-ink); box-shadow: var(--hard-x) var(--hard-y) 0 0 var(--hard-shadow); }
.btn:active, .btn:hover { transform: translate(var(--hard-x), var(--hard-y)); box-shadow: 0 0 0 0 var(--hard-shadow), inset 0 1px 0 rgba(255,255,255,0.4); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- HERO ---- */
.hero { padding-top: clamp(5rem, 10vh, 6.5rem); padding-bottom: clamp(2rem, 5vh, 3.5rem); min-height: auto; display: flex; align-items: center; }
.hero-grid { display: block; width: 100%; max-width: 980px; }
@media (max-width: 940px) { .hero-grid { max-width: none; } }

.wordmark {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(2.2rem, 7.4vw, 5.2rem);
  line-height: 0.84;
  letter-spacing: -0.03em;
  margin: 0.25em 0 0.3em;
  text-wrap: balance;
}
/* glass-filled letters: translucent frosted fill, brutal outline drop */
.wordmark .glas {
  color: transparent;
  -webkit-text-stroke: 2px rgb(var(--edge));
  paint-order: stroke fill;
  background-image: linear-gradient(
    160deg,
    color-mix(in srgb, var(--accent) 92%, white 8%),
    color-mix(in srgb, var(--accent) 62%, transparent)
  );
  -webkit-background-clip: text; background-clip: text;
  text-shadow: var(--hard-x) var(--hard-y) 0 rgba(var(--edge), 0.3);
}
.wordmark .brutal {
  color: var(--accent);
  position: relative;
  -webkit-text-stroke: 4px rgb(var(--edge));
  paint-order: stroke fill;
  text-shadow: var(--hard-x) var(--hard-y) 0 rgb(var(--edge));
}
.umlaut-note { font-family: var(--mono); }

/* ---- animated liquid fill (progressive enhancement via liquid-word.js) ---- */
.wordmark .glas[data-liquid].is-liquid {
  display: inline-block;
  position: relative;
  color: transparent;
  -webkit-text-stroke: 0;
  background: none;
  text-shadow: none;
}
.liquid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(var(--hard-x) var(--hard-y) 0 rgba(var(--edge), 0.3));
}
.lw-glass { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.lw-wave-back { fill: color-mix(in srgb, var(--accent) 55%, white 14%); opacity: 0.7; }
.lw-wave-front { fill: var(--accent); }
.lw-shine { fill: none; stroke: color-mix(in srgb, white 70%, var(--accent)); stroke-width: 2.5; opacity: 0.5; vector-effect: non-scaling-stroke; }
.lw-ripple { fill: none; stroke: color-mix(in srgb, white 55%, var(--accent)); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.lw-ripple-a { opacity: 0.32; animation: lw-flow 11s linear infinite; }
.lw-ripple-b { opacity: 0.22; animation: lw-flow 17s linear infinite reverse; }
.lw-outline { fill: none; stroke: rgb(var(--edge)); stroke-width: 2; paint-order: stroke; vector-effect: non-scaling-stroke; }

.lw-slosh { transform-box: fill-box; transform-origin: center; will-change: transform; }
.lw-bob { animation: lw-bob 10s ease-in-out infinite; }
.lw-wave-front { animation: lw-flow 9s linear infinite; }
.lw-wave-back { animation: lw-flow 15s linear infinite reverse; }
.lw-shine { animation: lw-flow 9s linear infinite; }
@keyframes lw-flow {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--w) * -1)); }
}
@keyframes lw-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(var(--amp, 6px) * -1)); }
}
@media (prefers-reduced-motion: reduce) {
  .lw-bob, .lw-wave-front, .lw-wave-back, .lw-shine, .lw-ripple { animation: none; }
  .lw-slosh { transform: none !important; }
}

/* ---- hypercube logo (progressive enhancement via liquid-word.js) ---- */
.glyph.is-cube::before { content: none; }
.liquid-cube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.lw-cube-innerglass { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.lw-cube-edge {
  fill: none;
  stroke: rgb(var(--edge));
  stroke-width: 1.4;
  stroke-linejoin: miter;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}
.lw-cube-shell {
  fill: none;
  stroke: rgb(var(--edge));
  stroke-width: 2.4;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 1.4rem; }
.tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; border-radius: 0; border: 1.5px solid rgba(var(--edge),0.6);
  color: var(--ink-dim);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* floating specimen stack in hero */
.specimen { position: relative; height: 440px; }
.specimen .card {
  position: absolute; padding: 1.3rem 1.4rem; width: 240px;
  will-change: transform;
}
.specimen .c1 { top: 0; left: 0; z-index: 1; }
.specimen .c2 { top: 122px; left: 74px; z-index: 2; }
.specimen .c3 { top: 252px; left: 22px; z-index: 3; }
.chip-row { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.dot { width: 22px; height: 22px; border-radius: 0; border: 2px solid rgb(var(--edge)); }

/* drag hint */
.draggable { cursor: grab; }
.draggable:active { cursor: grabbing; }

/* ---- PILLARS (the three-pillar manifesto) ---- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: stretch; }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } }
.pillar { padding: 1.15rem 1.2rem; display: flex; flex-direction: column; }
.pillar .pnum { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.pillar .psub { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-top: 0.15rem; }
.pillar h3 { font-size: 1.25rem; margin: 0.6rem 0 0.4rem; }
.pillar > p { color: var(--ink-dim); font-size: 0.9rem; margin: 0; }
.pillar ul { list-style: none; padding: 0; margin: 0.9rem 0 0; }
.pillar li { font-family: var(--mono); font-size: 0.76rem; padding: 0.4rem 0; border-top: 1px solid rgba(var(--edge),0.15); color: var(--ink-dim); display: flex; gap: 0.5rem; }
.pillar li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.35em; background: var(--accent); }

/* ---- PRINCIPLES GRID ---- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 700px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .principles { grid-template-columns: 1fr; } }
.principle { padding: 1.1rem; display: flex; flex-direction: column; min-height: 132px; }
.principle .num { font-family: var(--mono); font-size: 0.76rem; color: var(--accent); margin-bottom: auto; }
.principle h3 { font-size: 1.18rem; margin: 1rem 0 0.35rem; }
.principle p { color: var(--ink-dim); font-size: 0.88rem; margin: 0; }

/* ---- LIVE SPECIMENS ---- */
.specimens { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 640px) { .specimens { grid-template-columns: 1fr; } }
.spec-panel { padding: 1.4rem; }
.spec-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 1rem; }
.spec-stage { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* toggle */
.toggle { width: 64px; height: 36px; border-radius: 0; border: var(--border-w) solid rgb(var(--edge)); position: relative; cursor: pointer;
  background: linear-gradient(135deg, rgba(var(--glass-tint),0.12), rgba(var(--glass-tint),0.04));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 3px 3px 0 0 var(--hard-shadow); transition: background 0.25s; }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 0; background: rgb(var(--edge)); transition: transform 0.22s cubic-bezier(.3,1.4,.5,1); }
.toggle.on { background: var(--accent); }
.toggle.on .knob { transform: translateX(28px); background: var(--accent-ink); }

/* input */
.field-input { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; border-radius: 0; min-width: 220px;
  border: var(--border-w) solid rgb(var(--edge));
  background: linear-gradient(135deg, rgba(var(--glass-tint),0.1), rgba(var(--glass-tint),0.03));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.field-input input { background: none; border: none; outline: none; color: var(--ink); font-family: var(--mono); font-size: 0.85rem; width: 100%; }
.field-input input::placeholder { color: var(--ink-dim); }
.field-input:focus-within { box-shadow: 4px 4px 0 0 var(--accent), inset 0 1px 0 rgba(255,255,255,0.3); }

/* segmented */
.seg { display: inline-flex; border: var(--border-w) solid rgb(var(--edge)); border-radius: 0; overflow: hidden; box-shadow: 3px 3px 0 0 var(--hard-shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(var(--glass-tint),0.05); }
.seg button { font-family: var(--mono); font-size: 0.78rem; padding: 0.55rem 0.9rem; border: none; background: none; color: var(--ink-dim); cursor: pointer; border-left: 1px solid rgba(var(--edge),0.3); }
.seg button:first-child { border-left: none; }
.seg button.sel { background: var(--accent); color: var(--accent-ink); }

/* slider specimen */
.gslider { width: 220px; height: 36px; display: flex; align-items: center; }
.gslider .track { flex: 1; height: 8px; border-radius: 0; border: 2px solid rgb(var(--edge)); position: relative; background: rgba(var(--glass-tint),0.06); }
.gslider .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 55%; background: var(--accent); border-radius: 0; }
.gslider .thumb { position: absolute; top: 50%; left: 55%; width: 22px; height: 22px; transform: translate(-50%,-50%); border-radius: 0; background: rgb(var(--edge)); border: 2px solid rgb(var(--edge)); box-shadow: 2px 2px 0 var(--hard-shadow); }

/* ---- DO / DON'T ---- */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .rules { grid-template-columns: 1fr; } }
.rule { padding: 1.4rem; }
.rule .badge { font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; padding: 0.3rem 0.7rem; border-radius: 0; display: inline-block; margin-bottom: 1.2rem; }
.rule.do .badge { background: var(--accent); color: var(--accent-ink); }
.rule.dont .badge { background: transparent; border: 2px solid rgb(var(--edge)); color: var(--ink); }
.rule ul { list-style: none; padding: 0; margin: 0; }
.rule li { padding: 0.7rem 0; border-top: 1px solid rgba(var(--edge),0.15); font-size: 0.95rem; }
.rule.dont li { color: var(--ink-dim); text-decoration: line-through; text-decoration-color: rgba(var(--edge),0.3); }

/* ---- TOKENS ---- */
.tokens { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; }
@media (max-width: 820px) { .tokens { grid-template-columns: 1fr; } }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-top: 1.2rem; }
.swatch { aspect-ratio: 1; border-radius: 0; border: 2px solid rgb(var(--edge)); display: flex; align-items: flex-end; padding: 0.5rem; font-family: var(--mono); font-size: 0.6rem; box-shadow: 3px 3px 0 var(--hard-shadow); }
.type-row { display: flex; align-items: baseline; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid rgba(var(--edge),0.15); }
.type-row .k { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-dim); width: 90px; flex: none; }

/* ---- FOOTER CTA ---- */
.cta-panel { padding: clamp(1.6rem, 3.2vw, 2.4rem); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cta-panel h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
footer { padding: 2rem 0 2.5rem; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; border-top: var(--border-w) solid rgba(var(--edge),0.4); padding-top: 2rem; }
.foot .mono { font-size: 0.78rem; color: var(--ink-dim); }
.foot .foot-legal { font-size: 0.76rem; color: var(--ink-dim); text-align: right; max-width: 52ch; }
.foot .foot-legal a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); transition: color 0.2s; }
.foot .foot-legal a:hover { color: var(--accent); }
@media (max-width: 640px) { .foot .foot-legal { text-align: left; } }
