/* TAIKUNDA — website candidate stylesheet.
   Dependency-free. No @font-face, no remote URL, no CDN, no runtime fetch. */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--tk-near-black);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--tk-near-black);
  color: var(--tk-cream);
  font-family: var(--font-schibsted-grotesk);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------- scrolling */

.beats {
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--tk-chrome-h, 64px);
}

.beat {
  position: relative;
  scroll-snap-align: start;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding:
    calc(var(--tk-chrome-h, 64px) + var(--tk-beat-pad-y))
    var(--tk-gutter)
    var(--tk-beat-pad-y);
  color: var(--tk-cream);
  overflow: hidden;
  isolation: isolate;
}

.beat__inner {
  width: 100%;
  max-width: var(--tk-col-max);
  margin-inline: auto;
  min-width: 0;
}

/* --------------------------------------------------------------- typography */

h1, h2, h3, .display {
  font-family: var(--font-im-fell-english);
  font-weight: 400;
  letter-spacing: .02em;
  margin: 0;
  text-wrap: balance;
}

.beat__title {
  font-size: clamp(34px, 6.2vw, 84px);
  line-height: 1.02;
}

.beat__lede {
  max-width: 36ch;
  margin: clamp(18px, 2.4vw, 30px) 0 0;
  font-size: clamp(15px, 1.15vw, 18px);
  color: color-mix(in srgb, var(--tk-cream) 76%, transparent);
}

.measure-21 { max-width: 21ch; }

.mono {
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-mono), .68rem);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.smallcaps {
  font-family: var(--font-im-fell-english-sc);
  letter-spacing: .4em;
  text-transform: uppercase;
}

.beat__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 clamp(16px, 2vw, 26px);
  color: var(--tk-brass);
}

.beat__num { color: color-mix(in srgb, var(--tk-cream) 46%, transparent); }

/* ------------------------------------------------------------------- chrome */

.chrome {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--tk-chrome-h, 64px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  padding-inline: var(--tk-gutter);
  background: var(--tk-near-black);
  border-bottom: 1px solid color-mix(in srgb, var(--tk-brass) 26%, transparent);
}

.chrome__lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.chrome__mark { width: 26px; height: 26px; display: block; flex: none; }

.chrome__wordmark {
  font-family: var(--font-im-fell-english);
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: .07em;
  background: linear-gradient(#F6EAC8, #DFC183);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.status-pill {
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-mono), .625rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tk-brass);
  border: 1px solid color-mix(in srgb, var(--tk-brass) 42%, transparent);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

.chrome__studio {
  margin-left: auto;
  font-family: var(--font-schibsted-grotesk);
  font-size: max(var(--tk-min-control), .74rem);
  color: color-mix(in srgb, var(--tk-cream) 58%, transparent);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .chrome__studio { display: none; }
}

/* The chrome must never clip. Below 520px the lockup and the status pill both
   step down rather than colliding; the status text itself never changes. */
@media (max-width: 520px) {
  .chrome {
    gap: 10px;
    height: auto;
    min-height: 56px;
    padding-block: 9px;
  }
  .chrome__mark { width: 22px; height: 22px; }
  .chrome__wordmark { font-size: 17px; letter-spacing: .05em; }
  .status-pill { letter-spacing: .1em; padding: 4px 8px; }
}

@media (max-width: 380px) {
  .chrome__wordmark { font-size: 15px; }
  .status-pill { letter-spacing: .06em; }
}

/* --------------------------------------------------------------- rail (nav) */

.rail {
  position: fixed;
  z-index: 40;
  right: clamp(12px, 1.6vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail__link {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  text-decoration: none;
}

.rail__link:hover { background: rgba(255, 255, 255, .46); }
.rail__link[aria-current="true"] { background: #fff; }
.rail__link[data-past="true"] { background: rgba(255, 255, 255, .46); }

.beat--light ~ .rail { /* not reachable; rail tone is set from script */ }

.rail[data-tone="ink"] .rail__link { background: rgba(31, 26, 16, .16); }
.rail[data-tone="ink"] .rail__link[data-past="true"] { background: rgba(31, 26, 16, .48); }
.rail[data-tone="ink"] .rail__link[aria-current="true"] { background: var(--tk-ink); }

@media (max-width: 900px) { .rail { display: none; } }

/* ------------------------------------------------------------ beat grounds */

/* A beat carrying film needs bottom room for its provenance row. */
.beat--film { padding-bottom: clamp(84px, 12vh, 132px); }

.beat--colony  { background: radial-gradient(120% 95% at 50% 26%, #3A2A14, #241C13 46%, #1A1712); }
.beat--city    { background: linear-gradient(180deg, #1A1712 0%, #241D14 58%, #1A1712 100%); }
.beat--fusion  { background: radial-gradient(110% 90% at 22% 40%, #4A3416, #221B12 52%, #1A1712); }
.beat--chart   { background: linear-gradient(180deg, #1A1712 0%, #2A2216 62%, #1A1712 100%); }
.beat--combat  { background: radial-gradient(90% 80% at 62% 58%, #5E2A1E, #24190F 56%, #17140F 100%); }

.beat--light {
  background: var(--tk-page);
  color: var(--tk-ink);
}

.beat--light .beat__lede { color: var(--tk-body); }
.beat--light .beat__eyebrow { color: var(--tk-body); }
/* NOTE: --tk-brass-deep on --tk-page measures 4.31:1, not the 4.5:1 the pack's
   04-tokens.md states. It is therefore never used for normal-size text on the
   page ground - only for display numerals at 24px and above, where 3:1 applies.
   The token itself is reproduced verbatim and has not been lightened. */
.beat--light .beat__num { color: var(--tk-dim); }

.beat--settle { background: linear-gradient(180deg, #17140F 0%, #1A1712 100%); }

/* The pack's scan wash was a treatment for a drawn ground. Beat 01 now carries
   real capture, and a moving gradient over real footage is decoration on top of
   evidence, so it is not used. Recorded as a deliberate departure. */

/* ----------------------------------------------------------------- layouts */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--tk-aside));
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

/* A wider media column for beats whose evidence is the picture. */
.split--media { grid-template-columns: minmax(0, 1fr) minmax(0, 54%); }

@media (max-width: 980px) {
  .split, .split--media { grid-template-columns: minmax(0, 1fr); }
}

.stack-lg { display: grid; gap: clamp(20px, 2.6vw, 34px); }

/* ------------------------------------------------------------------- media */

/* Footage runs full bleed behind the beat it belongs to. Every frame on this
   page is a real file with recorded provenance, and the label that says which
   kind it is stays on screen for as long as the footage does. */
.film {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #0F0D0A;
}

.film__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The scrim carries the copy. It is heaviest where the text sits and clears
   toward the far edge so the picture is still a picture. */
.film__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 17, 13, .72) 0%, rgba(20, 17, 13, .10) 24%, rgba(20, 17, 13, .12) 72%, rgba(20, 17, 13, .84) 100%),
    linear-gradient(90deg, rgba(20, 17, 13, .94) 0%, rgba(20, 17, 13, .86) 32%, rgba(20, 17, 13, .42) 60%, rgba(20, 17, 13, .16) 100%);
}

@media (max-width: 980px) {
  .film__scrim {
    background:
      linear-gradient(180deg, rgba(20, 17, 13, .88) 0%, rgba(20, 17, 13, .74) 42%, rgba(20, 17, 13, .9) 100%);
  }
}

/* Provenance and control sit on the beat, not on the frame, so neither can be
   scrolled away from the footage it describes. */
.film__label {
  position: absolute;
  left: var(--tk-gutter);
  bottom: clamp(18px, 3vh, 34px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin: 0;
  padding: 7px 13px;
  border: 1px solid var(--tk-capture-line);
  border-radius: 999px;
  background: rgba(15, 13, 10, .78);
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-mono), .6rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tk-cream) 86%, transparent);
  max-width: calc(100% - (2 * var(--tk-gutter)));
}

.film__label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tk-capture-line);
  flex: none;
}

.beat--cinematic .film__label { border-color: var(--tk-cinematic-line); }
.beat--cinematic .film__label::before { background: var(--tk-cinematic-line); }

.film__toggle {
  position: absolute;
  right: var(--tk-gutter);
  bottom: clamp(18px, 3vh, 34px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 8px 15px;
  border: 1px solid rgba(247, 243, 227, .34);
  border-radius: 999px;
  background: rgba(15, 13, 10, .78);
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-control), .62rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tk-cream);
  cursor: pointer;
}

.film__toggle:hover { border-color: var(--tk-brass); }
.film__toggle svg { width: 11px; height: 11px; flex: none; }

/* On a narrow screen the two would collide, and provenance must never be the
   thing that gets truncated, so the control moves out of its way instead. */
@media (max-width: 620px) {
  .film__toggle {
    top: calc(var(--tk-chrome-h, 64px) + 14px);
    bottom: auto;
  }
  .film__label {
    left: var(--tk-gutter);
    right: var(--tk-gutter);
    max-width: none;
    justify-content: flex-start;
  }
}

/* Without script nothing plays, so a control would be a lie. */
.no-js .film__toggle { display: none; }

/* --------------------------------------------------------------- diagrams */

/* Drawn from the build's own systems, not decoration. Over footage they take
   a panel so the lines stay readable against a moving picture. */
.diagram {
  display: grid;
  align-content: center;
  border: 1px solid rgba(216, 178, 94, .28);
  border-radius: var(--tk-radius-card);
  padding: clamp(24px, 3.4vw, 44px);
  min-width: 0;
  min-height: min(44svh, 360px);
  background: linear-gradient(180deg, rgba(26, 23, 18, .86), rgba(26, 23, 18, .72));
}

.diagram--plain { background: linear-gradient(180deg, rgba(216, 178, 94, .05), transparent 60%); }

.diagram__caption {
  margin: 16px 0 0;
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-mono), .58rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tk-cream) 58%, transparent);
}

.diagram svg { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- features */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 2.6vw, 34px) clamp(24px, 3.4vw, 52px);
  margin: clamp(26px, 3.4vw, 44px) 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  border-top: 1px solid var(--tk-line);
  padding-top: 16px;
  min-width: 0;
}

.feature__title {
  font-family: var(--font-im-fell-english);
  font-weight: 400;
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.15;
  letter-spacing: .02em;
  margin: 0 0 8px;
  color: var(--tk-ink);
}

.feature__body {
  margin: 0;
  font-size: max(var(--tk-min-body), .92rem);
  line-height: 1.55;
  color: var(--tk-body);
  max-width: 44ch;
}

/* Counted, not claimed. Every figure here is a content count from the build. */
.counted {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(22px, 4vw, 64px);
  margin: clamp(30px, 4vw, 52px) 0 0;
  padding-top: clamp(20px, 2.6vw, 30px);
  border-top: 1px solid var(--tk-line);
  list-style: none;
}

.counted__item { display: grid; gap: 2px; }

.counted__n {
  font-family: var(--font-im-fell-english);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1;
  color: var(--tk-brass-deep);
}

.counted__l {
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-mono), .58rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tk-dim);
}

/* ------------------------------------------------------------------ follow */

.follow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: clamp(22px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
}

/* The pack's rule: only real links are solid. These are real links now, so
   they are solid brass and read as actions rather than as notes. */
.follow__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--tk-brass);
  border-radius: 999px;
  padding: 10px 17px;
  background: color-mix(in srgb, var(--tk-brass) 14%, transparent);
  color: var(--tk-brass);
  text-decoration: none;
  font-family: var(--font-dm-mono);
  font-size: max(var(--tk-min-control), .68rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background-color .14s var(--tk-ease), color .14s var(--tk-ease);
}

.follow__link:hover {
  background: var(--tk-brass);
  color: var(--tk-near-black);
}

.follow__link svg { width: 15px; height: 15px; flex: none; }

.closing__link {
  color: color-mix(in srgb, var(--tk-cream) 82%, transparent);
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--tk-brass) 60%, transparent);
}

.closing__link:hover { color: var(--tk-brass); }

.closing {
  margin: clamp(26px, 3.4vw, 40px) 0 0;
  padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid color-mix(in srgb, var(--tk-brass) 22%, transparent);
  display: grid;
  gap: 10px;
  font-size: max(var(--tk-min-body), .84rem);
  color: color-mix(in srgb, var(--tk-cream) 66%, transparent);
}

/* ------------------------------------------------------------ accessibility */

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  background: var(--tk-brass);
  color: var(--tk-ink);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: max(var(--tk-min-control), .8rem);
  text-decoration: none;
  transition: top .12s var(--tk-ease);
}

.skip:focus { top: 12px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--tk-brass);
  outline-offset: 3px;
  border-radius: 4px;
}

.beat--light :where(a, button, [tabindex]):focus-visible { outline-color: var(--tk-brass-deep); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .beats { scroll-snap-type: none; }
}

@media print {
  .rail, .film__toggle { display: none; }
  .beat { min-height: auto; page-break-inside: avoid; }
}
