/* ==========================================================================
   Solomon's Purse --- design system
   Warm paper, charcoal ink, a single restrained sealing-wax accent.
   Inscriptional serif for display, a legible system sans for text.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Colour --- paper, ink and one wax-seal accent */
  --paper:        #f3ede1;
  --paper-raised: #efe6d6;
  --panel:        #e9e0cd;
  --ink:          #201d18;
  --ink-soft:     #57514a;
  --ink-faint:    #655e53;
  --rule:         #d6cbb4;
  --rule-strong:  #c3b699;
  --seal:         #7c2d2a;
  --seal-deep:    #5e211f;
  /* Antique gold --- warmed to the medal; used sparingly for hairlines,
     ornament and illumination */
  --gold:         #a37f34;
  --gold-soft:    #ccb079;
  --gold-deep:    #6f571f;
  /* Surfaces that keep their character in both themes: the primary action
     and the ink band of the principle */
  --action:       var(--seal);
  --action-hover: var(--seal-deep);
  --band:         var(--ink);
  --band-ink:     var(--paper);

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Square Hebrew, book-weight serif where available; falls back gracefully */
  --hebrew: "Frank Ruehl CLM", "Taamey Frank CLM", "SBL Hebrew", "Frank Ruehl",
            "New Peninim MT", "Narkisim", "David", "Times New Roman", serif;

  --fs-hero:  clamp(2.5rem, 1.6rem + 4.2vw, 4.4rem);
  --fs-h2:    clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem);
  --fs-h3:    clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  --fs-lead:  clamp(1.12rem, 1.04rem + 0.4vw, 1.3rem);
  --fs-body:  1.0625rem;
  --fs-small: 0.9rem;
  --fs-label: 0.75rem;

  /* Space */
  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4.5rem;
  --s-8: 7rem;

  /* Measure / widths */
  --container: 66rem;
  --container-narrow: 44rem;
  --measure: 40rem;

  --border: 1px solid var(--rule);
}

/* Dark theme: the same tokens recast for low light --- night paper, parchment
   ink, a lighter wax and brighter gold. The page head sets data-theme before
   first paint; without JavaScript the site stays light. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --paper:        #15120e;
  --paper-raised: #1a1611;
  --panel:        #1e1913;
  --ink:          #ece4d4;
  --ink-soft:     #c4baa8;
  --ink-faint:    #9d927f;
  --rule:         #362e24;
  --rule-strong:  #4e4335;
  --seal:         #de8a7e;
  --seal-deep:    #eba79d;
  --gold:         #c9a65e;
  --gold-soft:    #6f5d36;
  --action:       #c9a65e;
  --action-hover: #dcbf82;
  --band:         #0c0a07;
  --band-ink:     #ece4d4;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  border-top: 3px solid var(--gold);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-feature-settings: "kern", "liga", "onum";
}

p {
  max-width: var(--measure);
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  font-weight: 700;
}

hr {
  border: 0;
  border-top: var(--border);
  margin: var(--s-6) 0;
}

::selection {
  background: var(--seal);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(3.25rem, 7vw, var(--s-8));
}

.section + .section {
  border-top: var(--border);
}

.section--panel {
  background: var(--paper-raised);
}

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -3.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-2) var(--s-3);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--s-3);
}

/* --------------------------------------------------------------------------
   Eyebrows, rules and section headings
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--seal);
  margin: 0 0 var(--s-3);
}

.section-title {
  font-size: var(--fs-h2);
  max-width: 20ch;
  margin: 0 0 var(--s-4);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 34rem;
}

.measure > * + * {
  margin-top: var(--s-4);
}

/* --------------------------------------------------------------------------
   Buttons --- the primary action is the wax seal
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 0.95em 1.6em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease;
}

.btn--primary {
  background: var(--action);
  color: var(--paper);
  border-color: var(--action);
}

.btn--primary:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

/* --------------------------------------------------------------------------
   Site header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--gold-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto; /* keep the header's controls together on the right */
  color: var(--ink);
}

.brand__logo {
  width: 2.75rem;
  height: auto;
  flex: none;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.nav__link {
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link.is-active {
  color: var(--ink);
  border-bottom-color: var(--seal);
}

/* Light / dark switch; it needs JavaScript, so it is hidden without it */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--gold);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__sun,
:root[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__sun {
  display: block;
}

.no-js .theme-toggle {
  display: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule-strong);
  width: 2.75rem;
  height: 2.5rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--ink);
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bars::before { transform: translateY(-6px); }
.nav-toggle__bars::after  { transform: translateY(4.5px); }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: rotate(-45deg); }

@media (max-width: 46rem) {
  .nav-toggle {
    display: inline-flex;
    order: 1; /* the menu button sits rightmost, after the theme switch */
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: var(--border);
    padding: var(--s-2) clamp(1.25rem, 5vw, 3rem) var(--s-4);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding-block: var(--s-3);
    border-bottom: var(--border);
  }

  .nav__link.is-active {
    border-bottom-color: var(--rule);
    color: var(--seal);
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(3.5rem, 9vw, 8rem);
}

.hero__logo {
  width: clamp(5.5rem, 13vw, 8.5rem);
  height: auto;
  margin: 0 auto var(--s-4);
  display: block;
}

.hero__title {
  max-width: 24ch;
  margin-inline: auto;
}

.hero__title-he {
  display: block;
  font-family: var(--hebrew);
  font-weight: 600;
  font-size: clamp(3.25rem, 2.2rem + 6vw, 6.5rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: var(--s-3);
}

.hero__title-en {
  display: block;
  font-size: clamp(2.2rem, 1.5rem + 3.2vw, 3.7rem);
  line-height: 1.08;
}

/* Paragraphs are capped at reading width; centre the capped box in the hero */
.hero .eyebrow {
  margin-inline: auto;
}

.hero__lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 40rem;
  margin: var(--s-4) auto 0;
}

.hero .btn-row {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Interior page header + statement callout
   -------------------------------------------------------------------------- */

.page-header {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
  border-bottom: var(--border);
}

.page-header__title {
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.2rem);
  line-height: 1.08;
  max-width: 18ch;
  margin-bottom: var(--s-4);
}

.page-header__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-top: var(--s-3);
  background: var(--gold);
}

.page-header__lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 42rem;
}

.statement {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem);
  line-height: 1.32;
  max-width: 24ch;
}

.statement--center {
  margin-inline: auto;
  text-align: center;
}

.statement .sep {
  color: var(--seal);
}

/* --------------------------------------------------------------------------
   Prose / rich text
   -------------------------------------------------------------------------- */

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: var(--s-4);
}

.prose h2 {
  font-size: var(--fs-h2);
  margin-top: var(--s-6);
}

.prose h3 {
  font-size: var(--fs-h3);
  margin-top: var(--s-5);
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.18em;
  transition: text-decoration-color 0.15s ease;
}

.prose a:hover {
  text-decoration-color: var(--seal);
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
  max-width: var(--measure);
}

.prose li {
  margin-top: var(--s-1);
}

.prose li::marker {
  color: var(--seal);
}

/* --------------------------------------------------------------------------
   Feature grid + numbered steps
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 40rem) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.feature__title {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  margin-bottom: var(--s-2);
}

.feature p {
  color: var(--ink-soft);
  max-width: 32ch;
}

.step {
  padding-top: var(--s-3);
  border-top: 2px solid var(--ink);
}

.step__num {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--seal);
  display: block;
  margin-bottom: var(--s-3);
}

.step__title {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  margin-bottom: var(--s-2);
}

.step p {
  color: var(--ink-soft);
}

/* value list (why it exists) */
.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding: 0;
  margin: 0;
  max-width: none;
}

/* Keep at least a line of air around an intro lead: from the prose before it,
   and from the list or grid it introduces */
.prose + .lead,
.lead + .tokens,
.lead + .who,
.lead + .grid {
  margin-top: var(--s-6);
}

.tokens li {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  color: var(--ink);
  padding-right: var(--s-4);
  border-right: var(--border);
}

.tokens li:last-child {
  border-right: 0;
}

/* --------------------------------------------------------------------------
   Membership --- applicant grid + fee
   -------------------------------------------------------------------------- */

.who {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2) var(--s-5);
  padding: 0;
  margin: 0;
  max-width: 40rem;
}

@media (min-width: 34rem) {
  .who { grid-template-columns: 1fr 1fr; }
}

.who li {
  position: relative;
  padding-left: 1.4em;
  color: var(--ink);
}

.who li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.5em;
  height: 0.5em;
  background: var(--seal);
}

.fee-amount {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 1.8rem + 3vw, 4rem);
  line-height: 1;
  margin-bottom: var(--s-4);
}

.fee-amount span {
  font-size: 0.35em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   The principle --- prominent statement
   -------------------------------------------------------------------------- */

.principle {
  background: var(--band);
  color: var(--band-ink);
  text-align: center;
}

.principle__ornament {
  margin: 0 auto var(--s-5);
}

.principle__text {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.9rem);
  line-height: 1.28;
  max-width: 18ch;
  margin-inline: auto;
}

.principle__text .sep {
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Hebraic type, ornament, epigraph, inlay --- illuminated, noble detailing
   -------------------------------------------------------------------------- */

.hebrew,
[lang="he"] {
  font-family: var(--hebrew);
  font-weight: 600;
}

/* Engraved divider, tuned to sit with the seal */
.ornament {
  display: block;
  width: clamp(9rem, 22vw, 13rem);
  height: auto;
  margin: var(--s-4) auto;
  color: var(--gold);
}

.hero__ornament {
  margin-block: var(--s-5) var(--s-4);
}

/* Illuminated initial */
.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.78;
  padding-right: 0.09em;
  margin-top: 0.06em;
  color: var(--seal);
  font-weight: 600;
}

/* Inlay --- a passage set apart as in a fine old book: engraved headpiece,
   opening words in capitals, a cul-de-lampe tailpiece; no box */
.inlay {
  margin: var(--s-6) auto;
  text-align: center;
}

.inlay__head,
.inlay__tail {
  display: block;
  height: auto;
  margin-inline: auto;
  color: var(--gold);
}

.inlay__head {
  width: min(24rem, 100%);
  margin-bottom: var(--s-4);
}

.inlay__tail {
  width: 5.5rem;
  margin-top: var(--s-4);
}

.inlay__text {
  max-width: 30ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem);
  line-height: 1.36;
  text-wrap: balance;
}

.inlay__lead {
  font-size: 0.8em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Epigraph --- a quotation set apart */
.epigraph {
  max-width: 46rem;
  margin: var(--s-6) 0 0;
  padding-left: var(--s-4);
  border-left: 2px solid var(--gold-soft);
}

.epigraph__quote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
}

.epigraph__quote p {
  max-width: none;
}

.epigraph__quote p + p {
  margin-top: var(--s-3);
}

.epigraph__cite {
  margin-top: var(--s-3);
  font-family: var(--sans);
  font-style: normal;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.epigraph__cite::before {
  content: "\2014\00a0";
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Journal --- entry list, meta, tags
   -------------------------------------------------------------------------- */

.entry-list {
  border-top: var(--border);
  max-width: 52rem;
}

.entry {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--s-2) var(--s-5);
  padding-block: var(--s-5);
  border-bottom: var(--border);
}

.entry__date {
  font-family: var(--sans);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  padding-top: 0.35rem;
}

.entry__title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.8rem);
  line-height: 1.2;
  margin-bottom: var(--s-2);
}

.entry__title a {
  transition: color 0.15s ease;
}

.entry__title a:hover {
  color: var(--seal);
}

.entry__summary {
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}

@media (max-width: 34rem) {
  .entry {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
  .entry__date { padding-top: 0; }
}

/* tag chips */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 0;
  margin: 0;
}

.tag {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.35em 0.7em;
  border: var(--border);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tag:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.tags--cloud {
  gap: var(--s-2) var(--s-3);
}

.tag__count {
  margin-left: 0.5em;
  color: var(--ink-faint);
}

.journal-tags {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: var(--border);
}

.back-to-journal {
  margin-top: var(--s-5);
}

/* --------------------------------------------------------------------------
   Article (single journal post)
   -------------------------------------------------------------------------- */

.article {
  max-width: var(--measure);
  margin-inline: auto;
}

.article__header {
  margin-bottom: var(--s-6);
}

.article__meta {
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: var(--s-3);
}

.article__title {
  font-size: var(--fs-h2);
  margin-bottom: var(--s-4);
}

.article__body > * + * {
  margin-top: var(--s-4);
}

.article__body h2 {
  font-size: var(--fs-h3);
  margin-top: var(--s-6);
}

.article__body a {
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.18em;
}

.article__body a:hover {
  text-decoration-color: var(--seal);
}

.article__body q {
  font-style: italic;
}

.article__footer {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.back-link {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.back-link:hover {
  color: var(--seal);
}

/* --------------------------------------------------------------------------
   Bible quote (Skryba <bible-quote>)
   -------------------------------------------------------------------------- */

.skryba-bible-quote {
  display: block;
  font-family: var(--serif);
  font-size: var(--fs-lead);
  line-height: 1.6;
  padding-left: var(--s-4);
  border-left: 2px solid var(--seal);
  margin-block: var(--s-5);
}

.skryba-verse {
  display: block;
}

.skryba-verse .skryba-number {
  color: var(--seal);
  font-size: 0.7em;
  vertical-align: super;
  margin-right: 0.35em;
}

.skryba-bible-ref {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--sans);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.skryba-bible-ref .skryba-range::before { content: " \00b7 "; }
.skryba-bible-ref .skryba-edition::before { content: " \00b7 "; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-block {
  margin-top: var(--s-6);
}

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 1.2vw, 1.9rem);
  color: var(--seal);
  word-break: break-word;
}

.contact-email:hover {
  color: var(--seal-deep);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact-note {
  font-size: var(--fs-small);
  color: var(--ink-faint);
  margin-top: var(--s-2);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--panel);
  border-top: var(--border);
  padding-block: var(--s-6);
  margin-top: var(--s-7);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  align-items: baseline;
  justify-content: space-between;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.site-footer__logo {
  width: 1.9rem;
  height: auto;
  flex: none;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding: 0;
  margin: 0;
}

.footer-nav a {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.footer-nav a:hover {
  color: var(--ink);
}

/* LinkedIn's official icon, unaltered as their brand rules require: the black
   version in the light theme, the white one in the dark theme */
.footer-nav__linkedin {
  align-self: center;
  display: inline-flex;
}

.footer-nav__linkedin img {
  width: auto;
  height: 1.25rem;
}

.footer-nav__linkedin-dark,
:root[data-theme="dark"] .footer-nav__linkedin-light {
  display: none;
}

:root[data-theme="dark"] .footer-nav__linkedin-dark {
  display: block;
}

.site-footer__fine {
  flex-basis: 100%;
  font-size: var(--fs-small);
  color: var(--ink-faint);
  margin-top: var(--s-2);
}

/* --------------------------------------------------------------------------
   Focus + motion
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

/* Scroll reveal --- only hide when JS is active, so no-JS shows everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
