/* Poetic Toys - Manuscript / Ink Aesthetic */

:root {
  --bg: #f3f2ef;            /* cooler paper, matches composer-base */
  --bg-card: #fafaf9;       /* near-white card surface */
  --ink: #1a1714;
  --ink-soft: #4a453e;
  --ink-faint: #8a8478;
  --rule: rgba(26, 23, 20, 0.12);

  --accent-sestina: #8b2f1d;
  --accent-strings: #1f3a5f;
  --accent-calligram: #3d5a3a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  background:
    radial-gradient(ellipse 60% 40% at 18% 8%, rgba(232, 99, 74, 0.018), transparent 70%),
    radial-gradient(ellipse 60% 40% at 82% 85%, rgba(31, 58, 95, 0.035), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 28px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  gap: 40px;
  flex-wrap: wrap;
}

.header-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.title {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 4.4rem;
  color: var(--ink);
  letter-spacing: -0.8px;
  line-height: 1;
}

.title::first-letter {
  color: var(--accent-sestina);
}

.header-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subtitle {
  font-size: 15px;
  color: var(--ink-soft);
  font-style: italic;
}

.disclaimer {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  opacity: 0.7;
}

/* ── Section heading ─────────────────────────────────────────── */
.section-heading {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 56px 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-heading::before {
  content: '⁂';
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--ink-faint);
  letter-spacing: 0;
}
.section-heading:first-of-type { margin-top: 0; }

/* ── Entries: a printed contents page ────────────────────────────
   Each row is just an asterism + italic title + italic 1-liner +
   dotted-† about. No card chrome, no thumbnails, no folio numerals,
   no arrows. Accent flows through type only. */

.toys-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 64px;
}

.toy-item {
  --toy-color: var(--ink);
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  column-gap: 32px;
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 4px;
  background: var(--bg-card);
  transition: border-color 0.18s;
}

/* Hover: border darkens (neutral, NOT accent-tinted). */
.toy-item:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}

/* Thumbnail glyph — no inner box, just the toy's signature visual
   centered in its cell, with a hairline rule on the right that divides
   it from the title block. */
.toy-thumb {
  width: 100%;
  height: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 4%, var(--bg-card));
  border-radius: 3px;
}

.toy-info { min-width: 0; }

.toy-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: normal;
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: var(--ink);
  transition: color 0.2s;
}
.toy-title::first-letter { color: var(--toy-color); }

.toy-tag {
  font-family: 'Space Mono', monospace;
  font-style: normal;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  vertical-align: 0.32em;
  margin-left: 4px;
}
.toy-tag--kind { color: var(--toy-color); }

.toy-description {
  font-family: 'EB Garamond', serif;
  font-style: normal;
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 0 8px 0;
}

.toy-about {
  display: inline-block;
  font-family: 'EB Garamond', serif;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  z-index: 2;
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
  transition: color 0.18s;
}
.toy-about::before { content: '† '; font-style: normal; }
.toy-about:hover   { color: var(--toy-color); }

/* Hover: accent flows through TYPE only — title and about. No border
   tinting, no chrome shifts. The thumbnail nudges right to signal "go." */
.toy-item:hover .toy-title { color: var(--toy-color); }

.toy-item--draft { opacity: 0.55; }

/* ── Per-toy thumbnails (consume --toy-color) ───────────────── */

/* Sestina morphing word — the same animation that signed each row before. */
.sestina-icon .sestina-word {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--toy-color);
  letter-spacing: 0.5px;
}
.sestina-icon .sestina-word::before {
  content: 'river';
  animation: sestina-text 7.5s steps(1, end) infinite;
}
@keyframes sestina-text {
  0%,   15% { content: 'river'; }
  16%,  30% { content: 'riper'; }
  31%,  45% { content: 'rider'; }
  46%,  60% { content: 'winder'; }
  61%,  75% { content: 'finder'; }
  76%,  90% { content: 'fonder'; }
  91%, 100% { content: 'sonder'; }
}

/* Strings spiral */
.strings-icon .strings-spiral {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--toy-color) 360deg);
  -webkit-mask:
    radial-gradient(closest-side, transparent 40%, #000 41%, #000 44%, transparent 45%, #000 52%, #000 55%, transparent 56%, #000 64%, #000 67%, transparent 68%);
  mask:
    radial-gradient(closest-side, transparent 40%, #000 41%, #000 44%, transparent 45%, #000 52%, #000 55%, transparent 56%, #000 64%, #000 67%, transparent 68%);
  animation: strings-wind 14s linear infinite;
}
@keyframes strings-wind {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Perigee moon */
.perigee-icon .perigee-moon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 36%,
    #2a2a2a 0%,
    #1a1a1a 45%,
    #0d0d0d 75%,
    transparent 90%
  );
  box-shadow:
    inset -2px -1px 5px rgba(255, 240, 215, 0.2),
    0 0 10px color-mix(in srgb, var(--toy-color) 35%, transparent);
  animation: perigee-pulse 6s ease-in-out infinite;
}
@keyframes perigee-pulse {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

/* Sestina-composer — the rotation pattern as a small italic-serif signature */
.composer-icon .composer-rotation-icon {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  color: var(--toy-color);
  font-variant-numeric: oldstyle-nums;
  white-space: nowrap;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 40px 20px; }
  .title     { font-size: 3rem; }
  .header    { margin-bottom: 36px; }
  .header-meta { text-align: left; }

  .toy-item {
    grid-template-columns: 64px 1fr;
    column-gap: 16px;
    padding: 18px 2px;
  }
  .toy-thumb { height: 44px; }
  .toy-title { font-size: 1.3rem; }
  .sestina-icon .sestina-word { font-size: 14px; }
  .strings-icon .strings-spiral { width: 32px; height: 32px; }
  .perigee-icon .perigee-moon { width: 22px; height: 22px; }
  .composer-icon .composer-rotation-icon { font-size: 0.7rem; letter-spacing: 1.4px; }
}
