/* ==========================================================================
   More Maryna — the poem pages.

   The home page's pale yellow with soft colour glowing through it, frosted
   glass cards, pill-shaped everything, a bold tight sans for headlines and
   a single italic serif for the quieter voice.
   ========================================================================== */

:root {
  --bg: #FFF3B0;          /* the home page's warm pale yellow */
  --bg-hi: #FFF8CC;
  --bg-lo: #FFEAA0;
  --card: #FFE36E;
  --ink: #2B2200;         /* deep brown */
  --ink-soft: #6B5714;    /* secondary text: 6:1 or better on every surface */
  --gold: #FFB703;        /* decoration only */
  --gold-deep: #7A4F00;   /* gold you can read */
  --peach: #FFA36C;

  --glass: rgba(255, 255, 255, .52);
  --glass-hover: rgba(255, 255, 255, .78);
  --glass-edge: rgba(255, 255, 255, .85);
  --line: rgba(43, 34, 0, .14);
  --lift: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 22px 44px -30px rgba(43, 34, 0, .4);

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;

  --gutter: 20px;
  --wide: 66rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (min-width: 720px) {
  :root { --gutter: clamp(28px, 4vw, 48px); }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

body.app {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  background: radial-gradient(1000px 600px at 50% 0%, var(--bg-hi) 0%, var(--bg) 55%, var(--bg-lo) 100%) fixed, var(--bg);
}

::selection { background: var(--card); color: var(--ink); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 999px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Aura: soft colour drifting behind everything ---------- */

.aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aura__blob {
  position: absolute;
  border-radius: 50%;
  animation: drift 32s ease-in-out infinite alternate;
}
.aura__blob--gold {
  top: -16vmax;
  right: -12vmax;
  width: 52vmax;
  height: 52vmax;
  background: radial-gradient(circle, rgba(255, 183, 3, .5) 0%, rgba(255, 183, 3, 0) 66%);
}
.aura__blob--peach {
  bottom: -18vmax;
  left: -14vmax;
  width: 48vmax;
  height: 48vmax;
  background: radial-gradient(circle, rgba(255, 163, 108, .38) 0%, rgba(255, 163, 108, 0) 66%);
  animation-duration: 38s;
  animation-delay: -12s;
}
.aura__blob--lemon {
  top: 30%;
  left: 34%;
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(circle, rgba(255, 227, 110, .7) 0%, rgba(255, 227, 110, 0) 66%);
  animation-duration: 44s;
  animation-delay: -20s;
}
@keyframes drift {
  to { transform: translate(6vmax, 5vmax) scale(1.14); }
}

/* ---------- Pills: tags, counts, chips ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .45rem .9rem;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass);
  font: 600 .8rem/1 var(--sans);
  letter-spacing: .005em;
  text-transform: lowercase;
  text-decoration: none;
  white-space: nowrap;
}
.pill--dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 183, 3, .25);
}
.pill--soft { background: rgba(255, 227, 110, .6); border-color: transparent; }
.pill--chip { transition: background .25s ease, color .25s ease, transform .25s var(--ease); }
.pill--chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-1px); }
.pill--chip span {
  padding: .18rem .45rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .7rem;
}
.pill--chip:hover span { background: var(--gold); color: var(--ink); }

/* ---------- Floating bar ---------- */

.bar {
  position: sticky;
  top: 12px;
  z-index: 10;
  padding: 12px var(--gutter) 0;
}
.bar__inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 7px 7px 7px 8px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(255, 248, 204, .62);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
          backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 32px -20px rgba(43, 34, 0, .4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  text-decoration: none;
}
.brand__avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  background: var(--card);
}
.brand__name {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.03em;
  text-transform: lowercase;
  white-space: nowrap;
}

.bar__nav { display: flex; align-items: center; gap: .2rem; }
.bar__nav a {
  padding: .55rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .88rem;
  text-transform: lowercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease;
}
.bar__nav a:hover { background: rgba(255, 227, 110, .75); }
.bar__nav a[aria-current] { background: var(--ink); color: var(--bg); }
.bar__nav .bar__lang { border: 1px solid var(--line); }

@media (max-width: 440px) {
  .bar__hide-sm { display: none; }
  .bar__nav a { padding: .55rem .7rem; }
}

/* ---------- Page ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 2rem;
}

.hero { padding: clamp(3.5rem, 10vw, 7rem) 0 0; }

.hero__title {
  margin: 1rem 0 0;
  font-weight: 800;
  font-size: clamp(3.6rem, 13vw, 9.5rem);
  line-height: .86;
  letter-spacing: -.06em;
  text-transform: lowercase;
}

/* Big type fades from deep brown into a readable gold. */
.hero__title,
.poem-head__title {
  background: linear-gradient(100deg, var(--ink) 35%, var(--gold-deep));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  padding-bottom: .06em; /* room for descenders under the clip */
}

.hero__lede {
  max-width: 28ch;
  margin: .9rem 0 1.4rem;
  font: italic 500 clamp(1.5rem, 3vw, 2.1rem)/1.2 var(--serif);
  color: var(--ink-soft);
}

.crumbs {
  margin: 0;
  font-weight: 600;
  font-size: .88rem;
  text-transform: lowercase;
  color: var(--ink-soft);
}
.crumbs a { color: var(--ink); text-underline-offset: .25em; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }

/* ---------- Shelves of cards ---------- */

.shelf { margin-top: clamp(2.8rem, 6vw, 4.5rem); }
.shelf--solo { margin-top: 2.2rem; }

.shelf__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .9rem;
  margin-bottom: 1.2rem;
}
.shelf__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: -.045em;
  line-height: 1;
  text-transform: lowercase;
}
.shelf__title a { text-decoration: none; transition: color .25s ease; }
.shelf__title a:hover { color: var(--gold-deep); }
.shelf__blurb {
  flex-basis: 100%;
  margin: .1rem 0 0;
  font: italic 500 1.3rem/1.3 var(--serif);
  color: var(--ink-soft);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  height: 100%;
  min-height: 15rem;
  padding: 1.2rem 1.2rem 1.5rem 1.4rem;
  border: 1px solid var(--glass-edge);
  border-radius: 28px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: var(--lift);
  text-decoration: none;
  transition: transform .4s var(--ease), background .4s ease, box-shadow .4s ease;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  background: var(--glass-hover);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 34px 56px -30px rgba(43, 34, 0, .45);
}
.card:focus-visible { border-radius: 28px; }

.card__top { display: flex; align-items: center; justify-content: space-between; }

/* The arrow button: tilted, then it turns and fills as you point at the card. */
.card__go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: rotate(-45deg);
  transition: transform .45s var(--ease), background .3s ease, color .3s ease, border-color .3s ease;
}
.card:hover .card__go,
.card:focus-visible .card__go {
  transform: rotate(0);
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.card__title {
  margin-top: auto;
  font-weight: 800;
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.card__first {
  font: italic 500 1.2rem/1.3 var(--serif);
  color: var(--ink-soft);
}

/* ---------- A poem ---------- */

.poem-page { max-width: 46rem; margin: 0 auto; }

.poem-head {
  padding: clamp(3rem, 9vw, 5.5rem) 0 0;
  text-align: center;
}
.poem-head__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin: 0;
}
.poem-head__title {
  margin: 1.1rem 0 0;
  font-weight: 800;
  font-size: clamp(2.9rem, 10vw, 6rem);
  line-height: .92;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.author {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin: 1.6rem 0 0;
  padding: .35rem 1.1rem .35rem .35rem;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass);
  text-align: left;
}
.author__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  background: var(--card);
}
.author__text { display: flex; flex-direction: column; line-height: 1.25; }
.author__name { font-weight: 700; font-size: .92rem; }
.author__date { font-weight: 500; font-size: .8rem; color: var(--ink-soft); }

/* The poem, on a sheet of frosted glass, with a big italic quote mark. */
.sheet {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(3rem, 8vw, 4.5rem) clamp(1.4rem, 7vw, 4.5rem) clamp(2.2rem, 6vw, 3.5rem);
  border: 1px solid var(--glass-edge);
  border-radius: clamp(26px, 4vw, 40px);
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 50px 90px -50px rgba(43, 34, 0, .45);
  overflow: hidden;
}
.sheet__quote {
  position: absolute;
  top: -.12em;
  left: .1em;
  font: italic 500 clamp(9rem, 24vw, 14rem)/1 var(--serif);
  color: var(--gold);
  opacity: .5;
  pointer-events: none;
  user-select: none;
}

.poem {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  font-weight: 500;
  font-size: clamp(1.05rem, .97rem + .45vw, 1.24rem);
  line-height: 1.85;
  letter-spacing: -.005em;
}
.stanza { margin: 0 0 1.6em; }
.stanza:last-child { margin-bottom: 0; }

/* Lines rise in one after another; a long one wraps with a hanging indent. */
.line {
  display: block;
  padding-left: 1.4em;
  text-indent: -1.4em;
  animation: rise .8s var(--ease) both;
  animation-delay: calc(var(--i) * 55ms + 200ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.sheet__note {
  max-width: 28rem;
  margin: 2.4rem auto 0;
  padding-top: 1.3rem;
  border-top: 1px dashed rgba(43, 34, 0, .22);
  text-align: center;
  font: italic 500 1.15rem/1.4 var(--serif);
  color: var(--ink-soft);
}
.sheet__note a { color: var(--ink); text-underline-offset: .2em; }

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

.center { margin: 2.2rem 0 0; text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.4rem;
  border-radius: 999px;
  font: 700 .95rem/1 var(--sans);
  letter-spacing: -.01em;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s ease, background .25s ease;
}
.btn--dark {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 16px 30px -16px rgba(43, 34, 0, .6);
}
.btn--dark:hover { transform: translateY(-2px); box-shadow: 0 22px 36px -16px rgba(43, 34, 0, .6); }
.btn--ghost {
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--glass-hover); transform: translateY(-2px); }
.btn__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 183, 3, .6); }
  80%, 100% { box-shadow: 0 0 0 10px rgba(255, 183, 3, 0); }
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}
.pager__card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--lift);
  text-decoration: none;
  transition: transform .35s var(--ease), background .35s ease;
}
.pager__card:hover { transform: translateY(-4px); background: var(--glass-hover); }
.pager__card--next { grid-column: 2; text-align: right; }
.pager__label { font-weight: 600; font-size: .8rem; text-transform: lowercase; color: var(--ink-soft); }
.pager__title { font-weight: 800; font-size: 1.3rem; line-height: 1.1; letter-spacing: -.035em; }

/* ---------- Footer, with a giant soft wordmark ---------- */

.foot {
  margin-top: 5rem;
  padding: 0 var(--gutter);
  text-align: center;
  overflow: hidden;
}
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.foot__links a {
  padding: .5rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .85rem;
  text-transform: lowercase;
  text-decoration: none;
  transition: background .25s ease;
}
.foot__links a:hover { background: var(--glass-hover); }
.foot__rights { margin: .6rem 0 0; font-size: .8rem; color: var(--ink-soft); }
.foot__mark {
  margin: 1.4rem 0 -.2em;
  font-weight: 800;
  font-size: clamp(3.4rem, 16.5vw, 14rem);
  line-height: .9;
  letter-spacing: -.065em;
  text-transform: lowercase;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 183, 3, .65), rgba(255, 183, 3, 0) 88%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  user-select: none;
}

@media (max-width: 560px) {
  .pager { grid-template-columns: 1fr; }
  .pager__card--next { grid-column: 1; }

  /* On a phone, give the poem every pixel of width it can have. */
  .poem-page { margin: 0 -8px; }
  .sheet { padding-left: 1.1rem; padding-right: 1.1rem; }
  .poem { font-size: .98rem; letter-spacing: -.012em; line-height: 1.8; }
  .line { padding-left: 1.1em; text-indent: -1.1em; }
}

/* ---------- Stillness, for readers who ask for it ---------- */

@media (prefers-reduced-motion: reduce) {
  .aura__blob, .line, .btn__dot { animation: none; }
  .card, .card__go, .pager__card, .btn, .pill--chip { transition: none; }
}
