/* Kiln site. Colours are Kiln's own: soot, brick, ember and the module glazes. One family (TikTok Sans), wide and heavy for display. */
:root {
  --bg: #16110e; --surface: #221a15; --ink: #ecebe9; --muted: #c9b9a8;
  --accent: #ff7a2f; --accent-ink: #16110e;
  --brick: #9b3b28; --brick-ink: #f5f5f5;
  --teal: #3f9a97; --teal-ink: #0f1514;
  --ochre: #e2a33a; --ochre-ink: #16110e;
  --plum: #6f4f9c; --plum-ink: #f5f5f5;
  --cedar: #4a2f1e; --paper: #ecebe9;
  --step-small: 0.8125rem;
  --step-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --step-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  --step-head: clamp(1.625rem, 1.2rem + 1.9vw, 2.75rem);
  --step-display: clamp(2.6rem, 7.4vw, 7.5rem);
  --m: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "TikTok Sans", system-ui, sans-serif; font-size: var(--step-body); line-height: 1.5; font-stretch: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.display, h1, .f-phrase, .cta-word { font-weight: 800; font-stretch: 150%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; }
code, pre { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: var(--step-small); }

/* buttons: square-cornered, one fill */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: transform .18s var(--ease), background-color .18s; }
.btn:hover { background: #ffa066; transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 9px 16px; font-size: var(--step-small); }
.btn-big { padding: 14px 22px; font-size: var(--step-body); }

/* nav: a plain bar on the hero */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 18px var(--m); color: var(--brick-ink); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-stretch: 150%; text-transform: uppercase; text-decoration: none; font-size: var(--step-body); }
.wordmark svg { width: 22px; height: 22px; fill: var(--accent); }
.nav nav { margin-left: auto; display: flex; gap: 26px; }
.nav nav a { text-decoration: none; font-weight: 500; }
.nav nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.tutorials .nav, body:has(.tutorials) .nav { position: relative; color: var(--ink); background: var(--bg); }

/* hero: brick field, soot band, a kiln-door arch on the seam */
.hero { position: relative; height: min(82svh, 760px); min-height: 520px; overflow: hidden; display: grid; grid-template-rows: 82fr 18fr; }
.hero-field { background: var(--brick); color: var(--brick-ink); position: relative; }
.hero h1 { position: absolute; left: var(--m); top: 16%; font-size: min(var(--step-display), 7.4vw); line-height: .86; display: flex; flex-direction: column; z-index: 1; }
.hero h1 span { white-space: nowrap; }
.hero-band { background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 0 var(--m); position: relative; z-index: 3; }
.hero-band p { max-width: 46ch; font-size: var(--step-body); }
.hero-arch { position: absolute; margin: 0; left: 60vw; width: 25vw; aspect-ratio: 3 / 4; bottom: calc(18% - 7vw); transform: rotate(5deg); border-radius: 999px 999px 0 0; overflow: hidden; z-index: 2; background: var(--cedar); }
.hero-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 40%; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-2%, -1%); } }

/* showcase: the Shaded / Line art switch, blown up */
.show { position: relative; min-height: 84svh; overflow: hidden; background: var(--ochre); color: var(--ochre-ink); display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--m); padding: 96px var(--m) 0; transition: background-color .45s var(--ease), color .45s; }
.show[data-mode="line"] { background: var(--paper); color: #16110e; }
.show-copy { grid-column: 1 / 5; }
.show-copy h2 { font-size: var(--step-head); font-weight: 800; font-stretch: 125%; line-height: 1.02; letter-spacing: -0.01em; }
.show-copy p { margin-top: 20px; max-width: 34ch; }
.show-pic { grid-column: 5 / 9; margin: 0; position: relative; align-self: end; aspect-ratio: 4 / 5; }
.show-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease); }
.show .pic-line { opacity: 0; }
.show[data-mode="line"] .pic-line { opacity: 1; }
.show[data-mode="line"] .pic-shade { opacity: 0; }
.switch { position: absolute; right: var(--m); bottom: 8svh; font-size: var(--step-lead); display: flex; background: #16110e; border-radius: 999px; padding: .22em; z-index: 2; }
.switch button { font: inherit; font-weight: 800; font-stretch: 125%; border: 0; background: transparent; color: #ecebe9; padding: .55em 1.1em; border-radius: 999px; cursor: pointer; transition: background-color .25s, color .25s, transform .15s; }
.switch button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.switch button:hover { transform: scale(1.03); }

/* the brick wall: the live thing */
.wall { padding: 120px var(--m) 110px; background: var(--bg); }
.wall-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--m); align-items: end; margin-bottom: 64px; }
.wall-head h2 { grid-column: 1 / 7; font-size: var(--step-head); font-weight: 800; font-stretch: 125%; line-height: 1; }
.wall-head p { grid-column: 8 / 13; font-size: var(--step-lead); line-height: 1.35; }
.wall-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--m); align-items: start; }
.bricks { grid-column: 1 / 8; display: flex; flex-direction: column; gap: 8px; background: #2a1c15; padding: 8px; }
.course { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.course-name { color: var(--muted); font-size: var(--step-small); padding-left: 6px; }
.course-bricks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.course:nth-child(even) .course-bricks { padding-left: 40px; }
.brick { font: inherit; text-align: left; background: var(--glaze); color: var(--glaze-ink); border: 0; padding: 14px 16px 16px; min-height: 76px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 2px; transition: transform .18s var(--ease), filter .18s; }
.brick:hover { transform: translateY(-3px); filter: brightness(1.08); }
.brick[aria-pressed="true"] { transform: translateY(-5px); filter: brightness(1.15) saturate(1.1); }
.b-name { font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: var(--step-body); line-height: 1.1; }
.b-tag { font-size: var(--step-small); }
.peek { grid-column: 8 / 13; background: var(--surface); }
.peek-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.peek.noshot .peek-img { display: none; }
.peek.noshot { background: var(--g, var(--surface)); color: var(--gi, var(--ink)); }
.peek-text { padding: 26px 26px 30px; }
.peek-title { font-size: var(--step-lead); font-weight: 800; font-stretch: 125%; text-transform: uppercase; }
.peek-blurb { margin-top: 10px; }
.peek-meta { margin-top: 18px; display: flex; gap: 18px; align-items: baseline; color: var(--muted); }
.peek.noshot .peek-meta { color: inherit; }
.peek-link { color: var(--accent); font-weight: 600; }
.peek.noshot .peek-link { color: inherit; }

/* statements on colour fields */
.field { position: relative; min-height: 60svh; padding: 28px; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr auto; }
.f1 { background: var(--brick); color: var(--brick-ink); } .f2 { background: var(--teal); color: var(--teal-ink); }
.f3 { background: var(--ochre); color: var(--ochre-ink); } .f4 { background: var(--plum); color: var(--plum-ink); }
.f-text { grid-column: 8 / 12; grid-row: 1; max-width: 32ch; padding-top: 40px; font-size: var(--step-body); }
.f-phrase { grid-column: 1 / 13; grid-row: 3; font-size: var(--step-display); line-height: .9; max-width: 11ch; }
.field.mirror .f-text { grid-column: 2 / 6; }
.field.mirror .f-phrase { justify-self: end; text-align: right; }

/* how it fires: an accordion of brick tints, dark to light */
.how { padding: 130px var(--m) 120px; }
.how-intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--m); margin-bottom: 64px; }
.how-intro h2 { grid-column: 1 / 6; font-size: var(--step-head); font-weight: 800; font-stretch: 125%; line-height: 1; }
.how-intro p { grid-column: 7 / 12; font-size: var(--step-lead); line-height: 1.35; }
.stages { display: flex; height: 460px; }
.stage { --tint: color-mix(in srgb, #2a0f0a, #e08a66 calc(var(--t) * 22%)); background: var(--tint); color: #f5f5f5; flex: 0 0 calc(42% / 4); position: relative; overflow: hidden; transition: flex-basis .45s var(--ease); }
.stage:nth-child(n+5) { color: #16110e; }
.stage.open { flex: 1 1 58%; }
.stage-tab { position: absolute; inset: 0; width: 100%; font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; font-weight: 800; font-size: var(--step-body); }
.stage-tab { writing-mode: vertical-rl; transform: rotate(180deg); padding: 24px 18px; display: flex; align-items: flex-start; }
.stage.open .stage-tab { display: none; }
.stage-body { display: none; height: 100%; padding: 32px; grid-template-columns: 1fr 1.25fr; gap: 32px; }
.stage.open .stage-body { display: grid; }
.stage-body h3 { font-size: var(--step-lead); font-weight: 800; font-stretch: 125%; text-transform: uppercase; grid-column: 1; }
.stage-body p { grid-column: 1; align-self: end; max-width: 36ch; }
.stage-body img { grid-column: 2; grid-row: 1 / 3; width: 100%; height: 100%; object-fit: cover; object-position: left top; }

/* download */
.download { padding: 120px var(--m) 100px; background: var(--surface); }
.dl-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--m); margin-bottom: 56px; align-items: end; }
.dl-head h2 { grid-column: 1 / 7; font-size: var(--step-head); font-weight: 800; font-stretch: 125%; line-height: 1; }
.dl-head p { grid-column: 8 / 13; font-size: var(--step-lead); line-height: 1.35; }
.dl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dl-col { padding: 44px var(--m) 48px; }
.dl-col.linux { background: var(--teal); color: var(--teal-ink); }
.dl-col.windows { background: var(--plum); color: var(--plum-ink); }
.dl-col h3 { font-size: var(--step-head); font-weight: 800; font-stretch: 125%; text-transform: uppercase; line-height: 1; margin-bottom: 28px; }
.dl-col strong { overflow-wrap: anywhere; }
.dl-col { min-width: 0; }
.dl-col ol { margin: 32px 0 0; padding-left: 1.3em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.dl-col li { min-width: 0; }
.dl-col pre { margin: 12px 0 0; background: var(--bg); color: var(--ink); padding: 16px 18px; overflow-x: auto; line-height: 1.55; }
.dl-col :not(pre) > code { background: rgba(22, 17, 14, .18); padding: 1px 6px; }
.dl-note { margin-top: 28px; max-width: 54ch; }
.dl-mac { margin-top: 40px; max-width: 70ch; }

/* firing log: one type size, day headings sticky */
.changelog { padding: 120px var(--m) 110px; background: var(--bg); }
.changelog h2 { font-size: var(--step-head); font-weight: 800; font-stretch: 125%; line-height: 1; margin-bottom: 24px; }
.log-day { background: var(--bg); color: var(--accent); font-size: var(--step-lead); font-weight: 400; display: flex; justify-content: space-between; padding: 48px 0 14px; z-index: 1; }
.log { width: 100%; border-collapse: collapse; font-size: var(--step-body); }
.log td { padding: 0; height: 1.6em; vertical-align: top; }
.log td:nth-child(1) { width: 64%; padding-right: 24px; }
.log td:nth-child(2) { width: 22%; color: var(--muted); }
.log td:nth-child(3) { text-align: right; }
.log-more { margin-top: 56px; }
.log-more a { color: var(--accent); font-weight: 600; }

/* the band is the button */
.cta { display: block; position: relative; min-height: 44svh; background: var(--accent); color: var(--accent-ink); text-decoration: none; overflow: hidden; border-radius: 48px 48px 0 0; transition: background-color .12s, color .12s; }
.cta:hover, .cta:focus-visible { background: var(--bg); color: var(--accent); }
.cta-line { position: absolute; left: var(--m); top: 28px; max-width: min(34ch, calc(100% - 2 * var(--m) - 64px)); font-size: var(--step-body); font-weight: 500; }
.cta-arrow { position: absolute; right: var(--m); top: 24px; width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 4; transition: transform .2s var(--ease); }
.cta:hover .cta-arrow { transform: translate(4px, -4px); }
.cta-word { position: absolute; left: var(--m); bottom: 24px; font-size: var(--step-display); line-height: .8; white-space: nowrap; }

/* footer: inverted, the name at full width */
.foot { background: var(--paper); color: #16110e; min-height: 70svh; display: grid; grid-template-rows: auto 1fr auto auto; padding: 40px var(--m) 20px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--m); }
.foot-cols p { color: #5d5047; margin-bottom: 6px; max-width: 30ch; }
.foot-cols p.strong { color: #16110e; font-weight: 700; }
.foot-cols a { text-decoration: none; } .foot-cols a:hover { text-decoration: underline; }
.foot-mark { grid-row: 3; width: 100%; height: auto; }
.foot-mark text { font-family: "TikTok Sans", sans-serif; font-weight: 800; font-stretch: 150%; font-size: 112px; fill: var(--brick); }
.legal { grid-row: 4; font-size: var(--step-small); color: #5d5047; margin-top: 14px; }

/* tutorials */
.t-hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--m); padding: 64px var(--m) 96px; align-items: end; }
.t-hero h1 { grid-column: 1 / 9; font-size: min(var(--step-display), 5.6vw); line-height: .9; }
.t-hero h1 span { white-space: nowrap; display: block; }
.t-hero p { grid-column: 9 / 13; font-size: var(--step-lead); line-height: 1.35; }
.t-hero img { grid-column: 1 / 13; margin-top: 56px; width: 100%; }
.basics { padding: 40px var(--m) 160px; }
.basics h2, .tut-group h2 { font-size: var(--step-head); font-weight: 800; font-stretch: 125%; line-height: 1; margin-bottom: 48px; }
.basics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px var(--m); }
.basics-grid h3 { font-size: var(--step-lead); font-weight: 800; margin-bottom: 10px; }
.t-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--m); padding: 0 var(--m) 160px; }
.toc { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100svh - 32px); overflow: auto; }
.toc-group { color: var(--muted); margin-top: 18px; font-size: var(--step-small); }
.toc a { text-decoration: none; padding: 3px 0; } .toc a:hover { color: var(--accent); }
.tut-group { margin-bottom: 120px; }
.tut { margin-bottom: 56px; scroll-margin-top: 16px; }
.tut-band { background: var(--glaze); color: var(--glaze-ink); padding: 26px 28px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: end; }
.tut-band h3 { font-size: var(--step-head); font-weight: 800; font-stretch: 150%; text-transform: uppercase; line-height: .95; }
.tut-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; background: var(--surface); padding: 28px; }
.tut-body.nopic { grid-template-columns: 1fr; }
.tut-body img { width: 100%; align-self: start; }
.tut-steps { margin: 0; padding-left: 1.1em; display: grid; gap: 10px; }

/* the kiln door opens as the page arrives (no scroll effects) */
.js .shutter { clip-path: inset(100% 0 0 0); transition: clip-path 1s var(--ease); }
.js .shutter img { scale: 1.1; transition: scale 1s var(--ease); }
.js .shutter.in { clip-path: inset(0 0 0 0); }
.js .shutter.in img { scale: 1; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* why: four statements, one band */
.why { padding: 0; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.why-item { padding: 40px var(--m) 44px; min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.why-item h3 { font-size: clamp(1.375rem, 1.9vw, 2.125rem); font-weight: 800; font-stretch: 125%; text-transform: uppercase; line-height: .95; }
.why-item p { max-width: 34ch; }
/* how it fires: five moves in a row, dark brick to light */
.moves { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.move { background: var(--brick); color: var(--brick-ink); padding: 20px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.move:nth-child(2) { background: var(--teal); color: var(--teal-ink); } .move:nth-child(3) { background: var(--ochre); color: var(--ochre-ink); } .move:nth-child(4) { background: var(--plum); color: var(--plum-ink); } .move:nth-child(5) { background: var(--cedar); color: var(--ink); }
.move img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.move h3 { font-size: var(--step-lead); font-weight: 800; font-stretch: 125%; text-transform: uppercase; }
/* older releases fold away */
.older summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 40px; font-size: var(--step-lead); }
.older summary:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .shutter { clip-path: none; transition: none; }
  .js .shutter img { scale: 1; }
  .hero-arch img { animation: none; }
  .btn, .brick { transition: none; }
}

@media (max-width: 1000px) { .dl-cols { grid-template-columns: 1fr; } }

@media (max-width: 1100px) { .why-grid { grid-template-columns: 1fr 1fr; } .moves { grid-template-columns: 1fr 1fr 1fr; } }

/* phone */
@media (max-width: 760px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { grid-template-rows: 78fr 22fr; }
  .hero h1 { font-size: 10.5vw; top: 14%; }
  .hero-arch { left: auto; right: -8vw; width: 50vw; bottom: calc(22% - 14vw); }
  .hero-band { flex-direction: column; align-items: stretch; justify-content: center; gap: 14px; padding: 18px var(--m); }
  .hero-band .btn { width: 100%; }
  .show { grid-template-columns: 1fr; padding-top: 72px; min-height: 86svh; }
  .show-copy, .show-pic { grid-column: 1; } .show-pic { margin-top: 32px; width: 78%; }
  .switch { right: var(--m); left: var(--m); bottom: 4svh; font-size: 1rem; justify-content: space-between; } .switch button { flex: 1; padding: .7em .6em; }
  .wall { padding: 110px var(--m) 100px; }
  .wall-head, .wall-grid, .how-intro, .dl-head, .t-hero { grid-template-columns: 1fr; }
  .wall-head > *, .bricks, .peek, .how-intro > *, .dl-head > *, .t-hero > * { grid-column: 1 !important; }
  .peek { position: static; order: -1; }
  .course { grid-template-columns: 1fr; } .course:nth-child(even) .course-bricks { padding-left: 0; }
  .course-bricks { grid-template-columns: 1fr 1fr; }
  .field { min-height: 64svh; grid-template-columns: 1fr; }
  .f-text, .field.mirror .f-text { grid-column: 1; max-width: none; text-align: left; justify-self: stretch; }
  .show-pic { width: 100%; margin-bottom: 96px; }
  .f-phrase { font-size: 9.5vw; max-width: none; } .field.mirror .f-phrase { justify-self: start; text-align: left; }
  .why-grid, .moves { grid-template-columns: 1fr; } .why-item, .move { min-height: 0; }
  .stage { flex: none !important; }
  .stage-tab { position: static; writing-mode: horizontal-tb; transform: none; height: 64px; font-size: 18px; padding: 0 20px; align-items: center; }
  .stage-body { grid-template-columns: 1fr; padding: 24px 20px; } .stage-body img { grid-column: 1; grid-row: auto; height: auto; }
  .dl-cols { grid-template-columns: 1fr; }
  .log td:nth-child(2) { display: none; } .log td:nth-child(1) { width: auto; }
  .log { font-size: 18px; }
  .cta { min-height: 36svh; } .cta-word { font-size: 15vw; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 32px var(--m); }
  .basics-grid { grid-template-columns: 1fr; gap: 36px; }
  .t-hero h1 { font-size: 11vw; }
  .t-layout { grid-template-columns: 1fr; } .toc { display: none; }
  .tut-band, .tut-body { grid-template-columns: 1fr; }
}
