/* danielkozlow.ski: one page, mobile-first. Tweak the tokens below; everything else reads from them. */

:root {
  /* Palette (Dan's names; hex values are first guesses, adjust freely) */
  --slate: #1F3A4D;          /* Deep Slate Blue: hero, close, footer */
  --slate-deep: #182F3F;     /* a shade down, for the sticky bar and footer */
  --walnut: #3A2E1F;         /* Warm Walnut: body text on light */
  --cream: #F3EAD3;          /* Cream */
  --parchment: #EADFC3;      /* Parchment */
  --mustard: #C9962B;        /* Mustard Gold: primary CTA fill */
  --mustard-text: #D6A43C;   /* lighter mustard for small text on slate (5.2:1; base mustard is 4.45:1) */
  --sienna: #A4502E;         /* Burnt Sienna: sparing accent, hover (4.65:1 on cream) */
  --sienna-text: #964829;    /* a touch darker for small text on parchment (4.87:1; base sienna is 4.21:1) */
  --line-light: rgba(58, 46, 31, 0.18);
  --line-dark: rgba(243, 234, 211, 0.22);

  /* Type */
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", serif;
  /* Proxima Nova only if licensed and self-hosted; otherwise the system sans takes over */
  --font-ui: "Proxima Nova", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --step-3: clamp(2.25rem, 1.5rem + 3.6vw, 3.75rem);

  /* Space + layout */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
  --gutter: clamp(1rem, 4vw, 2rem);
  --max: 70rem;
  --max-narrow: 40rem;
  --bar-h: 3.25rem;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar-h);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--walnut);
  font: var(--step-0)/1.6 var(--font-body);
  overflow-x: hidden;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}
h2 { font-size: var(--step-2); }

p { margin: 0 0 var(--space-2); }

a { color: inherit; text-underline-offset: 0.2em; }

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

:focus-visible {
  outline: 2px solid var(--mustard);
  outline-offset: 3px;
  border-radius: 2px;
}
.section--cream :focus-visible,
.section--parchment :focus-visible { outline-color: var(--sienna); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--space-2); top: -3rem; z-index: 100;
  background: var(--mustard); color: var(--walnut);
  font-family: var(--font-ui); padding: var(--space-1) var(--space-2);
}
.skip-link:focus { top: var(--space-1); }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--max-narrow) + 2 * var(--gutter)); }

.section { padding-block: var(--space-5); }
.section--slate { background: var(--slate); color: var(--cream); }
.section--cream { background: var(--cream); }
.section--parchment { background: var(--parchment); }
/* Two sections of the same color in a row read as one: drop the doubled padding between them
   (including when a hidden draft section sits between them on the live site) */
.section--cream + .section--cream,
html:not(.show-drafts) .section--cream + [data-draft] + .section--cream { padding-top: 0; }

.eyebrow {
  font: 600 var(--step--1)/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sienna);
  margin-bottom: var(--space-1);
}
.eyebrow--light { color: var(--mustard-text); }
.section--parchment .eyebrow { color: var(--sienna-text); }

.lede { font-size: var(--step-1); line-height: 1.5; margin-bottom: var(--space-4); }

/* Drafts: hidden unless the page is a local preview or has ?draft (see the script in <head>) */
[data-draft] { display: none !important; }
.show-drafts [data-draft] { display: revert !important; outline: 2px dashed rgba(164, 80, 46, 0.6); outline-offset: 4px; }
.show-drafts span[data-draft] { outline: none; }

/* Visible marker for content still to come. Delete the element once it's real. */
.placeholder-note {
  font: 600 0.75rem/1.3 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sienna);
  border: 1px dashed currentColor;
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  display: inline-block;
  margin-top: var(--space-2);
}
.placeholder-note[hidden] { display: none; }

/* ---------- 0. Sticky bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  background: var(--slate-deep);
  color: var(--cream);
  border-bottom: 1px solid var(--line-dark);
}
.bar__mark {
  font: 600 1.75rem/1 var(--font-display);
  text-decoration: none;
  letter-spacing: -0.02em;
  padding: 0.25rem 0.1rem;
}
.bar__book {
  font: 600 var(--step--1)/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mustard-text);
  padding: 0.75rem 0;          /* 44px-ish tap target without changing bar height */
}
.bar__book:hover { color: var(--cream); }

/* ---------- Buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-ui);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Walnut on mustard: 4.96:1 (slate on mustard is only 4.45:1) */
.btn--primary { background: var(--mustard); color: var(--walnut); }
.btn--primary:hover { background: var(--mustard-text); }

.btn--ghost { color: var(--cream); border-color: rgba(243, 234, 211, 0.55); }
.btn--ghost:hover { border-color: var(--cream); background: rgba(243, 234, 211, 0.08); }

/* ---------- 1. Hero ---------- */

.hero { padding-block: clamp(3rem, 2rem + 8vw, 8rem) var(--space-5); }
.hero__wordmark {
  font: 500 clamp(4.5rem, 3rem + 8vw, 7.5rem)/0.8 var(--font-display);
  letter-spacing: -0.04em;
  margin: 0 0 var(--space-3);
  color: var(--mustard);       /* large text: 4.45:1 clears the 3:1 bar */
}
.hero__name {
  font: 500 var(--step--1)/1.4 var(--font-ui);
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-bottom: var(--space-3);
}
.hero__title { font-size: var(--step-3); max-width: 18ch; margin-bottom: var(--space-3); }
.hero__support { font-size: var(--step-1); opacity: 0.9; margin-bottom: var(--space-4); }
/* The photo is part of the hero, not a framed picture on it.
   Phones: full-bleed under the buttons, its top fading up into the slate, its bottom meeting the next section.
   Wide screens: fills the right side edge to edge, its left edge fading into the slate behind the text. */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-bottom: 0; }
.hero__grid { display: grid; gap: var(--space-4); }
.hero__text { position: relative; z-index: 1; }
.portrait {
  display: block;
  width: calc(100% + 2 * var(--gutter));
  max-width: none;
  margin-inline: calc(-1 * var(--gutter));
  aspect-ratio: 4 / 4.2;           /* reserves space: no layout shift when the image arrives */
  max-height: 30rem;               /* tablets: wide enough that 4:4.2 would be a whole screen of drums */
  object-fit: cover;
  object-position: 50% 45%;        /* keeps Dan and the kit in frame when cropped */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
          mask-image: linear-gradient(to bottom, transparent, #000 30%);
}
/* Warm glow off the studio lights, so the photo and the slate feel like one room (home hero only; the 404 has no photo) */
#top::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 70% 55% at 50% 100%, rgba(201, 150, 43, 0.16), transparent 70%);
  pointer-events: none;
}
@media (min-width: 64rem) {
  .hero { padding-bottom: var(--space-5); min-height: min(52rem, calc(100svh - var(--bar-h))); display: grid; align-items: center; }
  .hero__grid { display: block; }
  .hero__text { max-width: 34rem; }
  .portrait {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(56%, 52rem); height: 100%;
    margin: 0;
    aspect-ratio: auto;
    max-height: none;
    object-position: 55% 40%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 40%);
            mask-image: linear-gradient(to right, transparent, #000 40%);
  }
  #top::before { background: radial-gradient(ellipse 50% 70% at 72% 55%, rgba(201, 150, 43, 0.16), transparent 70%); }
}

.hero__terms {
  font: 500 var(--step--1)/1.4 var(--font-ui);
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin: var(--space-2) 0 0;
}

/* ---------- 2. Before / after player ---------- */

.ab { display: grid; gap: 0.75rem; }

.ab__row {
  --accent: var(--walnut);
  appearance: none;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon text" "wave wave";
  align-items: center;
  gap: 0.75rem 0.9rem;
  width: 100%;
  padding: 1rem;
  text-align: left;
  font: inherit;
  color: var(--walnut);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.ab__row:hover { border-color: rgba(58, 46, 31, 0.4); }
.ab__row.is-active { --accent: var(--sienna); border-color: var(--sienna); background: rgba(255, 255, 255, 0.6); }

.ab__icon {
  grid-area: icon;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--slate);
  position: relative;
}
/* play triangle */
.ab__icon::before {
  content: ""; position: absolute; left: 54%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: 0.45rem 0 0.45rem 0.72rem;
  border-color: transparent transparent transparent var(--cream);
}
/* pause bars */
.ab__row.is-playing .ab__icon::before {
  left: 50%; width: 0.7rem; height: 0.85rem; border: 0;
  background: linear-gradient(90deg, var(--cream) 0 35%, transparent 35% 65%, var(--cream) 65%);
}

.ab__text { grid-area: text; display: grid; }
.ab__label { font: 500 1.4rem/1.1 var(--font-display); }
.ab__sub { font: 0.8125rem/1.3 var(--font-ui); opacity: 0.75; }

/* Bars are injected by script.js; .is-past colors the played portion */
.ab__wave {
  grid-area: wave;
  display: flex; align-items: center; gap: 2px;
  height: 2.75rem;
}
.ab__wave i {
  flex: 1;
  min-width: 1px;
  height: var(--h, 50%);
  background: currentColor;
  opacity: 0.28;
  border-radius: 1px;
}
.ab__row.is-active .ab__wave i.is-past { background: var(--accent); opacity: 1; }

.ab__scrub { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
.ab__scrub input[type="range"] { flex: 1; accent-color: var(--sienna); min-width: 0; height: 1.5rem; }
.ab__time { font: 0.8125rem/1 var(--font-mono); white-space: nowrap; opacity: 0.8; }

.ab__status { font: 0.875rem/1.4 var(--font-ui); min-height: 1.4em; margin: 0; }

@media (min-width: 40rem) {
  .ab__row { grid-template-columns: auto 9.5rem 1fr; grid-template-areas: "icon text wave"; }
}

/* ---------- 3. Delivery tree ---------- */

.tree { margin: 0; }
.tree pre {
  margin: 0;
  padding: 1.25rem;
  background: var(--cream);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font: clamp(0.75rem, 0.68rem + 0.4vw, 0.9rem)/1.65 var(--font-mono);
  color: var(--walnut);
  overflow-x: auto;           /* scrolls inside itself, never the page */
}
.tree__dir { color: var(--sienna); font-weight: 600; }
.tree figcaption { font: 0.875rem/1.4 var(--font-ui); margin-top: 0.75rem; opacity: 0.8; }

/* ---------- 4. Selected work ---------- */

.work { list-style: none; margin: 0 0 var(--space-2); padding: 0; border-top: 1px solid var(--line-light); }
.work__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title arrow" "artist arrow";
  column-gap: 1rem;
  padding: 1rem 0;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.work > li { border-bottom: 1px solid var(--line-light); }
.work__title { grid-area: title; font: 500 1.3rem/1.25 var(--font-display); }
.work__artist { grid-area: artist; font: 0.875rem/1.4 var(--font-ui); opacity: 0.75; }
.work__arrow { grid-area: arrow; align-self: center; font-family: var(--font-ui); transition: transform .2s var(--ease); }
.work__row:hover { color: var(--sienna); }
.work__row:hover .work__arrow { transform: translate(2px, -2px); }

/* Rows that open a player: a small play mark instead of the ↗ */
.work__row[role="button"] { cursor: pointer; }
.work__row[role="button"] .work__arrow {
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--slate); position: relative;
}
.work__row[role="button"] .work__arrow::before {
  content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 0.3rem 0 0.3rem 0.5rem;
  border-color: transparent transparent transparent var(--cream);
}
.work__row[role="button"]:hover .work__arrow { transform: none; background: var(--sienna); }
.work__row[aria-expanded="true"] { color: var(--sienna); }
.work__row[aria-expanded="true"] .work__arrow { background: var(--sienna); }
/* open: the triangle turns to point down at the player */
.work__row[aria-expanded="true"] .work__arrow::before { left: 50%; top: 55%; transform: translate(-50%, -50%) rotate(90deg); }

/* Spotify's compact (80px) player, framed so it reads as part of the list */
.work__player { padding-bottom: 1rem; }
.work__player iframe {
  display: block; width: 100%; height: 80px; border: 0;
  border-radius: 12px;
  background: var(--slate);   /* shows while the player loads, instead of a white flash */
}

@media (min-width: 40rem) {
  .work__row { grid-template-columns: 1fr auto auto; grid-template-areas: "title artist arrow"; align-items: baseline; }
}

.creds {
  margin-top: var(--space-4);
  font-style: italic;
  max-width: 34rem;
}
.creds a:hover { color: var(--sienna); }

/* ---------- 5. Book + about ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: var(--space-3) 0 var(--space-2);
  padding: 0;
  display: grid;
  gap: var(--space-2);
  max-width: 46rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1em;
  width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center;
  border: 1px solid var(--mustard-text);
  border-radius: 50%;
  font: 600 0.875rem/1 var(--font-ui);
  color: var(--mustard-text);
}
.steps strong { color: var(--cream); font-weight: 600; }
.rates { margin-bottom: var(--space-4); font-style: italic; }
.rates a { color: var(--mustard-text); }

.close__grid { display: grid; gap: var(--space-4); }

.bio { max-width: 34rem; margin-bottom: var(--space-3); }

.booking {
  background: var(--cream);
  color: var(--walnut);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 0;
}
/* Reserve height so the embed doesn't push the page around when it loads */
.booking__embed { min-height: 38rem; }
.booking__fallback,
.booking__placeholder {
  min-height: 38rem;
  display: grid; place-content: center; gap: 0.75rem;
  text-align: center;
  padding: var(--space-3);
  font-family: var(--font-ui);
}
.booking__placeholder .placeholder-note { margin: 0 auto; }

@media (min-width: 56rem) {
  /* About on the left, calendar on the right (markup order is calendar first, for phones) */
  .close__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "about booking";
    align-items: start;
  }
  .close__about { grid-area: about; }
  .booking { grid-area: booking; }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--slate-deep);
  color: var(--cream);
  padding-block: var(--space-4);
  font: 0.9375rem/1.5 var(--font-ui);
}
.footer__inner { display: grid; gap: var(--space-2); }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__links a,
.footer__cross a { text-decoration: none; padding-block: 0.4rem; display: inline-block; }
.footer__links a:hover,
.footer__cross a:hover { color: var(--mustard-text); }
.footer__cross { margin: 0; opacity: 0.75; font-family: var(--font-body); font-style: italic; }
.footer__legal { margin: 0; opacity: 0.55; font-size: 0.8125rem; }

/* ---------- Motion ---------- */

/* Only hide-then-fade when JS is running; without JS everything is simply visible */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
