/* lessons.denilemusic.com. Cobra era tokens, two families, corners 0 to 2px, nothing is ever a pill.
   The CSP allows no inline style, so every rule lives here; app.js only toggles attributes. */

@font-face {
  font-family: 'Bodoni Moda Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/assets/fonts/bodoni-moda-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Martian Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/assets/fonts/martian-mono-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark;

  /* Cobra era palette */
  --black: #070708;
  --bone: #ece7df;
  --bone-dim: rgb(236 231 223 / 0.68);
  --line: rgb(236 231 223 / 0.12);
  /* Control borders: 3.5:1 on black, above the 3:1 non-text floor. */
  --line-strong: rgb(236 231 223 / 0.45);
  --jade: #246b64;
  --jade-deep: #1c5650;
  --gold: #caa466;
  /* Ink is for gradients and overlays only, never a flat fill. */
  --ink: #0d3d3d;
  --danger: #e58068;

  /* Display for H1, H2 and prices; mono for everything else. */
  --font-display: 'Bodoni Moda Variable', 'Bodoni 72', Didot, 'Times New Roman', serif;
  --font-mono: 'Martian Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(16px, 5vw, 64px);
  /* Full-width bars line up with the 72rem section column on wide screens.
     The 100% resolves where the token is used, against the viewport-wide box. */
  --edge: calc(var(--gutter) + max(0px, (100% - 2 * var(--gutter) - 72rem) / 2));
  --radius: 2px;
  --hit: 44px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --dur: 200ms;
}

/* Base */

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

[hidden] {
  display: none !important;
}

html {
  background: var(--black);
  color: var(--bone);
  font-family: var(--font-mono);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  font-size: 0.875rem;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--bone);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Gold ring, 2px off the edge. A plain outline, so WebKit draws it on every control. */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: var(--jade);
  color: var(--bone);
}

.skip {
  position: absolute;
  top: 0.5rem;
  left: var(--edge);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding: 0 1rem;
  background: var(--bone);
  color: var(--black);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus,
.skip:focus-visible {
  transform: none;
}

/* Type */

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.4rem + 5vw, 5rem);
  line-height: 1;
}

h2 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.5rem);
  line-height: 1.05;
}

h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.dim {
  color: var(--bone-dim);
}

.small {
  font-size: 0.75rem;
}

/* Controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--jade);
  border-radius: var(--radius);
  background: var(--jade);
  color: var(--bone);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--dur) var(--ease);
}

.btn:hover {
  background: var(--jade-deep);
  border-color: var(--jade-deep);
  color: var(--bone);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn.quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--bone);
}

.btn.quiet:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn.danger:hover {
  background: rgb(229 128 104 / 0.12);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: underline;
  cursor: pointer;
}

.link:hover {
  color: var(--bone);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

/* Header */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem var(--edge);
}

.top.plain {
  position: static;
  border-bottom: 1px solid var(--line);
}

.top__logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
}

.top__logo img {
  width: 76px;
}

.top ul {
  display: flex;
}

.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding: 0 0.55rem;
  color: var(--bone);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.top nav li:last-child a {
  padding-right: 0;
}

.top nav a:hover {
  color: var(--gold);
}

/* Hero: on a phone the pond sits on top and the words follow; from 960px the words take the left
   and the pond the right, cropped around the cobra. */

.hero {
  position: relative;
}

.hero__art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 72vh;
  overflow: hidden;
}

.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 45%;
}

.hero__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(7 7 8 / 0.6) 0, rgb(7 7 8 / 0) 24%),
    linear-gradient(0deg, var(--black) 0, rgb(7 7 8 / 0.55) 24%, rgb(13 61 61 / 0) 60%);
}

.hero__copy {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  margin-top: -2rem;
  padding: 0 var(--gutter) clamp(3.5rem, 9vw, 6rem);
}

.hero__sub {
  max-width: 46ch;
  color: var(--bone-dim);
}

.hero__note {
  font-size: 0.75rem;
  color: var(--bone-dim);
}

@media (min-width: 960px) {
  .hero {
    display: grid;
    align-items: end;
    min-height: min(100vh, 980px);
  }

  .hero__art {
    position: absolute;
    inset: 0 0 0 auto;
    width: 68%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }

  .hero__art img {
    object-position: 34% 50%;
  }

  .hero__art::after {
    background:
      linear-gradient(90deg, var(--black) 0, rgb(7 7 8 / 0.72) 18%, rgb(13 61 61 / 0.12) 40%, rgb(7 7 8 / 0) 56%),
      linear-gradient(0deg, var(--black) 0, rgb(7 7 8 / 0) 28%),
      linear-gradient(180deg, rgb(7 7 8 / 0.55) 0, rgb(7 7 8 / 0) 16%);
  }

  .hero__copy {
    max-width: calc(40rem + 2 * var(--gutter));
    margin-top: 0;
    margin-left: max(0px, (100% - 2 * var(--gutter) - 72rem) / 2);
    padding-top: 7rem;
    padding-bottom: clamp(4rem, 9vh, 7rem);
  }
}

/* Sections */

.section {
  padding: clamp(4rem, 10vw, 7.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
}

.split {
  display: grid;
  gap: 1.5rem 3rem;
}

.split > :last-child {
  min-width: 0;
}

.stack {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}

.lede {
  max-width: 54ch;
  font-size: 1rem;
  line-height: 1.75;
}

.prose {
  max-width: 62ch;
}

@media (min-width: 960px) {
  body {
    font-size: 0.9375rem;
  }

  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

/* What you'll learn */

.learn {
  display: grid;
  gap: 0 2rem;
  margin-top: 2.5rem;
}

.learn li {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--line);
}

.learn p {
  color: var(--bone-dim);
}

@media (min-width: 640px) {
  .learn {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .learn {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* How it works */

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.35rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 0.1rem;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.steps p {
  color: var(--bone-dim);
}

/* Pricing */

.prices {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.price {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(13 61 61 / 0.45), rgb(7 7 8 / 0) 70%);
}

.price__amount {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 2.2rem + 2.4vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

.price p:last-child {
  color: var(--bone-dim);
}

@media (min-width: 760px) {
  .prices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.notes {
  display: grid;
  gap: 0.75rem;
  max-width: 62ch;
  margin-top: 2rem;
  color: var(--bone-dim);
}

.notes li {
  position: relative;
  padding-left: 1.25rem;
}

.notes li::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

.refer {
  display: grid;
  gap: 0.5rem;
  max-width: 44rem;
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
}

/* FAQ */

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.75rem 0;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur) var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.faq summary:hover {
  color: var(--gold);
}

.faq details p {
  max-width: 62ch;
  padding-bottom: 1.25rem;
  color: var(--bone-dim);
}

/* Booking widget */

.widget,
.booker,
.manage,
.step {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  min-width: 0;
}

/* Step headings take focus from script on each step change; the move is the cue, not a ring. */
h3[tabindex='-1']:focus {
  outline: none;
}

.zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  color: var(--bone-dim);
  font-size: 0.8125rem;
}

.zone strong {
  color: var(--bone);
  font-weight: 500;
}

.status {
  min-height: 1.7em;
}

.status[data-tone='error'] {
  color: var(--danger);
}

.days,
.times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pick {
  min-height: var(--hit);
  min-width: 5.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--bone);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}

.pick small {
  display: block;
  color: var(--bone-dim);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pick:hover {
  border-color: var(--gold);
}

.pick[aria-pressed='true'] {
  border-color: var(--bone);
  background: var(--bone);
  color: var(--black);
}

.pick[aria-pressed='true'] small {
  color: rgb(7 7 8 / 0.75);
}

.pick.ghost {
  height: 52px;
  border-color: var(--line);
  background: rgb(236 231 223 / 0.04);
  cursor: default;
}

.times .pick {
  min-width: 6.5rem;
}

.day-head {
  font-size: 0.8125rem;
}

/* After a failed or empty load nothing is left to show, so the gaps close. */
.days:empty,
.times:empty,
.day-head:empty {
  display: none;
}

/* Forms */

.form {
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
}

.form fieldset {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > label:not(.choice),
.form legend {
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form legend {
  margin-bottom: 0.5rem;
}

.hint {
  color: var(--bone-dim);
  font-size: 0.75rem;
}

.form input[type='text'],
.form input[type='email'],
.form input[type='url'],
.form select,
.form textarea {
  width: 100%;
  min-height: var(--hit);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--bone);
  /* 16px keeps iOS from zooming the page on focus. */
  font-size: 1rem;
  line-height: 1.5;
}

.form textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.form select {
  appearance: none;
  padding-right: 2.5rem;
  background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23caa466' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.form ::placeholder {
  color: rgb(236 231 223 / 0.55);
  opacity: 1;
  /* At 16px the Ableton example runs past a phone-width field (347px of text in 312px at 375px);
     13px fits from 360px up. The field itself stays 16px, which is what iOS checks before zooming. */
  font-size: 0.8125rem;
}

.form [aria-invalid='true'] {
  border-color: var(--danger);
}

.err {
  color: var(--danger);
  font-size: 0.8125rem;
}

.err:empty {
  display: none;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: var(--hit);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--gold);
}

.choice input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0.1rem 0 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--black);
  cursor: pointer;
}

.choice input:checked {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 4px var(--black);
}

.choice input[type='checkbox']:checked {
  box-shadow: none;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23070708' stroke-width='2.2'/%3E%3C/svg%3E") no-repeat center;
}

.choice input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* The honeypot: off screen, out of the tab order and hidden from assistive tech. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.chosen {
  max-width: 40rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
}

.panel {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(13 61 61 / 0.5), rgb(7 7 8 / 0) 65%);
}

.panel h3 {
  font-size: 1rem;
}

.when {
  font-size: 1rem;
}

.when span {
  display: block;
  color: var(--bone-dim);
  font-size: 0.8125rem;
}

.copy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.copy input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: var(--hit);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--bone);
  font-size: 1rem;
}

.ts {
  min-height: 65px;
  /* An iframe whose color-scheme differs from its blank document's gets an opaque white backdrop, so
     under :root's dark scheme Safari flashed a white box each time the widget reset. Matching the
     blank document's scheme keeps it transparent until Turnstile paints its dark theme. */
  color-scheme: normal;
}

/* Footer */

.foot {
  padding: 2rem var(--edge) 3rem;
  border-top: 1px solid var(--line);
  color: var(--bone-dim);
  font-size: 0.75rem;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.75rem;
}

.foot li + li::before {
  content: '\00B7';
  margin-right: 0.75rem;
}

/* On a phone the line would wrap before a dot, so the name takes its own line. */
@media (max-width: 479px) {
  .foot li:first-child {
    flex-basis: 100%;
  }

  .foot li:nth-child(2)::before {
    content: none;
  }
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  color: var(--bone-dim);
}

.foot a:hover {
  color: var(--gold);
}

/* Privacy and 404 */

.page {
  display: grid;
  gap: 2.5rem;
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}

.page section {
  display: grid;
  gap: 0.75rem;
}

.page h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
}

.page p {
  max-width: 62ch;
  color: var(--bone-dim);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
