/* ============================================================
   REALIZED — RLYZD Books (v2 catalog)
   Extends styles.css design tokens. Audible-scale catalog feel.
   ============================================================ */

/* ---------- Library hero ---------- */
.lib-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 9rem clamp(1.2rem, 5vw, 2rem) 3rem;
  text-align: center;
}
.lib-hero .eyebrow { margin-bottom: 1.4rem; }
.lib-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}
.lib-hero .lead {
  max-width: 640px;
  margin: 0 auto 2.4rem;
  color: var(--gray-soft);
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

/* compare line: Audible vs RLYZD */
.compare {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gray-soft);
  margin-bottom: 2.6rem;
}
.compare b { color: var(--white); font-style: normal; font-family: var(--sans); font-weight: 600; }
.compare .sep { color: var(--gray); }

/* ---------- Goal input system ---------- */
.goal-bar {
  max-width: 620px;
  margin: 0 auto;
}
.goal-bar label {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  color: var(--white);
  margin-bottom: 1rem;
}
.goal-row {
  display: flex;
  gap: 0.5rem;
  background: rgba(244, 241, 234, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 0.4rem 0.4rem 0.4rem 1.3rem;
  transition: border-color 0.3s, background 0.3s;
}
.goal-row:focus-within { border-color: var(--bone); background: rgba(244, 241, 234, 0.07); }
.goal-row input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--white); font-family: var(--sans); font-size: 1rem;
}
.goal-row input::placeholder { color: var(--gray); }
.goal-row button {
  background: var(--bone); color: var(--black); border: none; border-radius: 100px;
  padding: 0.7rem 1.6rem; font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.3s; white-space: nowrap;
}
.goal-row button:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(244, 241, 234, 0.18); }
.goal-chips { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.goal-chips span { font-size: 0.75rem; color: var(--gray); align-self: center; letter-spacing: 0.04em; }
.goal-chip {
  background: none; border: 1px solid var(--line); color: var(--gray-soft);
  border-radius: 100px; padding: 0.35rem 0.85rem; font-family: var(--sans); font-size: 0.8rem;
  cursor: pointer; transition: all 0.25s;
}
.goal-chip:hover { border-color: var(--bone); color: var(--white); }

/* ---------- Your Path strip (recommendations) ---------- */
.path-strip {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 5vw, 2rem);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.6s var(--ease), opacity 0.6s var(--ease), padding 0.6s var(--ease), margin 0.6s var(--ease);
}
.path-strip.show { max-height: 1400px; opacity: 1; padding-top: 3rem; padding-bottom: 1rem; }
.path-head { text-align: center; margin-bottom: 2rem; }
.path-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 400; }
.path-head h2 em { font-family: var(--serif); }
.path-head p { color: var(--gray-soft); font-weight: 300; margin-top: 0.6rem; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 760px) { .path-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; } }

/* ---------- Filters ---------- */
.catalog-wrap { max-width: var(--maxw); margin: 0 auto; padding: 4rem clamp(1.2rem, 5vw, 2rem) 2rem; }
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.catalog-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 400; }
.catalog-head p { color: var(--gray); font-size: 0.85rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.4rem; }
.filter {
  background: none; border: 1px solid var(--line); color: var(--gray-soft);
  border-radius: 100px; padding: 0.45rem 1rem; font-family: var(--sans); font-size: 0.82rem;
  letter-spacing: 0.02em; cursor: pointer; transition: all 0.25s;
}
.filter:hover { border-color: var(--line-strong); color: var(--white); }
.filter.active { background: var(--bone); border-color: var(--bone); color: var(--black); font-weight: 600; }

/* ---------- Catalog grid ---------- */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem) 1.4rem;
}
.book {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: inherit;
  font-family: inherit;
  animation: bookIn 0.6s var(--ease) both;
}
@keyframes bookIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.book.dimmed { opacity: 0.28; filter: grayscale(0.4); }
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, #181818, #050505);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.book:hover .book-cover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6); border-color: var(--bone); }
.book-cover svg.motif { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.cover-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.1rem;
}
.cover-mark { display: flex; align-items: center; justify-content: space-between; }
.cover-rlyzd { font-weight: 700; letter-spacing: 0.26em; font-size: 0.68rem; color: var(--bone); }
.cover-cat { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); }
.cover-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.08; color: var(--white); }
.cover-foot { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray-soft); }
.book-info { padding-top: 0.9rem; }
.book-title { font-size: 0.98rem; font-weight: 500; margin-bottom: 0.15rem; }
.book-author { font-size: 0.82rem; color: var(--gray); font-weight: 300; }
.book-format { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.6rem; }
.fmt {
  font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--gray-soft);
  border-radius: 100px; padding: 0.2rem 0.55rem;
}
.path-grid .book-cover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.path-grid .book { flex-direction: row; gap: 1rem; align-items: center; }
.path-grid .book-cover { width: 96px; flex: none; }
.path-grid .book-info { padding-top: 0; }
.path-grid .match { font-size: 0.7rem; color: var(--bone); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.5rem; display: block; }

/* ---------- The Format section ---------- */
.format { background: rgba(244, 241, 234, 0.02); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.format-inner { max-width: var(--maxw); margin: 0 auto; }
.anatomy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 1rem; }
.anatomy .step { border-top: 1px solid var(--line-strong); padding-top: 1.4rem; }
.anatomy .step-num { font-family: var(--serif); font-size: 1.4rem; color: var(--gray); display: block; margin-bottom: 0.8rem; }
.anatomy h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.anatomy p { font-size: 0.9rem; color: var(--gray-soft); font-weight: 300; }
@media (max-width: 820px) { .anatomy { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .anatomy { grid-template-columns: 1fr; } }

/* ---------- Detail sheet (modal) ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(4, 4, 4, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet-inner {
  position: relative;
  width: 100%; max-width: 880px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(160deg, #141414, #070707);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.sheet.open .sheet-inner { transform: none; }
.sheet-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(244, 241, 234, 0.06); border: 1px solid var(--line-strong);
  color: var(--bone); font-size: 1.1rem; cursor: pointer; line-height: 1;
  transition: background 0.25s, transform 0.25s;
}
.sheet-close:hover { background: var(--bone); color: var(--black); transform: rotate(90deg); }
.sheet-grid { display: grid; grid-template-columns: 200px 1fr; gap: clamp(1.5rem, 4vw, 2.6rem); align-items: start; }
.sheet-cover { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; position: relative; border: 1px solid var(--line-strong); background: linear-gradient(160deg, #181818, #050505); }
.sheet-cat { display: block; margin-bottom: 0.7rem; }
.sheet h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 400; line-height: 1.08; }
.sheet-author { color: var(--gray); margin: 0.4rem 0 1.2rem; }
.sheet-desc { color: var(--gray-soft); font-weight: 300; margin-bottom: 1.6rem; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.8rem; }
.sheet-routine { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.sheet-routine h3 { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gray); margin-bottom: 1.1rem; }
.routine-list { list-style: none; display: grid; gap: 0.9rem; }
.routine-list li { display: flex; gap: 0.9rem; align-items: baseline; }
.routine-time { font-family: var(--serif); font-style: italic; color: var(--bone); min-width: 88px; font-size: 1rem; }
.routine-list p { color: var(--gray-soft); font-weight: 300; font-size: 0.92rem; }
.sheet-mantra { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--white); border-left: 2px solid var(--bone); padding-left: 1.1rem; margin: 1.8rem 0; }
.sheet-cta { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--bone); color: var(--black); text-decoration: none; padding: 0.85rem 1.8rem; border-radius: 100px; font-weight: 600; font-size: 0.9rem; transition: transform 0.2s var(--ease), box-shadow 0.3s; }
.sheet-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(244, 241, 234, 0.16); }
@media (max-width: 640px) { .sheet-grid { grid-template-columns: 1fr; } .sheet-cover { max-width: 200px; } }

/* nav active state for this page */
.nav-links a.here { color: var(--white); }
