/* ── THE HOUSE — shared styles for the library section ──
   Inherits the palette + type system from the sovawithin.com homepage. */

:root {
  --clay-light:  #E6E3DA;
  --clay-mid:    #CCC6BE;
  --clay-warm:   #B8B0A5;
  --clay-deep:   #8D867F;
  --rust:        #A76951;
  --slate:       #3F5260;
  --text:        #2A2420;
  --white:       #FEFDFB;
  --border:      #CCC6BE;
  --ease:        cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

html, body {
  background: var(--clay-light);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--clay-light);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar a { text-decoration: none; color: var(--text); }

.topbar .mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.topbar .mark .wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  padding-left: 0.42em;
  color: var(--text);
}
/* "within" sits under the wordmark and blinks, same as the homepage hero */
.topbar .mark .within {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--rust);
  margin-top: 2px;
  padding-left: 3.6em;
  animation: withinBlink 4.5s infinite;
}
@keyframes withinBlink {
  0%   { opacity: 1; }
  77%  { opacity: 1; }
  88%  { opacity: 0; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar .mark .within { animation: none; }
}
.topbar nav { display: flex; gap: 26px; align-items: center; }
.topbar nav a {
  font-size: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
  /* --text not --clay-deep: clay-deep measured 3.06:1, under the 4.5 minimum at this size */
  color: var(--text);
  transition: color 0.3s var(--ease);
}
.topbar nav a:hover,
.topbar nav a[aria-current="page"] { color: var(--rust); }

/* ── Shared layout ── */
.wrap { max-width: 680px; margin: 0 auto; padding: 0 32px; }

/* ── Library index header ── */
.house-hero {
  padding: 88px 32px 64px;
  text-align: center;
  background: radial-gradient(110% 80% at 50% 0%, #EFEDE6 0%, var(--clay-light) 60%);
}
.house-hero .eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
}
.house-hero h1 {
  font-size: 54px;
  font-weight: 200;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-top: 20px;
}
.house-hero p {
  max-width: 460px;
  margin: 24px auto 0;
  font-size: 19px;
  color: var(--clay-deep);
  line-height: 1.7;
}
.house-hero .divider { width: 32px; height: 1px; background: var(--rust); margin: 40px auto 0; opacity: 0.4; }

/* ── Entry list ── */
.entries { padding: 8px 0 96px; }

.entry-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.4s var(--ease);
}
.entry-link:first-child { border-top: 1px solid var(--border); }
.entry-link:hover { transform: translateX(4px); }

.entry-link h2 {
  font-size: 27px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.3px;
  transition: color 0.3s var(--ease);
}
.entry-link:hover h2 { color: var(--rust); }
.entry-link p {
  margin-top: 10px;
  color: var(--clay-deep);
  font-size: 17px;
  line-height: 1.65;
}
.entry-meta {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--clay-warm);
  font-weight: 600;
}

/* upcoming entries, not yet written */
.entry-soon { opacity: 0.5; pointer-events: none; }
.entry-soon .entry-meta { color: var(--clay-warm); }

/* ── Entry page ── */
article { padding: 72px 0 40px; }

article .kicker {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
}
article h1 {
  font-size: 46px;
  font-weight: 200;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-top: 18px;
}
/* the answer capsule directly under the H1 */
.capsule {
  margin-top: 34px;
  padding: 28px 30px;
  background: var(--white);
  border-left: 2px solid var(--rust);
  border-radius: 2px;
}
.capsule p { font-size: 20px; line-height: 1.6; }
.capsule p + p { margin-top: 14px; }

article h2 {
  font-size: 27px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-top: 62px;
}
article p { margin-top: 20px; }
article p strong { font-weight: 600; }

article a { color: var(--rust); text-decoration: none; border-bottom: 1px solid rgba(167,105,81,0.35); }
article a:hover { border-bottom-color: var(--rust); }

/* the three things to listen for */
.listen-for { margin-top: 30px; display: flex; flex-direction: column; gap: 22px; }
.listen-for div { padding-left: 20px; border-left: 1px solid var(--clay-warm); }
.listen-for strong { display: block; font-weight: 600; }
.listen-for p { margin-top: 4px; color: var(--clay-deep); }

/* ── The handed-over track ── */
.offer {
  margin-top: 56px;
  padding: 34px 30px 30px;
  background: var(--clay-mid);
  border-radius: 3px;
}
.offer .offer-label {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
}
.offer h3 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
  margin-top: 10px;
}
.offer .runtime {
  margin-top: 6px;
  font-size: 14px;
  color: var(--clay-deep);
  letter-spacing: 0.3px;
  font-weight: 500;
}
.embed {
  margin-top: 22px;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  overflow: hidden;
  background: #1A1512;
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* click-to-play facade — poster frame until someone actually wants the player */
.embed-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.embed-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(26,21,18,0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease);
}
.embed-play:hover { background: rgba(26,21,18,0.34); }
.embed-play-mark {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(254,253,251,0.92);
  position: relative;
  transition: transform 0.3s var(--ease);
}
.embed-play:hover .embed-play-mark { transform: scale(1.06); }
.embed-play-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--rust);
}
.offer p { margin-top: 18px; }
.offer p:first-of-type { margin-top: 20px; }

/* ── Doors: playlist + app ── */
.door {
  margin-top: 52px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.door .door-label {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--clay-deep);
  font-weight: 600;
}
.door h3 { font-size: 21px; font-weight: 400; margin-top: 10px; line-height: 1.4; }
.door p { margin-top: 14px; }
.door .free-note { font-size: 15px; color: var(--clay-deep); margin-top: 12px; }

/* reference table (the Solfeggio entry). Wide content must scroll inside its
   own container so the page body never scrolls sideways on a phone. */
.table-scroll { margin-top: 28px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hz-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 16px; }
.hz-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--clay-deep);
  font-weight: 600;
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--border);
}
.hz-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.hz-table td:first-child { white-space: nowrap; color: var(--rust); }
.hz-table tr:last-child td { border-bottom: 0; }

/* named tracks inside a door, used while playlists are still unlisted */
.track-list { list-style: none; margin-top: 18px; }
.track-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.track-list li:last-child { border-bottom: 0; padding-bottom: 4px; }
.track-list li a { font-size: 18px; font-weight: 500; color: var(--text); border-bottom: 1px solid rgba(167,105,81,0.35); }
.track-list li a:hover { color: var(--rust); border-bottom-color: var(--rust); }
.track-list li span { display: block; font-size: 15px; color: var(--clay-deep); margin-top: 3px; line-height: 1.5; }

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 26px;
  border-radius: 24px;
  background: var(--text);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  border: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.18); border: 0; }
.btn.rust { background: var(--rust); }

/* ── Closing ── */
.closing { margin-top: 64px; padding-top: 44px; border-top: 1px solid var(--border); }
.closing p { font-size: 20px; line-height: 1.65; }

.signoff {
  margin-top: 56px;
  text-align: center;
  font-size: 14px;
  color: var(--clay-deep);
  letter-spacing: 0.4px;
}

/* ── Keep reading ── */
.siblings { margin-top: 72px; padding-top: 44px; border-top: 1px solid var(--border); }
.siblings .siblings-label {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--clay-deep);
  font-weight: 600;
}
.siblings ul { list-style: none; margin-top: 18px; }
.siblings li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.siblings li a { font-size: 19px; color: var(--text); border: 0; }
.siblings li a:hover { color: var(--rust); border: 0; }
.siblings li span { display: block; font-size: 15px; color: var(--clay-deep); margin-top: 2px; }

/* ── Footer ── */
footer {
  margin-top: 88px;
  padding: 48px 32px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
}
footer .follow-label {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}
footer .social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
footer .social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid #000;
  border-radius: 24px;
  background: #000;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
footer .social-link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.22); }
footer .social-link svg { width: 22px; height: 22px; }
footer .social-link[aria-label*="Instagram"] svg { fill: #E1306C; }
footer .social-link[aria-label*="YouTube"] svg { fill: #FF0000; }
footer .copy { font-size: 13px; margin-top: 24px; font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 640px) {
  html, body { font-size: 17px; }
  .topbar { padding: 18px 22px; }
  .topbar .mark { font-size: 13px; letter-spacing: 0.34em; }
  .topbar nav { gap: 18px; }
  .topbar nav a { font-size: 13px; }
  .wrap { padding: 0 24px; }
  .house-hero { padding: 60px 24px 48px; }
  .house-hero h1 { font-size: 38px; }
  .house-hero p { font-size: 17px; }
  article { padding: 52px 0 32px; }
  article h1 { font-size: 34px; }
  article h2 { font-size: 23px; margin-top: 52px; }
  .capsule { padding: 24px 22px; }
  .capsule p { font-size: 18px; }
  .offer, .door { padding: 26px 22px; }
  .entry-link h2 { font-size: 23px; }
}
