:root {
  color-scheme: dark;
  --black: #080705;
  --ink: #f4efe5;
  --muted: #a79f91;
  --amber: #c99b58;
  --line: rgba(244, 239, 229, 0.2);
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--black);
}

body {
  min-width: 20rem;
  min-height: 100svh;
  margin: 0;
  background: var(--black);
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  overflow: hidden;
  background: var(--black);
}

.portrait,
.atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;
  margin: 0;
}

.portrait-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  object-position: var(--portrait-position, 64% 22%);
  filter: saturate(0.78) contrast(1.06);
  transform: scale(1.015);
  transition: opacity 700ms ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.portrait-image--active {
  opacity: 1;
  transform: scale(1);
}

.atmosphere {
  z-index: -1;
  background: linear-gradient(0deg, rgba(8, 7, 5, 0.5), transparent 42%);
}

.page-shell[data-harvey-side="right"] .atmosphere {
  background:
    linear-gradient(90deg, rgba(8, 7, 5, 0.78) 0%, rgba(8, 7, 5, 0.55) 31%, rgba(8, 7, 5, 0.17) 56%, transparent 78%),
    linear-gradient(0deg, rgba(8, 7, 5, 0.52), transparent 42%);
}

.page-shell[data-harvey-side="left"] .atmosphere {
  background:
    linear-gradient(270deg, rgba(8, 7, 5, 0.78) 0%, rgba(8, 7, 5, 0.55) 31%, rgba(8, 7, 5, 0.17) 56%, transparent 78%),
    linear-gradient(0deg, rgba(8, 7, 5, 0.52), transparent 42%);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.25rem, 2.8vw, 2.75rem) clamp(1.25rem, 4vw, 4.5rem);
}

.site-header {
  position: relative;
}

.monogram {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(8, 7, 5, 0.04);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  backdrop-filter: blur(9px) saturate(1.25);
  place-items: center;
}

.quote-progress {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  overflow: hidden;
  background: rgba(244, 239, 229, 0.12);
}

.quote-progress span {
  display: block;
  width: 0.9009%;
  height: 100%;
  background: linear-gradient(90deg, #b98235, #efbd69);
  box-shadow: 0 0 1rem rgba(239, 189, 105, 0.55);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-summary {
  position: absolute;
  top: 50%;
  right: clamp(1.25rem, 4vw, 4.5rem);
  color: rgba(244, 239, 229, 0.8);
  font-size: clamp(0.72rem, 0.9vw, 0.86rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0.12rem 0.65rem rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
  transform: translateY(-50%);
  white-space: nowrap;
}

.quote-stage {
  display: flex;
  align-items: center;
  padding: clamp(3rem, 7vh, 7rem) clamp(1.25rem, 4vw, 4.5rem);
}

.page-shell[data-harvey-side="right"] .quote-stage {
  justify-content: flex-start;
}

.page-shell[data-harvey-side="left"] .quote-stage {
  justify-content: flex-end;
}

.quote-card {
  display: grid;
  width: min(49rem, 48vw);
  height: clamp(27rem, 58vh, 36rem);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 clamp(1.5rem, 3vw, 3rem);
  color: var(--amber);
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  content: "";
}

blockquote {
  display: flex;
  min-height: 0;
  margin: 0;
  align-items: center;
  overflow: hidden;
}

#quote-text {
  max-width: 15ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 7.4rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.92;
  text-wrap: balance;
  text-shadow: 0 0.12em 0.8em rgba(0, 0, 0, 0.28);
}

#quote-text[data-quote-size="medium"] {
  font-size: clamp(2.6rem, 5.2vw, 6.1rem);
}

#quote-text[data-quote-size="long"] {
  font-size: clamp(2.25rem, 4.4vw, 5.2rem);
  line-height: 0.96;
}

#quote-text::before {
  color: var(--amber);
  content: "“";
}

#quote-text::after {
  color: var(--amber);
  content: "”";
}

.quote-meta {
  display: grid;
  align-items: end;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  width: min(42rem, 100%);
  height: 3.5rem;
  margin-top: 0;
  padding-top: 1.15rem;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.quote-meta > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.4rem;
}

.speaker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#quote-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
  text-decoration-color: transparent;
  text-underline-offset: 0.3rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

#quote-source:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.source-label {
  color: var(--amber);
}

.quote-count {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.13em;
}

.site-footer {
  align-items: end;
  justify-content: flex-end;
}

.footer-notes {
  display: grid;
  width: min(28rem, 48vw);
  height: 2.35rem;
  align-content: end;
  justify-items: end;
  gap: 0.15rem;
  overflow: hidden;
  text-align: right;
}

.footer-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.5;
}

#image-credit {
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.35;
  text-decoration-color: transparent;
  text-underline-offset: 0.2rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
  white-space: nowrap;
}

#image-credit:hover {
  color: var(--amber);
  text-decoration-color: currentColor;
}

.another-quote {
  position: fixed;
  z-index: 3;
  bottom: clamp(1.25rem, 2.8vw, 2.75rem);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.42rem 0.45rem 0.42rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(8, 7, 5, 0.04);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(9px) saturate(1.25);
  transform: translateX(-50%);
  transition: background 180ms ease, transform 180ms ease;
}

.button-copy {
  display: grid;
  gap: 0.18rem;
  text-align: left;
}

.button-copy kbd {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.48rem;
  letter-spacing: 0.13em;
  line-height: 1;
}

.button-mark {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--amber);
  font-size: 0.9rem;
  transition: border-color 180ms ease, transform 180ms ease;
  place-items: center;
}

.another-quote:hover .button-mark {
  border-color: var(--amber);
  transform: rotate(45deg);
}

.another-quote:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(8, 7, 5, 0.06);
  transform: translate(-50%, -2px);
}

.another-quote:active {
  transform: translateX(-50%) scale(0.98);
}

.another-quote:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.another-quote:focus-visible,
.monogram:focus-visible,
#quote-source:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 0.45rem;
}

#image-credit:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 0.3rem;
}

.quote-card--entering #quote-text,
.quote-card--entering .quote-meta {
  animation: quote-enter 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.noscript-message {
  position: fixed;
  z-index: 5;
  right: 1rem;
  bottom: 1rem;
  max-width: 22rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 7, 5, 0.94);
  color: var(--muted);
  font-size: 0.7rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.not-found {
  display: grid;
  min-height: 100svh;
  padding: 2rem;
  background:
    linear-gradient(rgba(8, 7, 5, 0.74), rgba(8, 7, 5, 0.96)),
    url("/assets/episodes/s01e01.webp") 64% 24% / cover;
  text-align: center;
  place-items: center;
}

.not-found p {
  margin: 0;
  color: var(--amber);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.not-found h1 {
  margin: 1rem 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 15vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.not-found a {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-underline-offset: 0.35rem;
  text-transform: uppercase;
}

@keyframes quote-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  .footer-notes {
    position: fixed;
    z-index: 2;
    right: clamp(1.25rem, 4vw, 4.5rem);
    bottom: calc(clamp(1.25rem, 2.8vw, 2.75rem) + 5.2rem);
  }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: 100dvh;
  }

  .portrait-image {
    object-position: var(--portrait-mobile-position, 64% 22%);
  }

  .page-shell[data-harvey-side="right"] .atmosphere,
  .page-shell[data-harvey-side="left"] .atmosphere {
    background:
      linear-gradient(0deg, rgba(8, 7, 5, 0.86) 0%, rgba(8, 7, 5, 0.68) 45%, rgba(8, 7, 5, 0.18) 75%, transparent 100%);
  }

  .site-header,
  .site-footer {
    padding: 1.15rem 1.25rem;
  }

  .progress-summary {
    right: 1.25rem;
    font-size: 0.66rem;
  }

  .site-footer {
    gap: 0.75rem;
  }

  .quote-stage {
    align-items: end;
    padding: 12rem 1.25rem 2.5rem;
  }

  .quote-card {
    width: 100%;
    height: 26rem;
  }

  #quote-text {
    max-width: 17ch;
    font-size: clamp(2.45rem, 11.5vw, 4.5rem);
    line-height: 0.95;
  }

  #quote-text[data-quote-size="medium"] {
    font-size: clamp(2.15rem, 9.8vw, 3.8rem);
  }

  #quote-text[data-quote-size="long"] {
    font-size: clamp(1.9rem, 8.4vw, 3.25rem);
  }

  .site-footer {
    align-items: center;
  }

  .page-shell[data-harvey-side="right"] .quote-stage,
  .page-shell[data-harvey-side="left"] .quote-stage {
    justify-content: stretch;
  }

  .footer-notes {
    right: 1.25rem;
    width: 11rem;
    height: 2.35rem;
  }

  .source-label {
    display: none;
  }
}

@media (max-height: 690px) and (min-width: 761px) {
  .quote-stage {
    padding-block: 2rem;
  }

  #quote-text {
    font-size: clamp(2.75rem, 5.5vw, 5rem);
  }

  .quote-card {
    height: 24rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-card--entering #quote-text,
  .quote-card--entering .quote-meta {
    animation: none;
  }

  #quote-source,
  .button-mark,
  .portrait-image,
  .quote-progress span,
  .another-quote {
    transition: none;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .monogram,
  .another-quote {
    background: rgba(8, 7, 5, 0.5);
  }
}

@media (prefers-contrast: more) {
  .monogram,
  .another-quote {
    border-color: rgba(255, 255, 255, 0.52);
    background: rgba(8, 7, 5, 0.62);
  }
}
