/* L. Keyes practice site.
   Layout concept: the page is a piano, dressed in the books' own type. Ebony door-grain bands (the cover
   of The Last Lock) for the case, white key bands for reading, a walnut keyboard case with a red felt
   strip, and the 41 days of the course as a keyboard you press to jump to that day's pieces.
   Type: Cinzel (the cover titles), Libre Baskerville (the story text), Lato (the lessons). */
@font-face { font-family: "Cinzel"; font-weight: 400; font-display: swap; src: url("fonts/cinzel-400.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url("fonts/cinzel-600.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url("fonts/cinzel-700.woff2") format("woff2"); }
@font-face { font-family: "Libre Baskerville"; font-weight: 400; font-display: swap; src: url("fonts/librebaskerville-400.woff2") format("woff2"); }
@font-face { font-family: "Libre Baskerville"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/librebaskerville-400i.woff2") format("woff2"); }
@font-face { font-family: "Libre Baskerville"; font-weight: 700; font-display: swap; src: url("fonts/librebaskerville-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-display: swap; src: url("fonts/lato-900.woff2") format("woff2"); }

:root {
  --black: #0f0e0d;                         /* piano lacquer */
  --panel: rgba(10, 4, 2, .38);       /* a raised panel on the black wood */
  --panel-2: rgba(10, 4, 2, .55);
  --line-dark: rgba(255, 230, 190, .16);
  --white: #faf8f3;                         /* white key */
  --line: #d9d2c6;
  --ink: #141210;
  --muted: #6b635b;
  --muted-dark: #b6ada3;
  --felt: #9b1f28;                          /* the red felt strip above the keys: the only red on the page */
  --brass: #d2ae66;                         /* polished brass, like piano pedals and the cover's keyhole */
  --brass-deep: #9a7432;
  --brass-ink: #7d5c22;                     /* brass dark enough to read on white */
  --wood: #3a1c10;
  --rh: #f08a24;                            /* right hand, as in the videos (legend only) */
  --lh: #2e86de;                            /* left hand */
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Libre Baskerville", Baskerville, Georgia, serif;
  --ui: "Lato", "Helvetica Neue", Arial, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white) url("tex/paper.jpg"); color: var(--ink); font: 400 17px/1.75 var(--serif); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.band-ebony { background: var(--wood) url("tex/wood-dark.jpg") center top / 2048px auto; color: var(--white); }
.band-ivory { background: var(--white) url("tex/paper.jpg"); }
.band-wood { background: #6b3418 url("tex/wood-case.jpg") center / 2048px auto; color: var(--white); }

.label { font: 700 12px/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.label::after { content: ""; flex: 0 1 72px; height: 1px; background: currentColor; opacity: .55; }
.label .red { color: var(--brass); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
h2 { font-weight: 700; font-size: clamp(28px, 4vw, 46px); line-height: 1.12; letter-spacing: .02em; }
h3 { font-weight: 700; font-size: 21px; line-height: 1.25; letter-spacing: .03em; }
p { margin: 0; max-width: 62ch; }
.italic { font-style: italic; }

/* ---------- top bar ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--wood) url("tex/wood-dark.jpg") center top / 2048px auto; color: var(--white);
  border-bottom: 1px solid var(--brass-deep); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--black); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.mark { font: 700 19px/1 var(--display); letter-spacing: .2em; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.mark i { display: inline-flex; gap: 2px; }
.mark i b { width: 7px; height: 18px; background: var(--white); border-radius: 0 0 2px 2px; }
.mark i b:nth-child(2) { background: var(--brass); }
.top nav { display: flex; gap: 22px; font: 700 13px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.top nav a { text-decoration: none; color: var(--muted-dark); }
.top nav a:hover { color: var(--white); }

/* ---------- hero ---------- */
.hero .wrap { padding-block: clamp(48px, 8vw, 96px) 0; display: grid; gap: 26px; }
.hero .wrap > * { min-width: 0; }
.hero .label { color: var(--muted-dark); }
.hero h1 { font-weight: 700; font-size: clamp(34px, 5.6vw, 72px); line-height: 1.06; letter-spacing: .02em; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--brass); }
.hero .lede { font-size: clamp(17px, 1.5vw, 19px); font-style: italic; color: var(--muted-dark); max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 2px; border: 1px solid transparent;
  font: 700 13px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.btn:active { transform: translateY(2px); }
.btn-red { background: linear-gradient(#e2c27e, var(--brass) 45%, #b8914b); color: #1c120a; border-color: #8a672b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.18); }
.btn-red:hover { background: linear-gradient(#ead08f, #dab872 45%, #c29b52); }
.btn-ghost { border-color: rgba(250,248,243,.45); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--white); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #2a2622; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: rgba(0,0,0,.04); }
.btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }

/* ---------- the 41-day keyboard, in a walnut case ---------- */
.course { margin-top: clamp(36px, 6vw, 60px); }
.course-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.course-head .label { color: var(--muted-dark); white-space: nowrap; }
.course-readout { font: 400 15px/1.4 var(--serif); font-style: italic; color: var(--white); min-height: 1.4em; }
.course-readout b { font: 700 16px/1 var(--display); font-style: normal; letter-spacing: .06em; color: var(--brass); margin-right: 10px; }
.case { background: #6b3418 url("tex/wood-case.jpg") center / 2048px auto; padding: 14px 14px 0; border-radius: 4px 4px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 40px -20px rgba(0,0,0,.8); }
.keys-scroll { overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.keys { position: relative; display: grid; grid-template-columns: repeat(41, minmax(0, 1fr)); min-width: 0; height: 200px;
  background: #0a0908; padding: 0 2px; border-top: 7px solid var(--felt); box-shadow: inset 0 6px 8px -4px rgba(0,0,0,.9); }
@media (max-width: 1000px) { .keys { min-width: 1000px; height: 176px; } }
.wkey { position: relative; margin: 0 1px; border: 0; border-radius: 0 0 4px 4px; background: linear-gradient(#e9e4da, var(--white) 12%, var(--white) 93%, #e2dbcf);
  color: var(--muted); font: 700 11px/1 var(--ui); cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0 0 12px; transition: transform .08s ease, background .12s ease; }
.wkey:hover { background: linear-gradient(#e2dccf, #fff 12%); }
.wkey .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass-deep); margin-bottom: 10px; }
.wkey.on { background: linear-gradient(#a8833f, var(--brass) 14%, #e0c07c 92%, #b8914b); color: #1c120a; transform: translateY(3px); }
.wkey.on .dot { background: #1c120a; }
.wkey.edge { color: var(--ink); }
.bkey { position: absolute; top: 0; width: calc((100% - 4px) / 41 * .58); height: 60%; background: linear-gradient(#24211e, #090807 86%, #3b3733 87%, #171513);
  border-radius: 0 0 3px 3px; transform: translateX(-50%); pointer-events: none; box-shadow: 1px 2px 3px rgba(0,0,0,.5); }
.course-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px 26px; color: var(--muted-dark); font: 400 14px/1.5 var(--ui); }
.course-foot span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); margin-right: 8px; vertical-align: 1px; }

/* ---------- books ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head > * { min-width: 0; }
.section-head .label { color: var(--brass-ink); }
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: clamp(20px, 3vw, 36px); }
/* the book's own boxed panels: a rule with a second rule just inside it */
.book { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 26px; align-items: start; padding: 28px; background: #fffdf9;
  border: 1px solid var(--ink); outline: 1px solid var(--line); outline-offset: -6px; }
.book img { width: 100%; height: auto; aspect-ratio: 5 / 8; object-fit: contain; box-shadow: 0 1px 0 rgba(0,0,0,.1), 0 16px 26px -14px rgba(20,16,12,.6); }
.book-body { display: grid; gap: 12px; min-width: 0; }
.book .kind { font: 700 12px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-ink); }
.book p { font-size: 15.5px; color: #3a352f; }
.price { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.price b { font: 700 32px/1 var(--serif); }
.price span { color: var(--muted); font: 400 14px/1.3 var(--ui); }
.buy { display: flex; flex-wrap: wrap; gap: 10px; }
.buy .btn { min-height: 44px; padding: 0 18px; font-size: 12px; }
.formats { font: 400 14px/1.6 var(--ui); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.formats a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.formats .soon { color: var(--muted); }
@media (max-width: 560px) { .book { grid-template-columns: 1fr; } .book img { max-width: 200px; } }

/* ---------- practice room ---------- */
.room .section-head .label { color: var(--brass); }
.room .section-head p:not(.label) { color: var(--muted-dark); font-style: italic; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); margin-bottom: 36px; }
.fact { padding: 22px 20px 22px 0; display: grid; gap: 8px; }
.fact b { font: 700 34px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--white); }
.fact:nth-child(odd) b { color: var(--brass); }
.fact span { color: var(--muted-dark); font: 400 14px/1.4 var(--ui); }

.lock { display: grid; grid-template-columns: auto 1fr minmax(0, 400px); gap: clamp(20px, 3vw, 44px); align-items: center; padding: clamp(22px, 4vw, 40px);
  background: var(--panel); border: 1px solid var(--line-dark); outline: 1px solid rgba(255,255,255,.06); outline-offset: -7px; margin-bottom: 44px; }
.lock > * { min-width: 0; }
.keyhole { width: 54px; height: 80px; }
@media (max-width: 860px) { .lock { grid-template-columns: minmax(0, 1fr); } .keyhole { display: none; } }
.lock h3 { font-size: clamp(20px, 2.2vw, 26px); margin-bottom: 10px; }
.lock p { color: var(--muted-dark); font-size: 15.5px; }
.lock form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lock label { font: 700 12px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted-dark); }
.lock .row { display: flex; gap: 10px; }
.lock input { flex: 1; min-width: 0; width: 100%; min-height: 52px; padding: 0 16px; border-radius: 2px; border: 1px solid var(--line-dark); background: rgba(0,0,0,.45);
  color: var(--white); font: 700 19px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; }
.lock input:focus { border-color: var(--brass); outline: none; }
.lock .btn { padding: 0 18px; }
.lock .msg { min-height: 1.4em; font: 400 14px/1.4 var(--ui); color: var(--muted-dark); }
.lock .msg.bad { color: #ff9b8f; }

/* player */
#stage { scroll-margin-top: 80px; }
.stage { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 26px; margin-bottom: 44px; }
.stage > * { min-width: 0; }
@media (max-width: 900px) { .stage { grid-template-columns: 1fr; } }
.screen { background: #000; border: 1px solid var(--line-dark); box-shadow: 0 24px 50px -24px rgba(0,0,0,.9); }
.screen video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }
.now { display: grid; gap: 16px; align-content: start; }
.now .label { color: var(--brass); }
.now h3 { font-size: clamp(20px, 2.1vw, 26px); }
.versions { display: flex; flex-wrap: wrap; gap: 8px; }
.ver { min-height: 40px; padding: 0 14px; border-radius: 2px; border: 1px solid var(--line-dark); background: transparent; color: var(--white);
  font: 700 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.ver:hover { border-color: var(--muted-dark); }
.ver[aria-pressed="true"] { background: var(--white); color: var(--black); border-color: var(--white); }
.ver .hand { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.now audio { width: 100%; }
.tools { display: flex; flex-wrap: wrap; gap: 14px 20px; font: 400 14px/1.4 var(--ui); color: var(--muted-dark); align-items: center; }
.tools a { color: var(--white); font-weight: 700; text-underline-offset: 3px; }
.tools label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.tools input { accent-color: var(--brass); width: 18px; height: 18px; }

.shelf { display: grid; gap: 36px; }
.group { display: grid; grid-template-columns: 180px 1fr; gap: 20px; scroll-margin-top: 90px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
@media (max-width: 700px) { .group { grid-template-columns: 1fr; gap: 12px; } }
.group-head { display: grid; gap: 6px; align-content: start; }
.group-head b { font: 700 21px/1.1 var(--display); letter-spacing: .04em; }
.group-head span { color: var(--muted-dark); font: italic 400 14px/1.4 var(--serif); }
.group.hl .group-head b { color: var(--brass); }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.piece { display: grid; grid-template-rows: auto 1fr; text-align: left; border: 1px solid var(--line-dark); background: var(--panel); color: var(--white);
  overflow: hidden; cursor: pointer; padding: 0; font: inherit; transition: border-color .12s ease, transform .12s ease, background .12s ease; }
.piece:hover { border-color: var(--muted-dark); background: var(--panel-2); transform: translateY(-2px); }
.piece[aria-current="true"] { border-color: var(--brass); box-shadow: inset 0 -3px 0 var(--brass-deep); }
.piece img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.piece .meta { display: grid; gap: 4px; padding: 12px 14px 14px; }
.piece .num { font: 700 11px/1 var(--ui); letter-spacing: .18em; color: var(--brass); font-variant-numeric: tabular-nums; }
.piece .t { font: 700 15px/1.3 var(--serif); }
.piece .v { font: 400 13px/1.3 var(--ui); color: var(--muted-dark); }
.locked .piece { cursor: default; }
.locked .piece:hover { transform: none; border-color: var(--line-dark); background: var(--panel); }
.locked .piece .thumb { display: none; }
.locked .piece .v::before { content: ""; display: inline-block; width: 8px; height: 10px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--muted-dark); border-radius: 4px 4px 1px 1px; }

/* how to practise: on the walnut */
.band-wood .section-head .label { color: #f1d9a8; }
.band-wood h2 { color: var(--white); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.step { padding: 22px; display: grid; gap: 10px; align-content: start; background: rgba(20, 9, 4, .5); border: 1px solid rgba(255, 225, 170, .2); }
.step b { font: 700 16px/1 var(--display); letter-spacing: .14em; color: var(--white); }
.step b::before { content: ""; display: block; width: 26px; height: 3px; background: var(--brass); margin-bottom: 14px; }
.step p { font-size: 15px; color: #efe5da; }

footer { padding-block: 36px; font: 400 14px/1.5 var(--ui); color: var(--muted-dark); border-top: 1px solid var(--brass-deep); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.mark, .top nav a { white-space: nowrap; }
@media (max-width: 480px) {
  .mark { font-size: 15px; letter-spacing: .14em; gap: 9px; }
  .top nav { gap: 14px; font-size: 11px; letter-spacing: .1em; }
}
