/* o1tean.com/brand — brand guidelines. Loads after /styles.css and reuses its tokens,
   glass, buttons, nav and section heads; only brand-page components live here. */

/* Static field instead of the WebGL engine: logo tiles need a calm background. */
body.page-brand {
  background:
    radial-gradient(55vmax 45vmax at 85% 8%, rgb(139 92 246 / .16), transparent 70%),
    radial-gradient(50vmax 40vmax at 5% 60%, rgb(255 95 210 / .07), transparent 70%),
    repeating-linear-gradient(90deg, rgb(217 124 255 / .035) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(rgb(217 124 255 / .025) 0 1px, transparent 1px 21px),
    var(--void);
  background-attachment: fixed;
}
.page-brand .section { background: none; padding-block: clamp(4rem, 10vh, 7rem); }
.page-brand .section + .section { border-top: 1px solid var(--line); }

/* ── Hero ───────────────────────────────────────────────── */

.bk-hero {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(7rem, 16vh, 10rem) var(--pad-x) clamp(3rem, 8vh, 5rem);
}
@media (min-width: 960px) { .bk-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
@media (min-width: 960px) { .bk-hero.bk-hero--stack { grid-template-columns: minmax(0, 1fr); } }
.bk-hero.bk-hero--stack .lede { max-width: 64ch; }

.bk-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  line-height: .9;
  overflow-wrap: normal; /* HACKED is wide: never split a word mid-glyph */
  text-shadow: 0 0 .35em rgb(217 124 255 / .35);
}
.bk-hero .lede { max-width: 46ch; margin-top: 1.25rem; color: var(--muted); }
.bk-hero .kicker { margin-bottom: 1.25rem; color: var(--orchid); font-size: .8125rem; letter-spacing: .08em; }
.bk-hero .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Palette strip: the colour system previewed as one segmented rule. */
.strip { display: flex; height: 6px; margin-bottom: 1.5rem; }
.strip > span { flex: 1; }
.strip > .s-plum { flex: 2; } .strip > .s-orchid { flex: 3; } .strip > .s-pink { flex: 1; }

.stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--void);
  box-shadow: 0 30px 80px -40px rgb(139 92 246 / .6);
}
.stage video, .stage img, .stage svg { width: 100%; height: 100%; object-fit: cover; }
.stage-bar {
  position: absolute;
  inset: auto .75rem .75rem auto;
  display: flex;
  gap: .5rem;
}

/* ── Section heads: title left, the rule right (one module, repeated) ── */

.bk-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 3rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
@media (min-width: 860px) {
  .bk-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; }
  .bk-head .section-sub { margin-top: 0; }
}
.bk-sub { margin: clamp(3rem, 7vw, 4.5rem) 0 1.5rem; }
.bk-sub h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
.bk-sub p { max-width: 60ch; margin-top: .5rem; color: var(--muted); }

/* ── Cards ──────────────────────────────────────────────── */

.cards { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }
@media (min-width: 720px) { .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(15 10 20 / .82);
}
.card-body { display: grid; align-content: start; gap: .35rem; padding: 1.1rem 1.25rem 1.25rem; }
.card-body h3, .card-body h4 { margin: 0; font-size: 1rem; line-height: 1.3; }
.card .tile:focus-visible { outline-offset: -4px; }
.card-body p { color: var(--muted); font-size: .875rem; }
.eyebrow { color: var(--orchid); font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

/* Preview tiles: dark is the default canvas; light shows the light colourway. */
.tile {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 12%;
  min-height: 0; /* let aspect-ratio win over the image's intrinsic height */
  overflow: hidden;
  background: var(--void);
  border-bottom: 1px solid var(--line);
}
.tile img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.tile-square { aspect-ratio: 1; padding: 22%; }
.tile-mark { padding: 7% 12%; }
.tile-light { background: #f4ecf8; }
.tile-orchid { background: var(--orchid); }
.tile-plum { background: var(--plum); }
.tile-grid {
  background:
    repeating-linear-gradient(90deg, rgb(217 124 255 / .1) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(rgb(217 124 255 / .1) 0 1px, transparent 1px 24px),
    var(--void);
}

/* Asset actions: SVG [copy] [download] · PNG [copy] [download] */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  margin-top: auto;
  padding: .75rem 1.25rem 1rem;
  border-top: 1px solid var(--line);
  font-size: .75rem;
}
.actions .fmt { min-width: 3ch; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.actions .fmt:not(:first-child) { margin-left: .75rem; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .2rem .65rem;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 999px;
  background: none;
  color: var(--fg);
  font: 700 .75rem/1 var(--font-mono);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.chip-btn:hover { border-color: var(--orchid); color: var(--fg); background: rgb(217 124 255 / .1); }
.chip-btn.is-done { border-color: var(--orchid); color: var(--orchid); }

/* ── Rules: clearspace, minimum size, construction ─────── */

.spec-grid { display: grid; align-items: start; gap: 1rem; }
@media (min-width: 860px) { .spec-grid { grid-template-columns: 1.4fr 1fr; } }
.spec-list { display: grid; gap: .25rem 1.5rem; grid-template-columns: max-content minmax(0, 1fr); font-size: .875rem; }
.spec-list dt { color: var(--orchid); font-weight: 700; }
.spec-list dd { color: var(--muted); }

.toggle-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; }
.overlay { position: relative; }
.overlay > img + img { position: absolute; inset: 0; opacity: 0; transition: opacity .3s var(--ease); }
.overlay.is-on > img + img { opacity: 1; }

/* Misuse cards: each SVG carries its own × marker. */
.tag-dont { color: var(--orchid); font-size: .6875rem; font-weight: 700; letter-spacing: .16em; }

/* ── Colour ─────────────────────────────────────────────── */

.swatch { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); }
.sw-void { background: var(--void); } .sw-ink { background: var(--ink); }
.sw-plum { background: var(--plum); } .sw-violet { background: var(--violet); }
.sw-orchid { background: var(--orchid); } .sw-pink { background: var(--pink); }
.sw-blush { background: var(--blush); } .sw-paper { background: #f4ecf8; }
.s-void { background: var(--void); } .s-plum { background: var(--plum); } .s-violet { background: var(--violet); }
.s-orchid { background: var(--orchid); } .s-pink { background: var(--pink); } .s-blush { background: var(--blush); }

.values { display: grid; gap: .15rem; margin-top: .5rem; }
.value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2rem;
  padding: 0 .1rem;
  border: 0;
  border-bottom: 1px dashed var(--line);
  background: none;
  color: var(--fg);
  font: .8125rem/1.2 var(--font-mono);
  text-align: left;
  cursor: pointer;
}
.value span:first-child { color: var(--muted); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; }
.value:hover span:last-child, .value.is-done span:last-child { color: var(--orchid); }
.contrast { color: var(--muted); font-size: .75rem; }

/* Proportion bar: void 60 / plum 18 / orchid 12 / pink 6 / blush 4 */
.ratio { display: flex; height: 3.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; font-size: .75rem; font-weight: 700; }
.ratio > span { display: flex; align-items: end; padding: .4rem .6rem; }
.ratio .r-void { flex: 60; background: var(--void); color: var(--muted); }
.ratio .r-plum { flex: 18; background: var(--plum); color: var(--blush); }
.ratio .r-orchid { flex: 12; background: var(--orchid); color: var(--void); }
.ratio .r-pink { flex: 6; background: var(--pink); color: var(--void); }
.ratio .r-blush { flex: 4; background: var(--blush); color: var(--void); }

/* ── Type ───────────────────────────────────────────────── */

.card-body .type-name { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); line-height: 1; }
.card-body .type-name.f-display { font-family: var(--font-display); font-weight: 400; font-synthesis: none; }
.specimen { display: grid; gap: 1.25rem; padding: 1.25rem; border-top: 1px solid var(--line); }
.specimen .label { color: var(--muted); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; }
.specimen .s-display { font-family: var(--font-display); font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem); line-height: 1.05; font-synthesis: none; }
.specimen .s-bold { font-weight: 700; font-size: 1.125rem; letter-spacing: .02em; }
.specimen .s-code { color: var(--orchid); font-size: .875rem; }

/* ── Motion ─────────────────────────────────────────────── */

.reel { aspect-ratio: 1; width: 100%; background: var(--void); object-fit: cover; }
.reel-wide { aspect-ratio: 16 / 9; }
.tokens { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.tokens th, .tokens td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tokens th { color: var(--muted); font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tokens code { color: var(--orchid); }
.tokens .value { display: inline-flex; border: 0; min-height: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: rgb(15 10 20 / .82); padding: .25rem 1rem; }

.rules { display: grid; gap: .75rem; padding: 0; list-style: none; }
.rules li { padding-left: 1.75rem; position: relative; color: var(--muted); }
.rules li::before { content: "→"; content: "→" / ""; position: absolute; left: 0; color: var(--orchid); }
.rules strong { color: var(--fg); }

/* ── Explorations ───────────────────────────────────────── */

.explore-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .explore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .explore-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.explore-grid .card-body { padding: .75rem .9rem .9rem; }
.explore-grid .tile-square { padding: 0; } /* posters carry their own margins */
.explore-grid .num { color: var(--orchid); font-size: .75rem; font-weight: 700; }
.explore-grid .card.is-pick { border-color: var(--orchid); box-shadow: 0 0 0 1px var(--orchid), 0 20px 50px -30px rgb(217 124 255 / .8); }
.pick-tag { color: var(--orchid); font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Full exploration page: one row per direction. */
.direction { display: grid; gap: 1.25rem; padding-block: clamp(2rem, 5vw, 3rem); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .direction { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.direction h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem); line-height: 1.1; }
.direction .meta { display: grid; gap: .75rem; }
.direction .meta p { color: var(--muted); }
.score { display: grid; grid-template-columns: max-content minmax(0, 1fr) 3.5ch; gap: .2rem .75rem; align-items: center; font-size: .75rem; }
.score dt { color: var(--muted); }
.score .bar { height: 6px; background: var(--plum); }
.score .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--orchid)); }
.score .w0 { width: 0%; } .score .w1 { width: 10%; } .score .w2 { width: 20%; } .score .w3 { width: 30%; } .score .w4 { width: 40%; } .score .w5 { width: 50%; } .score .w6 { width: 60%; } .score .w7 { width: 70%; } .score .w8 { width: 80%; } .score .w9 { width: 90%; } .score .w10 { width: 100%; }
.score > div { display: contents; }
.score dd { margin: 0; white-space: nowrap; text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }

/* The logo's cell is the page's one pink: primary buttons go solid orchid here. */
.page-brand .btn-primary { background: var(--orchid); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 12px 32px -12px rgb(217 124 255 / .7); }

/* One-shot stings: the end-frame still replaces the video when motion is off. */
.still { display: none; }
.motion-off video[data-once] { display: none; }
.motion-off .still { display: block; }
.stage .still { width: 100%; height: 100%; object-fit: cover; }
.reel-contain { object-fit: contain; }
.grp { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: .4rem; }
details.more { margin-top: 1rem; }
details.more > summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: .875rem; }
details.more > summary:hover { color: var(--fg); }
details.more[open] > summary { margin-bottom: 1rem; }

/* Phones: two-up grids and short swatches keep the page from running 30 screens. */
@media (max-width: 719px) {
  .cards-3.compact, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-4 .swatch { aspect-ratio: 3 / 1; }
  .compact .card-body { padding: .8rem .85rem .9rem; }
  .compact .card-body p { font-size: .8125rem; }
}
@media (max-width: 959px) { .direction .meta { order: -1; } }

/* Nav: the live logo (hover flips the cell). 28 px tall keeps the cell above its 16 px floor. */
.nav-brand-logo { display: inline-flex; flex: none; align-items: center; height: 2.75rem; padding-block: .5rem; }
@media (max-width: 559px) { .page-brand .nav-links li:nth-child(3), .page-brand .nav-links li:nth-child(5) { display: none; } }
.bk-note { margin-top: 1.25rem; color: var(--muted); font-size: .875rem; }
.tile-construction { aspect-ratio: auto; padding: 0; }
img.pixel { width: 50%; height: auto; image-rendering: pixelated; }
.kit-bar { margin-top: clamp(1.5rem, 4vw, 2.5rem); }

/* ── Toast ──────────────────────────────────────────────── */

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 1.25rem;
  padding: .55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-2);
  color: var(--fg);
  font-size: .8125rem;
  translate: -50% calc(100% + 2rem);
  visibility: hidden;
  transition: translate .3s var(--ease), visibility 0s .3s;
}
.toast.is-on { translate: -50% 0; visibility: visible; transition: translate .3s var(--ease); }

/* Download-all bar */
.kit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
}
.kit-bar p { color: var(--muted); max-width: 60ch; }
/* Below ~390 px the download pill is wider than the card: let its label wrap. */
.kit-bar .btn { white-space: normal; }

@media print {
  body.page-brand { background: #fff; color: #000; }
  .nav, .stage-bar, .actions, .toast, .motion-toggle { display: none !important; }
  .card, .tile { break-inside: avoid; }
}
.explore-grid .name { color: var(--fg); font-weight: 700; font-size: .875rem; line-height: 1.3; }
.actions .grp + .grp { margin-left: .5rem; }
