/* AnyDance brand guidelines — editorial presentation shell */
:root {
  --bg: #07070a;
  --bg-2: #101016;
  --surface: #16161d;
  --surface-2: #1c1c26;
  --ink: #f4f1ec;
  --muted: #9a948c;
  --line: rgba(244, 241, 236, 0.1);
  --line-strong: rgba(244, 241, 236, 0.22);
  --paper: #efeae2;
  --paper-ink: #12110f;
  --paper-muted: #5f5850;
  --accent: #c084fc;
  --ok: #6fbf95;
  --bad: #f07178;
  --nav-w: 248px;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Syne", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(920px 520px at 85% -8%, rgba(192, 132, 252, 0.16), transparent 58%),
    radial-gradient(700px 480px at -10% 40%, rgba(244, 241, 236, 0.04), transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: #d8c8f4;
}

.shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 32px 22px 28px;
  border-right: 1px solid var(--line);
  background: rgba(7, 7, 10, 0.78);
  backdrop-filter: blur(16px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-brand {
  display: block;
  text-decoration: none;
  margin-bottom: 8px;
}
.nav-brand img {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(192, 132, 252, 0.25));
}
.nav-kicker {
  margin: 0 0 36px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  flex: 1;
}
.nav a {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 11px 12px;
  border-radius: 0;
  text-decoration: none;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover {
  color: var(--ink);
  background: rgba(244, 241, 236, 0.03);
}
.nav a[aria-current="page"] {
  color: var(--ink);
  border-left-color: var(--accent);
  background: rgba(192, 132, 252, 0.08);
}
.nav .step {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.55;
}
.nav a[aria-current="page"] .step { opacity: 1; }

.nav-foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.nav-foot a {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  grid-template-columns: none;
}
.nav-foot a:hover { background: none; color: var(--accent); }

/* —— Main —— */
.main {
  padding: 0;
  min-width: 0;
}
.main-inner {
  max-width: var(--max);
  padding: 48px 48px 96px;
  animation: rise 0.7s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
h1 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.lead {
  margin: 0 0 40px;
  max-width: 38rem;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}
h2 {
  margin: 56px 0 16px;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}
h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
p { margin: 0 0 14px; max-width: 40rem; }
.muted { color: var(--muted); }

.note {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 236, 0.03);
  font-size: 13px;
  color: var(--muted);
  max-width: none;
}

/* —— Cover —— */
.cover-stage {
  position: relative;
  margin: 8px 0 48px;
  border-radius: 4px;
  overflow: hidden;
  min-height: min(62vh, 560px);
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  border: 1px solid var(--line-strong);
  background: #050507;
}
.cover-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(192, 132, 252, 0.08) 100%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 11px,
      rgba(244, 241, 236, 0.015) 11px,
      rgba(244, 241, 236, 0.015) 12px
    );
  pointer-events: none;
}
.cover-dark,
.cover-light {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  padding: 40px 36px;
  min-height: 280px;
}
.cover-dark { background: transparent; }
.cover-light {
  background: var(--paper);
  color: var(--paper-ink);
}
.cover-dark .tag,
.cover-light .tag {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.cover-dark .tag { color: rgba(244, 241, 236, 0.55); }
.cover-light .tag { color: var(--paper-muted); }
.cover-dark img.wordmark,
.cover-light img.wordmark {
  height: clamp(36px, 5vw, 52px);
  width: auto;
}

.principle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
.principle article {
  padding: 28px 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
}
.principle h3 { font-size: 20px; margin-bottom: 10px; }
.principle p { margin: 0; color: var(--muted); max-width: none; }

.toc {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 40px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.toc a {
  display: block;
  padding: 22px 18px 24px;
  background: var(--bg-2);
  text-decoration: none;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.toc a:hover {
  background: var(--surface-2);
}
.toc .n {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 700;
}
.toc strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.toc .d {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

/* —— Cards / stages —— */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
}
.card.dark {
  background: #050507;
  color: var(--ink);
}
.card.light {
  background: var(--paper);
  color: var(--paper-ink);
  border-color: transparent;
}
.card .label {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.card.light .label { color: var(--paper-muted); }
.card .meta {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.card.light .meta { color: var(--paper-muted); }

.logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 32px 20px;
  border-radius: 2px;
}
.logo-stage img.wordmark { height: 42px; width: auto; }
.logo-stage img.mark { height: 88px; width: auto; }
.logo-stage.tall { min-height: 180px; }

.clear-demo {
  position: relative;
  display: inline-flex;
  padding: 36px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(192, 132, 252, 0.22),
      rgba(192, 132, 252, 0.22) 7px,
      transparent 7px,
      transparent 14px
    );
  border-radius: 2px;
}
.clear-demo img { height: 44px; width: auto; }
.clear-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(192, 132, 252, 0.55);
  pointer-events: none;
}

.size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 36px;
}
.size-item { text-align: center; }
.size-item img { margin: 0 auto 10px; width: auto; }
.size-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.swatch {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.swatch i {
  display: block;
  height: 88px;
}
.swatch b, .swatch em {
  display: block;
  padding: 0 14px;
  font-style: normal;
}
.swatch b {
  padding-top: 12px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}
.swatch em {
  padding-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.do-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.do, .dont {
  border-radius: 4px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.do { box-shadow: inset 3px 0 0 var(--ok); }
.dont { box-shadow: inset 3px 0 0 var(--bad); }
.do h3 { color: var(--ok); }
.dont h3 { color: var(--bad); }
.do ul, .dont ul {
  margin: 10px 0 0;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: 14px;
}
.do li, .dont li { margin: 0 0 8px; }

.type-specimen {
  padding: 36px 32px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--paper-ink);
  border: 0;
}
.type-specimen .sample {
  margin: 0 0 16px;
  line-height: 1.05;
}
.type-specimen .meta {
  margin: 0;
  font-size: 13px;
  color: var(--paper-muted);
}
.type-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.type-row:last-child { border-bottom: 0; }
.type-row .role {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.ratio {
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  background:
    linear-gradient(135deg, #2a2a34, #121218 60%);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
}
.ratio.portrait { aspect-ratio: 3 / 4; max-width: 180px; }
.ratio.square { aspect-ratio: 1; max-width: 160px; }

.family-sheet {
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 28px;
  overflow: hidden;
}
.family-sheet img {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.cta-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cta-list a {
  display: block;
  padding: 20px 22px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.cta-list a:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateX(4px);
}
.cta-list a small {
  display: block;
  margin-top: 6px;
  font-family: var(--font);
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.pager a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.pager a:hover {
  border-color: var(--accent);
  background: rgba(192, 132, 252, 0.08);
}
.pager .spacer { flex: 1; }

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(18, 17, 15, 0.08);
  color: var(--paper-muted);
  margin-right: 6px;
}

.font-any {
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.font-poiret {
  font-family: "Poiret One", "Segoe UI", sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.font-monoton {
  font-family: "Monoton", cursive;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .nav {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: none;
  }
  .nav a {
    grid-template-columns: auto auto;
    padding: 8px 10px;
    font-size: 13px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .nav a[aria-current="page"] {
    border-left: 0;
    border-bottom-color: var(--accent);
  }
  .main-inner { padding: 32px 20px 72px; }
  .cover-stage,
  .principle,
  .grid-2,
  .grid-3,
  .grid-4,
  .do-grid,
  .toc {
    grid-template-columns: 1fr;
  }
  .type-row { grid-template-columns: 1fr; gap: 4px; }
}

