:root {
  color-scheme: dark;
  --gutter: clamp(1.5rem, 6vw, 7rem);
  scroll-padding-top: 5rem;
  font-family: system-ui, sans-serif;
  color: #fff1df;
  background: #20120e;
}

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

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 7rem var(--gutter) 5rem;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 22%;
  /* Keep the beat-scaled image inside the box so it never pokes past the fade overlay. */
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero-art:not(.is-shown) { opacity: 0; animation: hero-failsafe 0s 3s forwards; }
}

@keyframes hero-failsafe { to { opacity: 1; } }

.hero-art picture { display: contents; }

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(calc(1 + var(--pulse, 0) * .014 + var(--bass, 0) * .01));
  filter: brightness(calc(1 + var(--bass, 0) * .07)) saturate(calc(1 + var(--pulse, 0) * .08));
}

.hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, #20120e, #20120eaa 27%, #20120e00 62%),
    linear-gradient(0deg, #20120e99, transparent 30%);
}

.wordmark {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter);
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -.04em;
  text-shadow: 0 1px 12px #20120e;
}

.wordmark-brand {
  color: inherit;
  text-decoration: none;
  transform-origin: left center;
  transition: transform .22s ease;
}

.wordmark-brand:focus-visible { outline: 2px solid #fff1df; outline-offset: 4px; border-radius: .2rem; }

.wordmark span { color: #efbd89; }

.wordmark.is-stuck {
  position: fixed;
  inset: 0 0 auto;
  padding-block: .5rem;
  background: #20120ed9;
  border-bottom: 1px solid #5e3d2c;
  box-shadow: 0 .5rem 1.5rem #10080573;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-shadow: none;
  animation: wordmark-drop .22s ease;
}

.wordmark.is-stuck .wordmark-brand { transform: scale(.92); }

@keyframes wordmark-drop {
  from { transform: translateY(-100%); }
  to { transform: none; }
}

h1 {
  margin: 0 0 2rem;
  transform-origin: left center;
  font: 400 clamp(3.4rem, 8.1vw, 9rem) / .92 Georgia, serif;
  letter-spacing: -.07em;
  text-shadow: 0 4px 32px #20120ea0;
}

h1 em {
  color: #ffd5a7;
  text-shadow:
    0 4px 32px #20120ea0,
    0 0 calc(var(--pulse, 0) * 14px) rgb(255 222 182 / calc(var(--pulse, 0) * .75)),
    0 0 calc(var(--pulse, 0) * 52px) rgb(255 178 104 / calc(var(--pulse, 0) * .6));
}

button, .playground-link {
  min-height: 2.75rem;
  padding: .65rem 1.15rem;
  color: #20120e;
  background: #ffd5a7;
  border: 1px solid transparent;
  border-radius: 2rem;
  font: 650 .95rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}

.playground-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin: .25rem .45rem .25rem 0;
  box-shadow: 0 0 calc(var(--pulse, 0) * 24px) rgb(255 213 167 / calc(var(--pulse, 0) * .36));
}
button:hover, .playground-link:hover { background: #fff1df; }
button:focus-visible, .playground-link:focus-visible { outline: 2px solid #fff1df; outline-offset: 4px; }

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

@media (max-width: 44rem) {
  .hero { align-content: end; padding-bottom: 3rem; }
  .hero-art { inset: 0 0 12%; }
  .hero-art img { object-position: 50% 28%; }
  .hero-art::after {
    background: linear-gradient(0deg, #20120e 0%, #20120ecc 24%, transparent 64%, #20120e88 100%);
  }
}

/* Steep me a poem */
.ghost, .playground-link.ghost { color: #fff1df; background: #20120e99; border-color: #ffd5a780; }
.ghost:hover, .playground-link.ghost:hover { color: #20120e; background: #ffd5a7; }
.poem-card {
  max-width: 30rem;
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid #ffd5a755;
  border-radius: 1.1rem;
  background: #20120ecc;
  backdrop-filter: blur(6px);
}
.poem-card blockquote {
  margin: 0;
  white-space: pre-line;
  font: italic 400 1.25rem/1.45 Georgia, serif;
  color: #fff1df;
}
.poem-card figcaption { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; }
.poem-card figcaption button { min-height: 2.4rem; padding: .45rem .9rem; font-size: .85rem; }
.poem-status { margin: .6rem 0 0; color: #efbd89; font-size: .85rem; }
.poem-status:empty { display: none; }

/* The greatness of tea */
.tea-intro, .home-footer { padding-inline: var(--gutter); }
.tea-intro { padding-block: clamp(4rem, 10vw, 7rem) 3rem; max-width: 80rem; }
.eyebrow { margin: 0; color: #efbd89; font-size: .85rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.tea-intro h2 {
  margin: .75rem 0 1.5rem;
  font: 400 clamp(2.6rem, 6vw, 5rem) / .95 Georgia, serif;
  letter-spacing: -.05em;
}
.tea-intro h2 em { color: #ffd5a7; }
.tea-intro-copy { columns: 2 22rem; column-gap: 3rem; color: #f1dcc4; font-size: 1.075rem; line-height: 1.65; }
.tea-intro-copy p { margin: 0 0 1rem; break-inside: avoid; }
.tea-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: .75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.tea-strip a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .15rem .6rem;
  align-items: center;
  height: 100%;
  padding: .9rem 1rem;
  color: #fff1df;
  text-decoration: none;
  border: 1px solid #5e3d2c;
  border-radius: 1rem;
  background: #291911;
}
.tea-strip a:hover { border-color: #efbd89; background: #33201a; }
.tea-strip a:focus-visible { outline: 2px solid #fff1df; outline-offset: 3px; }
.tea-strip i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 3px #ffffff14; }
.tea-strip span { font: 400 1.35rem/1.15 Georgia, serif; letter-spacing: -.02em; }
.tea-strip small { grid-column: 2; color: #d9c2a8; font-size: .8rem; }
.tea-intro-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.home-footer { padding-block: 2rem 2.5rem; border-top: 1px solid #3a241b; color: #d9c2a8; font-size: .9rem; }
.home-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0 0 .75rem; }
.home-footer a { color: #fff1df; text-decoration: none; }
.home-footer a:hover { color: #ffd5a7; }
.home-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .wordmark.is-stuck { animation: none; }
  .wordmark-brand { transition: none; }
}
