/* 10keyz — site styles. Plain CSS, no build step. */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #2a2826;
  --muted: #5e5952;
  --line: #e6e0d4;
  --todo-bg: #fff2a8;
  --todo-text: #4a3f00;

  /* SpiceMap's 12-colour pitch-class palette (shared/theory.js, PAL).
     Index = semitones above the root. 0 (white) and 7 (grey) are never
     used as accents; the colour band at the top uses pc1 to pc11. */
  --pc0: #FFFFFF;
  --pc1: #F51D2C;
  --pc2: #377EB8;
  --pc3: #BF5B17;
  --pc4: #FF7F00;
  --pc5: #4DAF4A;
  --pc6: #8A0303;
  --pc7: #a0a0a0;
  --pc8: #006906;
  --pc9: #F781BF;
  --pc10: #E9C81C;
  --pc11: #AB4EF3;

  /* Accents per section. Only used for markers and underlines
     (non-text, >= 3:1 on --bg). */
  --c-lessons: var(--pc2);
  --c-live: var(--pc3);
  --c-apps: var(--pc11);
  --c-about: var(--pc1);
  --c-misc: var(--pc8);

  /* Text-safe accent (9.4:1 on --bg). */
  --link-hover: var(--pc6);

  /* Rounded system font where available (Safari/macOS/iOS), else the normal one. */
  --sans: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1c1a;
    --surface: #262422;
    --text: #ece8e1;
    --muted: #b3ada3;
    --line: #3a3733;
    --todo-bg: #5a4d00;
    --todo-text: #fff2a8;
    --link-hover: #ff8a8a;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Colour band at the top: SpiceMap's interval colours (pc1 to pc11; white
   is left out, it glares in dark mode) as slanted planes, repeating across
   the full width. One tile is 11 planes of 84px with a 6px gap, slanted by
   22px; each plane is drawn twice (at x and x - 924) so the tile repeats
   seamlessly. Decoration only (aria-hidden). */
.strip {
  height: 40px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='924' height='40' viewBox='0 0 924 40'><polygon points='22,0 100,0 78,40 0,40' fill='%23F51D2C'/><polygon points='-902,0 -824,0 -846,40 -924,40' fill='%23F51D2C'/><polygon points='106,0 184,0 162,40 84,40' fill='%23377EB8'/><polygon points='-818,0 -740,0 -762,40 -840,40' fill='%23377EB8'/><polygon points='190,0 268,0 246,40 168,40' fill='%23BF5B17'/><polygon points='-734,0 -656,0 -678,40 -756,40' fill='%23BF5B17'/><polygon points='274,0 352,0 330,40 252,40' fill='%23FF7F00'/><polygon points='-650,0 -572,0 -594,40 -672,40' fill='%23FF7F00'/><polygon points='358,0 436,0 414,40 336,40' fill='%234DAF4A'/><polygon points='-566,0 -488,0 -510,40 -588,40' fill='%234DAF4A'/><polygon points='442,0 520,0 498,40 420,40' fill='%238A0303'/><polygon points='-482,0 -404,0 -426,40 -504,40' fill='%238A0303'/><polygon points='526,0 604,0 582,40 504,40' fill='%23a0a0a0'/><polygon points='-398,0 -320,0 -342,40 -420,40' fill='%23a0a0a0'/><polygon points='610,0 688,0 666,40 588,40' fill='%23006906'/><polygon points='-314,0 -236,0 -258,40 -336,40' fill='%23006906'/><polygon points='694,0 772,0 750,40 672,40' fill='%23F781BF'/><polygon points='-230,0 -152,0 -174,40 -252,40' fill='%23F781BF'/><polygon points='778,0 856,0 834,40 756,40' fill='%23E9C81C'/><polygon points='-146,0 -68,0 -90,40 -168,40' fill='%23E9C81C'/><polygon points='862,0 940,0 918,40 840,40' fill='%23AB4EF3'/><polygon points='-62,0 16,0 -6,40 -84,40' fill='%23AB4EF3'/></svg>") left top / auto 100% repeat-x;
}
@media (max-width: 40rem) {
  .strip { height: 30px; }
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1.25rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.brand {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand .k { color: var(--pc2); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  padding: .3rem .75rem;
  border-radius: 99px;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }

/* Current page in the nav (a pill tinted with the section colour),
   without changing the shared snippet. */
.p-lessons .n-lessons,
.p-live .n-live,
.p-apps .n-apps,
.p-about .n-about,
.p-contact .n-contact {
  color: var(--text);
  background: color-mix(in srgb, var(--accent, var(--c-misc)) 16%, transparent);
}

.lang {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
}
.lang a { color: var(--muted); }
.lang [aria-current] { color: var(--text); font-weight: 600; text-decoration: none; }

/* Main */

main { padding: 2rem 0 4rem; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 800; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 .4rem; }

h2::before {
  content: "";
  display: inline-block;
  width: .7em;
  height: .7em;
  margin-right: .5em;
  border-radius: 50%;
  background: var(--accent, var(--c-misc));
  vertical-align: .08em;
}

.p-lessons { --accent: var(--c-lessons); }
.p-live    { --accent: var(--c-live); }
.p-apps    { --accent: var(--c-apps); }
.p-about   { --accent: var(--c-about); }

.lead { font-size: 1.2rem; color: var(--muted); margin-top: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent, var(--c-misc));
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}
a:hover { color: var(--link-hover); }

ul.plain { padding-left: 1.2rem; }
ul.plain li { margin: .25rem 0; }

/* Home: three activity blocks */

.blocks {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .blocks { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
}
.block a {
  display: block;
  height: 100%;
  padding: 1.25rem 1.25rem 1.4rem;
  background: color-mix(in srgb, var(--c) 11%, var(--surface));
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
}
.block a:hover { background: color-mix(in srgb, var(--c) 20%, var(--surface)); color: var(--text); }
.block h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.block h2::before { display: none; }
.block p { margin: 0; color: var(--muted); font-size: .97rem; }
.block-lessons { --c: var(--c-lessons); }
.block-live    { --c: var(--c-live); }
.block-apps    { --c: var(--c-apps); }

/* Cards / lists of short items */

.cards {
  display: grid;
  gap: .75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
}
@media (min-width: 40rem) {
  .cards-2 { grid-template-columns: repeat(2, 1fr); }
}
.cards li {
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--accent, var(--c-misc)) 9%, var(--surface));
  border-radius: 18px;
}
.cards strong { display: block; font-size: 1.05rem; }
.cards span { color: var(--muted); font-size: .95rem; }

/* Four connected pillars (Lessons: how I teach). A 2x2 grid with a
   hub in the middle whose quarters match the dots of the four blocks. */

.pillars { position: relative; margin: 1.25rem 0 .5rem; }
.pillars ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr; /* equal rows, so the hub sits exactly on the crossing */
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pillars li {
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--dot) 11%, var(--surface));
  border-radius: 18px;
  font-size: .95rem;
  color: var(--muted);
}
/* Keep text clear of the hub. */
.pillars li:nth-child(odd)  { padding-right: 1.6rem; }
.pillars li:nth-child(even) { padding-left: 1.6rem; }
.pillars li:nth-child(-n+2) { padding-bottom: 1.5rem; }
.pillars li:nth-child(n+3)  { padding-top: 1.5rem; }
.pillars strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: .2rem; }
.pillars strong::before {
  content: "";
  display: inline-block;
  width: .6em;
  height: .6em;
  margin-right: .45em;
  border-radius: 50%;
  background: var(--dot);
}
.pillars li:nth-child(1) { --dot: var(--pc1); }
.pillars li:nth-child(2) { --dot: var(--pc2); }
.pillars li:nth-child(3) { --dot: var(--pc5); }
.pillars li:nth-child(4) { --dot: var(--pc11); }
.pillars-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 2.8rem;
  height: 2.8rem;
  padding: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bg);
}
/* Four separate quarters, so neighbouring colours of similar lightness
   stay distinct. Same order as the blocks. */
.pillars-hub i:nth-child(1) { background: var(--pc1);  border-top-left-radius: 100%; }
.pillars-hub i:nth-child(2) { background: var(--pc2);  border-top-right-radius: 100%; }
.pillars-hub i:nth-child(3) { background: var(--pc5);  border-bottom-left-radius: 100%; }
.pillars-hub i:nth-child(4) { background: var(--pc11); border-bottom-right-radius: 100%; }
.pillars-note { color: var(--muted); font-size: .95rem; }

/* Quotes */

.quote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent, var(--c-misc)) 7%, var(--surface));
}
.quote blockquote {
  margin: 0;
  font-size: 1.05rem;
}
.quote figcaption { margin-top: .5rem; color: var(--muted); font-size: .9rem; }
.quote details { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.quote summary { cursor: pointer; }

/* Placeholders */

.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  padding: .05em .35em;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  font-style: normal;
}
.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 10rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}
.photo-placeholder { aspect-ratio: 4 / 5; max-width: 16rem; min-height: 0; }

/* Buttons (store badges etc.) */

.buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }
.button {
  display: inline-block;
  padding: .65rem 1.1rem;
  border: 1px solid var(--text);
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.button.primary { background: var(--text); color: var(--bg); }
.button.primary:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; }
.button.disabled { border-style: dashed; color: var(--muted); border-color: var(--muted); font-weight: 400; }

/* FAQ */

.faq dt { font-weight: 600; margin-top: 1.25rem; }
.faq dd { margin: .25rem 0 0; }

/* Business details */

.details { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.site-footer .details { font-size: .85rem; }
.footer-legal a { color: var(--text); }
.footer-legal { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); }

.updated { color: var(--muted); font-size: .9rem; }
