/**
 * Stone Soup Home Page — eighteenth-century contents register
 * with Orphist spectrum lettering.
 *
 * The page is a title page + table of contents in classical book
 * typography. Display text (wordmark, Contents heading, section
 * headings, contents-register links, featured entries) is set
 * per-letter through a 9-point Orphist spectrum — see js/spectrum
 * inline at the bottom of page-stone-soup-home.php.
 *
 * The GP global header (#masthead) is hidden on this template only;
 * the homepage carries its own banner inside the white paper.
 *
 * Tokens referenced from style.css :root:
 *   --orphist-1 .. --orphist-9   (Orphist spectrum)
 *   --stonesoup-vermillion       (brand red, also = orphist-1)
 *   --stonesoup-deep-red         (featured-entry rubric)
 *   --stonesoup-text-dark/medium/light/rule
 *   --stonesoup-linen / --stonesoup-page / --stonesoup-page-width
 *   --stonesoup-font-display / --stonesoup-font-reading
 *
 * Scoped to body.page-template-page-stone-soup-home — specificity only,
 * no !important.
 *
 * @package StoneSoup
 * @version 5.9.0
 */

/* === 1. SCOPE — PAGE CANVAS ============================================= */

body.page-template-page-stone-soup-home {
  background: var(--stonesoup-linen);
  color: var(--stonesoup-text-dark);
  font-family: var(--stonesoup-font-reading);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove GP wrappers on this template only — full-width transparent so the
   linen body background shows through everywhere except the white paper. */
body.page-template-page-stone-soup-home #page,
body.page-template-page-stone-soup-home #content,
body.page-template-page-stone-soup-home .site-content,
body.page-template-page-stone-soup-home .content-area,
body.page-template-page-stone-soup-home .site-main,
body.page-template-page-stone-soup-home .inside-article,
body.page-template-page-stone-soup-home .entry-content {
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: none;
}

body.page-template-page-stone-soup-home .entry-header,
body.page-template-page-stone-soup-home .page-header {
  display: none;
}

body.page-template-page-stone-soup-home .stonesoup-tagline {
  text-indent: 0;
}

/* === 2. PAPER (the white page) ========================================== */

/* Paper-on-linen — fixed 7.2in × 10.8in trim (6×9 +20%) defined by the
   global token, with Tschichold canon margins scaled ×1.20. The home
   matches every interior page; the book stays a book. */
.stone-soup-page {
  background: var(--stonesoup-page);
  width: var(--stonesoup-page-width);
  margin: 0 auto;
  padding: var(--book-pad-head) var(--book-pad-fore-edge) var(--book-pad-foot) var(--book-pad-gutter);
  box-shadow: var(--stonesoup-page-shadow);
  font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* === 3. TITLE PAGE BANNER (inside the paper) ============================ */

/* The banner sits at the top of the white page. Closing rule below it
   marks the end of the title page; the Contents heading comes next. */
body.page-template-page-stone-soup-home .stonesoup-header-main {
  background: transparent;
  text-align: center;
  padding: 0 0 2.5rem;
  border-bottom: 1px solid var(--stonesoup-text-light);
}
body.page-template-page-stone-soup-home .stonesoup-banner-block {
  width: fit-content;
  margin: 0 auto;
}

body.page-template-page-stone-soup-home .stonesoup-site-title {
  font-family: var(--stonesoup-font-display);
  font-size: 3.4rem;
  font-weight: 600;
  margin: 0;
  padding-left: 0.22em; /* optical centering — match the tracked-caps offset */
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}

body.page-template-page-stone-soup-home .stonesoup-tagline {
  font-family: var(--stonesoup-font-reading);
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--stonesoup-text-dark);
  letter-spacing: 0;
  margin: 1rem 0 0;
}

body.page-template-page-stone-soup-home .stonesoup-since {
  display: block;
  font-family: var(--stonesoup-font-reading);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: var(--stonesoup-text-medium);
  letter-spacing: 0;
  margin: 0.4rem 0 0;
  text-transform: none;
}

/* === 4. CONTENTS HEADING ================================================ */

.stone-soup-contents-heading {
  font-family: var(--stonesoup-font-display);
  font-weight: 400;
  font-size: 2.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  margin: 1.25rem 0 1.5rem;
  padding: 0 0 0 0.22em; /* optical centering — match tracked-caps offset */
}

/* === 5. CONTENTS REGISTER (the index) =================================== */

html { scroll-behavior: smooth; }

.stone-soup-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--stonesoup-font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stonesoup-text-dark);
  margin: 0 0 3rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--stonesoup-text-light);
}

body.page-template-page-stone-soup-home .stone-soup-index a {
  color: inherit;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s;
}
body.page-template-page-stone-soup-home .stone-soup-index a:hover {
  opacity: 0.7;
}

/* Anchor landing offset — keep a little breathing room above the heading */
.stone-soup-page section {
  scroll-margin-top: 2rem;
}

/* === 6. SECTIONS ======================================================== */

.stone-soup-page section {
  margin-bottom: 3.25rem;
}

.stone-soup-page section h2 {
  font-family: var(--stonesoup-font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 1.1rem;
  padding: 0 0 0.45rem 0.2em; /* trailing tracking offset for optical centering */
  border-bottom: 1px solid var(--stonesoup-text-rule);
}

/* === 7. ORPHIST SPECTRUM CLASSES (per-letter colour wrapping) =========== */

/* The inline spectrum script in the template wraps each letter of the
   wordmark, Contents heading, section headings, contents-register links,
   and featured entries in spec-N spans. */
.spec-1 { color: var(--orphist-1); }
.spec-2 { color: var(--orphist-2); }
.spec-3 { color: var(--orphist-3); }
.spec-4 { color: var(--orphist-4); }
.spec-5 { color: var(--orphist-5); }
.spec-6 { color: var(--orphist-6); }
.spec-7 { color: var(--orphist-7); }
.spec-8 { color: var(--orphist-8); }
.spec-9 { color: var(--orphist-9); }

/* === 8. ENTRIES WITH DOTTED LEADERS ===================================== */

.stone-soup-entries {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stone-soup-entries li {
  display: flex;
  align-items: baseline;
  padding: 0.32rem 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

body.page-template-page-stone-soup-home .stone-soup-entries .stone-soup-title {
  font-family: var(--stonesoup-font-reading);
  font-weight: 400;
  color: var(--stonesoup-text-dark);
  text-decoration: none;
  white-space: nowrap;
  padding-right: 0.5rem;
  transition: opacity 0.2s;
}
body.page-template-page-stone-soup-home .stone-soup-entries .stone-soup-title:hover {
  opacity: 0.7;
}

.stone-soup-leader {
  flex: 1;
  border-bottom: 1px dotted var(--stonesoup-text-rule);
  margin: 0 0.4rem;
  transform: translateY(-0.28em);
  min-width: 1.5rem;
}

.stone-soup-descriptor {
  font-family: var(--stonesoup-font-reading);
  font-style: italic;
  color: var(--stonesoup-text-medium);
  font-size: 0.92rem;
  text-align: right;
  white-space: nowrap;
  padding-left: 0.5rem;
}

/* Featured entries — small-caps emphasis. The Orphist spectrum script
   colours each letter; the parent colour rule below is harmless once
   spans contain all visible text. */
body.page-template-page-stone-soup-home .stone-soup-entries li.stone-soup-featured .stone-soup-title {
  color: var(--stonesoup-deep-red);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

/* Group-break rows — visual breathing space */
.stone-soup-entries li.stone-soup-group-break {
  height: 0.35rem;
  padding: 0;
}

/* Admin-only missing-menu placeholder */
.stone-soup-menu-missing {
  padding: 0.8rem 1rem;
  background: var(--stonesoup-filter-tint);
  border-left: 3px solid var(--stonesoup-vermillion);
  font-size: 0.92rem;
  color: var(--stonesoup-text-medium);
}

/* === 9. FOOTER ========================================================== */

.stone-soup-footer {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--stonesoup-text-rule);
  font-family: var(--stonesoup-font-reading);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--stonesoup-text-light);
  line-height: 1.7;
}

.stone-soup-device-foot {
  font-family: var(--stonesoup-font-display);
  font-size: 1.05rem;
  letter-spacing: 0.5em;
  margin-bottom: 1rem;
}

.stone-soup-footer-links {
  margin-top: 0.8rem;
}

body.page-template-page-stone-soup-home .stone-soup-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--stonesoup-text-light);
}
body.page-template-page-stone-soup-home .stone-soup-footer a:hover {
  color: var(--stonesoup-vermillion);
}

/* === 10. RESPONSIVE ===================================================== */

@media (max-width: 1024px) {
  .stone-soup-page {
    width: auto;
    margin-left: 3vw;
    margin-right: 3vw;
    padding: 3rem 5rem 4.5rem 3.5rem;
  }
  body.page-template-page-stone-soup-home .stonesoup-site-title { font-size: 3.8rem; }
}

@media (max-width: 768px) {
  body.page-template-page-stone-soup-home {
    font-size: 16px;
  }
  .stone-soup-page {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 2rem 1.5rem;
    box-shadow: none;
  }
  body.page-template-page-stone-soup-home .stonesoup-header-main { padding-bottom: 1.75rem; }
  body.page-template-page-stone-soup-home .stonesoup-site-title {
    font-size: 2.4rem;
    letter-spacing: 0.22em;
  }
  body.page-template-page-stone-soup-home .stonesoup-tagline { font-size: 1.05rem; }
  body.page-template-page-stone-soup-home .stonesoup-since { font-size: 0.92rem; }
  .stone-soup-contents-heading { font-size: 1.7rem; margin: 0.9rem 0 0.9rem; }
  .stone-soup-index {
    font-size: 0.82rem;
    gap: 0.45rem;
  }
  .stone-soup-entries li {
    flex-wrap: wrap;
    padding: 0.5rem 0;
  }
  .stone-soup-leader {
    display: none;
  }
  .stone-soup-descriptor {
    flex-basis: 100%;
    text-align: left;
    padding-left: 0;
    margin-top: 0.1rem;
    font-size: 0.88rem;
  }
  .stone-soup-page section h2 {
    font-size: 1.2rem;
    letter-spacing: 0.18em;
  }
}
