/* ==========================================================================
   K00 Cover & Index — page styles (index.html)
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */
.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-3);
}

.cover-title {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-size: clamp(64px, 11vw, 176px);
  font-weight: 800;
  line-height: .86;
  letter-spacing: -.055em;
  font-variation-settings: 'wdth' 80, 'opsz' 96;
}

.cover-lead {
  max-width: 22ch;
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.025em;
}

/* Three working rules */
.cover-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin-top: 40px;
}

.cover-rule {
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.cover-rule__text {
  margin-top: 4px;
  font-size: 15px;
}

/* Section headings ------------------------------------------------------- */
.cover-heading {
  margin: 72px 0 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-3);
}

.cover-heading--next {
  margin-top: 56px;
}

/* Tile grid -------------------------------------------------------------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.tile:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.tile--roomy {
  gap: 12px;
}

.tile__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
}

/* Anything pinned to the bottom of a tile */
.tile__foot {
  margin-top: auto;
}

.tile__quote {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.2;
  color: var(--ink-2);
}

.tile__mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}

.tile__small {
  font-size: 14px;
}

/* Dark tile (K11) */
.tile--inverse {
  background: var(--inverse);
  color: var(--on-inverse);
}

.tile--inverse:hover {
  border-color: var(--line);
  color: var(--on-inverse);
}

.tile--inverse .label {
  color: inherit;
  opacity: .75;
}

/* Hero tile (K02) — full row, text + swatch strip */
.tile--hero {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 0;
  padding: 0;
  view-transition-name: k02;
}

.tile--hero__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
}

.tile--hero__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

.tile--hero__text {
  max-width: 44ch;
  color: var(--ink-2);
}

.tile--hero__cta {
  margin-top: auto;
  font-weight: 600;
}

/* Fixed brand swatches — intentionally not themed */
.swatch-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 220px;
}

.swatch-strip__item {
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.swatch-strip__item--canvas { background: #FAFAF8; color: #474752; }
.swatch-strip__item--ink    { background: #111114; color: #EDEDF0; }
.swatch-strip__item--signal { background: #C8189B; color: #FFFFFF; }
.swatch-strip__item--bright { background: #0E0E11; color: #FF4FCB; }

/* Tile illustrations ----------------------------------------------------- */
.tile-type {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.tile-type__aa {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.04em;
}

.tile-type__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
}

.tile-bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4px;
  height: 60px;
}

.tile-bento__cell {
  border-radius: 6px;
  background: var(--surface-3);
}

.tile-bento__cell--main {
  grid-row: span 2;
  background: var(--ink);
}

.tile-bento__cell--wide {
  grid-column: span 2;
}

.tile-shapes {
  display: flex;
  gap: 10px;
}

.tile-shapes__shape {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
}

.tile-shapes__shape--circle {
  border-radius: 50%;
}

.tile-shapes__shape--diamond {
  transform: rotate(45deg) scale(.8);
}

.tile-elements {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tile-elements__btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  font-size: 13px;
  font-weight: 600;
}

.tile-search {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
  font-size: 13px;
}

/* Bar heights are set per bar via the --h custom property */
.tile-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
}

.tile-bars__bar {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 3px;
  background: var(--c1);
}

/* Demo list -------------------------------------------------------------- */
.demo-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.demo-list__item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.demo-list__item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.demo-list__code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}

.demo-list__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.demo-list__name {
  font-weight: 600;
}

.demo-list__line {
  font-size: 14px;
  color: var(--ink-2);
}

.demo-list .badge {
  padding: 3px 9px;
}

.cover-disclaimer {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
