:root {
  --ink: #1c1c1c;
  --paper: #f7f6f1;
  --yellow: #f0c400;
  --muted: #5e5a53;
  --soft: #d9d4c8;
  --lede: #2c2a26;
  --line: rgba(28, 28, 28, 0.14);
  --nav-bg: rgba(247, 246, 241, 0.94);
  --plate: #fffdf8;
  --band: #1c1c1c;
  --on-band: #f7f6f1;
  --max: 1120px;
  --nav: 78px;
}

/* Morning */
html[data-part="morning"] {
  --ink: #2a2118;
  --paper: #f4efe4;
  --yellow: #d4922a;
  --muted: #6e6256;
  --soft: #e4d3bc;
  --lede: #3d3328;
  --line: rgba(42, 33, 24, 0.14);
  --nav-bg: rgba(244, 239, 228, 0.94);
  --plate: #fff9f1;
  --band: #2a2118;
  --on-band: #f4efe4;
}

/* Evening, from kaizen-logo-dark.png */
html[data-part="evening"] {
  --ink: #ffffff;
  --paper: #0e0e0e;
  --yellow: #f0c400;
  --muted: #b0b0b0;
  --soft: #d9d4c8;
  --lede: #d0d0d0;
  --line: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(14, 14, 14, 0.94);
  --plate: #171717;
  --band: #141414;
  --on-band: #ffffff;
}

/* Night */
html[data-part="night"] {
  --ink: #e7e4dc;
  --paper: #07080d;
  --yellow: #c6a15a;
  --muted: #8e96a3;
  --soft: #c5c0b4;
  --lede: #c9c3b6;
  --line: rgba(231, 228, 220, 0.16);
  --nav-bg: rgba(7, 8, 13, 0.94);
  --plate: #10131a;
  --band: #10131a;
  --on-band: #e7e4dc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Avenir Next", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--yellow);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--nav);
  padding: 14px 32px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand svg { width: 44px; height: auto; color: var(--yellow); }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name small {
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-name strong { font-size: 18px; font-weight: 750; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 650; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.frame {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: end;
  padding: 72px 0 28px;
}
.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}
h1 {
  margin: 0;
  font-size: clamp(56px, 6.4vw, 88px);
  line-height: 0.92;
  max-width: 8ch;
}
.lede {
  margin: 28px 0 0;
  max-width: 36rem;
  font-size: 19px;
  color: var(--lede);
}

.plate {
  border: 1px solid var(--ink);
  background: var(--plate);
  border-top: 7px solid var(--yellow);
  padding: 22px 22px 8px;
}
.plate-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.plate ol { list-style: none; margin: 0; padding: 0; }
.plate li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.plate li span {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 18px;
}
.plate strong { display: block; font-size: 17px; }
.plate p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.work { padding: 36px 0 20px; }
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}
.kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-row {
  display: grid;
  grid-template-columns: 72px 1.3fr 1.4fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.work-row:last-child { border-bottom: 1px solid var(--line); }
.work-row .num {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 22px;
}
.work-row .name {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.work-row .about { color: var(--muted); }
.work-row .go {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
a.work-row:hover .name { background-image: linear-gradient(var(--yellow), var(--yellow)); background-size: 100% 0.35em; background-repeat: no-repeat; background-position: 0 88%; }
.work-row.quiet { color: var(--ink); }

.practice { padding: 88px 0; }
.practice-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}
h2 {
  margin: 14px 0 0;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.02;
  max-width: 12ch;
}
.rule { width: 72px; height: 7px; background: var(--yellow); margin: 22px 0 0; }
.prose { max-width: 40rem; font-size: 19px; }
.prose p { margin: 0 0 16px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.measures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 8px;
}
.measures article {
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}
.measures b {
  display: block;
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 8px;
}
.measures p { margin: 0; color: var(--muted); font-size: 15px; }

.contact {
  background: var(--band);
  color: var(--on-band);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 72px 0;
}
.contact .kicker { color: var(--yellow); }
.contact h2 { max-width: 9em; }
.invite {
  max-width: 28rem;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 18px;
}
.contact a { display: block; margin-top: 8px; text-decoration: none; font-size: 18px; }
.contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact .who {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 28px;
  margin-top: 18px;
}
.contact .role { color: var(--soft); margin: 4px 0 0; }
.contact .team { color: var(--yellow); font-weight: 750; margin-top: 22px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px 28px;
  font-size: 13px;
  background: var(--band);
  color: var(--soft);
}

.page-hero { padding: 64px 0 12px; }
.page-hero h1 { max-width: 14ch; font-size: clamp(48px, 5.5vw, 76px); }
.back {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.back:hover { text-decoration: underline; text-underline-offset: 3px; }

.section { padding: 28px 0 72px; }
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.facts { border-top: 1px solid var(--line); }
.facts article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts strong { display: block; }
.facts p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.figures div { background: var(--band); color: var(--on-band); padding: 16px; min-height: 132px; }
.figures b {
  display: block;
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 400;
  font-size: 32px;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 8px;
}
.figures p { margin: 0; font-size: 14px; color: var(--soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 28px; }
.steps div { border-top: 1px solid var(--line); padding-top: 12px; }
.steps b {
  display: block;
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 400;
  font-size: 28px;
  margin-bottom: 6px;
}
.steps p { margin: 0; color: var(--muted); }
.board-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.board-row:last-child { border-bottom: 1px solid var(--line); }
.board-row span { color: var(--muted); }

@media (max-width: 860px) {
  .hero, .practice-grid, .contact-grid, .split, .steps, .work-row {
    grid-template-columns: 1fr;
  }
  .frame { width: min(var(--max), calc(100% - 36px)); }
  .nav { padding: 12px 16px; flex-wrap: wrap; }
  h1 { max-width: none; }
  .work-row .go { margin-top: 4px; }
  .footer { padding: 18px 16px 28px; flex-direction: column; }
  .board-row { grid-template-columns: 1fr; gap: 2px; }
}

html[dir="rtl"] body { text-align: start; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
