@import url("/design/tokens.css");

:root {
  --font: var(--font-pp-neue-montreal);
  --hairline: 1px solid var(--color-aged-ink);
  --page-pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-aged-ink);
  background: var(--color-vellum-sand);
}

a {
  color: var(--color-aged-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 1px solid var(--color-aged-ink);
  outline-offset: 3px;
}

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--page-pad) 18px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.04em;
  background: transparent;
}
.nav-brand {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 400;
}
.nav-links a { text-decoration: none; }
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nav-end { font-weight: 400; }

.hero {
  position: relative;
  min-height: 100dvh;
  padding: 0 0 72px;
  overflow: hidden;
  background: var(--hero-wash);
}
.hero-title {
  position: relative;
  z-index: 1;
  margin: 6vh var(--page-pad) 0;
  max-width: 10ch;
  font-size: clamp(52px, 10.5vw, 122px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--color-charcoal-black);
  text-wrap: balance;
}
.hero-specimen {
  position: absolute;
  left: 42%;
  bottom: -8vh;
  height: min(96vh, 920px);
  width: auto;
  pointer-events: none;
  mix-blend-mode: multiply;
  user-select: none;
  z-index: 2;
}
.hero-meta {
  position: relative;
  z-index: 2;
  margin: 28px var(--page-pad) 0;
  font-size: var(--text-heading-sm);
  font-weight: 500;
  line-height: 1.3;
  max-width: 28ch;
}

.sheet { padding: 0 var(--page-pad) 120px; }
.page-head { margin: 80px 0 48px; }
.page-kicker {
  margin: 0 0 16px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page-title {
  margin: 0;
  font-size: clamp(40px, 7vw, 75px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-charcoal-black);
  text-wrap: balance;
}

.block {
  margin-top: var(--spacing-120);
  padding-top: var(--spacing-32);
  border-top: var(--hairline);
}
.block-name {
  margin: 0 0 28px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto;
  gap: 16px 32px;
  align-items: start;
  padding: 18px 0;
  border-top: var(--hairline);
}
.row:first-of-type { border-top: 0; }
.practice {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.practice a { text-underline-offset: 4px; }
.note {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: 1.45;
  max-width: 42ch;
}
.mins {
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mins small {
  display: block;
  margin-top: 6px;
  font-size: var(--text-caption);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--spacing-120);
  padding-top: var(--spacing-32);
  border-top: 2px solid var(--color-aged-ink);
}
.total p {
  margin: 0;
  font-size: var(--text-heading-sm);
  font-weight: 500;
}
.total-mins {
  font-size: clamp(58px, 8vw, 122px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--color-charcoal-black);
}

.prose {
  max-width: 65ch;
  font-size: var(--text-body);
  line-height: 1.5;
}
.prose h2, .prose h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
}
.prose h2 { font-size: var(--text-heading-sm); margin: 40px 0 12px; }
.prose h3 { font-size: var(--text-subheading); margin: 28px 0 10px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 1.2em; }
.prose img {
  display: block;
  max-width: min(100%, 420px);
  height: auto;
  margin: 20px 0;
  border-radius: var(--radius-images);
  mix-blend-mode: multiply;
}
.prose a { text-underline-offset: 3px; }

.meta-list {
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
  max-width: 65ch;
}
.meta-list li {
  padding: 14px 0;
  border-top: var(--hairline);
  font-size: var(--text-body-sm);
  display: grid;
  grid-template-columns: 14ch 1fr;
  gap: 16px;
}
.meta-list .k {
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.comments { margin-top: var(--spacing-120); padding-top: var(--spacing-32); border-top: var(--hairline); }
.comment {
  padding: 22px 0;
  border-top: var(--hairline);
  max-width: 65ch;
}
.comment:first-of-type { border-top: 0; }
.comment time {
  display: block;
  margin-bottom: 8px;
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.comment p { margin: 0; white-space: pre-wrap; }
.empty { font-size: var(--text-body-sm); }

.comment-form {
  margin-top: 32px;
  max-width: 42rem;
}
.comment-form label {
  display: block;
  margin-bottom: 10px;
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
textarea {
  display: block;
  width: 100%;
  min-height: 8rem;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--color-aged-ink);
  border-radius: 0;
  background: var(--color-vellum-sand);
  color: var(--color-aged-ink);
  font: inherit;
  font-size: var(--text-body-sm);
  line-height: 1.45;
  resize: vertical;
}
textarea:focus-visible {
  outline: 1px solid var(--color-aged-ink);
  outline-offset: 3px;
}
.text-submit {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: var(--text-body-sm);
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.text-submit:hover { text-decoration-thickness: 2px; }
.flash {
  margin: 0 0 16px;
  font-size: var(--text-body-sm);
}

.home-links { margin-top: 40px; }
.home-links a {
  display: inline-block;
  margin-right: 36px;
  margin-top: 12px;
  font-size: var(--text-heading-sm);
  font-weight: 500;
  text-underline-offset: 5px;
}

.site-footer {
  padding: 40px var(--page-pad) 60px;
  border-top: var(--hairline);
  font-size: var(--text-caption);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.hero-play { position: relative; z-index: 3; margin: 36px var(--page-pad) 0; }
.play-start {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: clamp(40px, 7vw, 75px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-charcoal-black);
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.play-start:hover { text-decoration-thickness: 2px; }
.play-start:focus-visible {
  outline: 1px solid var(--color-aged-ink);
  outline-offset: 6px;
}

.player-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  padding: 14px var(--page-pad) 0;
  background: transparent;
  border: 0;
  pointer-events: none;
}
.player-hud[hidden] { display: none; }
.player-hud button { pointer-events: auto; }
.hud-actions,
.hud-clocks {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.hud-next { justify-self: end; }
.hud-chip {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  min-height: 40px;
  padding: 8px 14px;
  background: var(--color-vellum-sand);
  border: var(--hairline);
  border-radius: 12px;
  color: var(--color-charcoal-black);
  font: inherit;
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
}
.hud-clocks .hud-chip { min-width: 5.2em; }
button.hud-chip {
  font-size: 16px;
  letter-spacing: 0.02em;
  font-variant-numeric: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
button.hud-chip:hover { text-decoration-thickness: 2px; }
button.hud-chip:focus-visible {
  outline: 1px solid var(--color-aged-ink);
  outline-offset: 3px;
}
.hud-total small,
.hud-asana small { display: none; }
.slide-timer { display: none; }

.slide {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px 48px;
  align-items: start;
  min-height: 0;
  height: auto;
  padding: 0 var(--page-pad) 48px;
  border-top: var(--hairline);
  overflow: visible;
  scroll-margin-top: 0;
}
.slide-figure {
  position: sticky;
  top: 0;
  margin: 0;
  min-width: 0;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}
.slide-viewport {
  height: 100%;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}
.slide-track {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
  transition: transform 360ms cubic-bezier(0.2, 0, 0, 1);
}
.slide-track.is-dragging { transition-duration: 0ms; }
.slide-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;
  border-radius: var(--radius-images);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.slide-img-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  min-width: 2.4em;
  padding: 8px 12px;
  transform: translateY(-50%);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}
.slide-img-nav:hover { text-decoration: none; }
.slide-img-nav.is-prev { left: 12px; }
.slide-img-nav.is-next { right: 12px; }
.slide-copy {
  position: relative;
  z-index: 1;
  overflow: visible;
  max-height: none;
  padding-top: 112px;
  padding-bottom: 24px;
  background: transparent;
}
.slide-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 50px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.slide-mins {
  margin: 8px 0 20px;
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slide-label {
  margin: 22px 0 8px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slide-list {
  margin: 0;
  padding-left: 1.15em;
  max-width: 42ch;
  font-size: var(--text-body-sm);
  line-height: 1.4;
}
.slide-list li { margin: 0 0 6px; }
.slide-comment {
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.note-layer {
  margin: auto;
  border: var(--hairline);
  padding: 28px 24px 24px;
  width: min(36rem, calc(100vw - 40px));
  max-width: none;
  height: fit-content;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: var(--color-vellum-sand);
  color: var(--color-aged-ink);
  box-shadow: none;
}
.note-layer::backdrop {
  background: color-mix(in srgb, var(--color-aged-ink) 28%, transparent);
}
.note-layer .comment-form {
  margin-top: 0;
  max-width: none;
}
.note-heading {
  margin: 0 0 18px;
  font-size: var(--text-heading-sm);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.note-layer textarea { min-height: 6.5rem; }
.note-layer[data-edit-dialog] textarea { min-height: 5.5rem; }
.note-actions {
  display: flex;
  gap: 28px;
  margin: 0;
}

.asana-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
  margin-top: 8px;
}
.asana-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.asana-tile:focus-visible {
  outline: 1px solid var(--color-aged-ink);
  outline-offset: 4px;
}
.asana-tile-figure {
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.asana-tile-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;
}
.asana-tile-name {
  margin: 18px 0 10px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.asana-tile:hover .asana-tile-name { text-decoration-thickness: 2px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 3px 8px;
  border: var(--hairline);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .nav-links { display: none; }
  .hero { min-height: auto; padding-bottom: 36px; }
  .hero-title { font-size: clamp(40px, 12vw, 64px); margin-top: 20px; }
  .hero-specimen {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: 46vh;
    margin: 12px auto 0;
    display: block;
  }
  .row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .note { grid-column: 1 / -1; }
  .block { margin-top: 64px; }
  .meta-list li { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { grid-template-columns: 1fr; }
  .slide {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: 36px;
  }
  .slide-figure {
    position: relative;
    top: auto;
    height: 42vh;
    min-height: 220px;
  }
  .slide-copy {
    max-height: none;
    overflow: visible;
    background: var(--color-vellum-sand);
    padding-top: 16px;
  }
  .player-hud { padding: 10px 12px 0; column-gap: 8px; }
  .hud-chip { font-size: 20px; padding: 7px 12px; }
  button.hud-chip { font-size: 15px; }
  .slide-img-nav { display: none; }
  .asana-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .asana-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
  .slide-track { transition: none; }
}
