/* Page styles for colors.dalix.dev. Anything reusable lives in dalix.css. */

.group { margin: var(--space-8) 0 var(--space-4); font-size: var(--text-lg); line-height: 1.4; }
h2 + .group { margin-top: 0; }

/* Hero snippet */

.snippet {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
  margin-top: var(--space-6);
  padding: 6px 6px 6px var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.snippet code {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: var(--text-sm);
  scrollbar-width: none;
}

/* Logo */

.logo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-5);
}
.logo-stage {
  display: grid;
  place-items: center;
  min-height: 240px;
}
.logo-stage img { width: min(100%, 420px); height: auto; }
.logo-stage img[src="favicon.svg"] { width: 96px; }

.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0 0;
}
.specs div { padding-top: var(--space-3); border-top: 1px solid var(--line); }
.specs dt { font-size: var(--text-sm); color: var(--muted); }
.specs dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* Color */

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  min-height: 200px;
  padding: var(--space-6);
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.band-name {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.band-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  font-family: var(--font-mono);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--space-5) var(--space-3);
  margin-top: var(--space-4);
}
.swatch {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.swatch-chip {
  display: flex;
  align-items: flex-end;
  height: 88px;
  margin-bottom: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(11 30 36 / 0.08);
  color: var(--on);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.swatch-name { color: var(--ink); font-size: var(--text-sm); font-weight: 600; }
.swatch-hex { color: var(--body); font-family: var(--font-mono); font-size: 13px; }
.swatch-role { color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); white-space: nowrap; }
.swatch:hover .swatch-hex,
.band:hover [data-copy-label] { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .swatches { grid-template-columns: repeat(var(--cols-md), minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatch-chip { height: 64px; }
  .band { min-height: 160px; padding: var(--space-5); }
  .band-name { font-size: 40px; }
}

/* Type */

.specimen { display: flex; flex-direction: column; }
.specimen .tile { font-size: 19px; }
.specimen h3 { font-size: 28px; letter-spacing: -0.015em; }
.specimen-mono :is(.tile, h3, .specimen-glyphs, .weights) { font-family: var(--font-mono); letter-spacing: 0; }
.specimen-note :is(.tile, h3, .specimen-glyphs, .weights) { font-family: var(--font-note); letter-spacing: 0; }
.specimen-glyphs {
  margin-top: var(--space-4);
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.5;
  font-variant-ligatures: normal;
  overflow-wrap: anywhere;
}
.weights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  color: var(--ink);
}
.specimen-var { margin-top: auto; color: var(--muted); font-size: 13px; }

.scale { border-top: 1px solid var(--line); }
.scale-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}
.scale-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}
.scale-meta code { font-size: inherit; }
.scale-sample { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.scale-body { color: var(--body); line-height: 1.6; }

@media (max-width: 720px) {
  .scale-row { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* Shape */

.shapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.shape { margin: 0; }
.shape figcaption { margin-top: var(--space-4); }
.shape figcaption strong { display: block; font-size: var(--text-lg); font-weight: 700; }
.shape-stage {
  display: grid;
  place-items: center;
  height: 208px;
  border-radius: var(--radius);
  background: var(--subtle);
}
.shape-anchor { position: relative; }
.shape-box {
  width: 184px;
  height: 108px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.shape-card { width: 184px; height: 108px; }

/* Teal marks run parallel to the corner each figure measures, offset 6px outward */
.mark-radius {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  border-bottom: 0;
  border-left: 0;
  border-top-right-radius: calc(var(--radius) + 6px);
}
.mark-cut {
  position: absolute;
  top: calc(var(--c) / 2 - 1px - 4.24px);
  left: calc(var(--c) / 2 - var(--c) * 0.7071 - 4.24px);
  width: calc(var(--c) * 1.4142);
  height: 2px;
  background: var(--accent);
  transform: rotate(-45deg);
}
.note {
  position: absolute;
  color: var(--accent-strong);
  font-family: var(--font-note);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.note-tr { top: -30px; right: -14px; }
.note-tl { top: -30px; left: -18px; }

.space {
  display: grid;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  column-gap: var(--space-7);
  border-top: 1px solid var(--line);
}
.space-row {
  display: grid;
  grid-template-columns: 96px 40px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.space-row code { font-size: 13px; }
.space-row span { color: var(--muted); font-family: var(--font-mono); font-size: 13px; text-align: right; }
.space-row i { display: block; height: 12px; background: var(--teal-300); }

@media (max-width: 900px) {
  .logo-grid, .shapes { grid-template-columns: 1fr; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .space { grid-template-rows: none; grid-auto-flow: row; }
}

/* Components */

.demo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-5) var(--space-6);
}
.demo-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}
.grid > .demo-item { align-items: stretch; }
.grid > .demo-item > .card { flex: 1; }
.demo-label { color: var(--muted); font-size: var(--text-xs); }

.form-demo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-5);
  max-width: 760px;
}
.form-demo .check { grid-column: 1 / -1; justify-self: start; }

.prose { max-width: 68ch; margin-bottom: var(--space-5); }

@media (max-width: 720px) {
  .form-demo { grid-template-columns: 1fr; }
}

/* Rules */

.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-7);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rules li { padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.rules h3 { margin-bottom: var(--space-1); font-size: var(--text-lg); }

@media (max-width: 720px) {
  .rules { grid-template-columns: 1fr; }
}
