/* ==========================================================================
   Superior Locksmith — Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.65rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink-950);
}

.btn--primary:hover { background: var(--brand-bright); border-color: var(--brand-bright); }

.btn--ink {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--text-invert);
}

.btn--ink:hover { background: var(--ink-700); border-color: var(--ink-700); }

.btn--outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--outline:hover { border-color: var(--ink-800); background: var(--surface); }

.btn--outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-invert);
}

.btn--outline-light:hover { border-color: var(--brand); color: var(--brand); }

.btn--sm { padding: 0.7rem 1.15rem; font-size: 0.875rem; }
.btn--lg { padding: 1.1rem 2.1rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink-800);
  text-decoration: none;
  transition: gap var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.link-arrow svg { width: 15px; height: 15px; flex: none; }
.link-arrow:hover { gap: 0.75rem; color: var(--ink-950); }

.on-dark .link-arrow, .section--ink .link-arrow { color: var(--brand); }

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs { font-size: var(--fs-small); }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  list-style: none;
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.55rem; }

.breadcrumbs li + li::before {
  content: "";
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.45;
  flex: none;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--t-fast) var(--ease);
}

.breadcrumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.18em; }

.breadcrumbs [aria-current="page"] { font-weight: 600; opacity: 1; }

.breadcrumbs--light { color: var(--text-invert-soft); }
.breadcrumbs--dark { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--ink-900);
  color: var(--text-invert-soft);
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(4, 16, 28, 0.95) 0%, rgba(4, 16, 28, 0.86) 45%, rgba(7, 26, 43, 0.7) 100%);
}

.page-hero--plain::after { background: none; }

.page-hero__inner {
  padding-block: clamp(2.5rem, 1.6rem + 4vw, 5rem);
  max-width: 54rem;
}

.page-hero__inner > * + * { margin-top: var(--sp-4); }

.page-hero h1 { color: var(--text-invert); max-width: 20ch; }
.page-hero--wide h1 { max-width: none; }

.page-hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--text-invert-soft);
  max-width: 62ch;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--sp-6);
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-invert);
  font-size: var(--fs-small);
}

.page-hero__meta > * {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.page-hero__meta svg { width: 15px; height: 15px; color: var(--brand); flex: none; }

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */
.home-hero {
  position: relative;
  isolation: isolate;
  background: var(--ink-950);
  color: var(--text-invert-soft);
  overflow: hidden;
}

.home-hero__bg { position: absolute; inset: 0; z-index: -2; }
.home-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(95deg, rgba(4, 16, 28, 0.96) 0%, rgba(4, 16, 28, 0.9) 38%, rgba(4, 16, 28, 0.55) 72%, rgba(4, 16, 28, 0.4) 100%);
}

.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 1.8rem + 5vw, 6.5rem);
}

.home-hero__copy > * + * { margin-top: var(--sp-5); }

.home-hero h1 {
  font-size: var(--fs-display);
  color: var(--text-invert);
  max-width: 19ch;
}

.home-hero__lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-invert-soft);
  max-width: 54ch;
}

.home-hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.home-hero__points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.75rem;
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line-invert);
  list-style: none;
}

.home-hero__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.home-hero__points svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 0.15rem; }

@media (max-width: 1080px) {
  .home-hero__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .home-hero__points { grid-template-columns: minmax(0, 1fr); }
  .home-hero__actions .btn { width: 100%; }
}

/* On narrow screens a horizontal overlay covers the whole image, so the
   gradient becomes vertical: dark behind the copy, clearer lower down. */
@media (max-width: 720px) {
  .home-hero::after {
    background:
      linear-gradient(180deg, rgba(4, 16, 28, 0.94) 0%, rgba(4, 16, 28, 0.9) 55%, rgba(4, 16, 28, 0.62) 100%);
  }
  .page-hero::after {
    background:
      linear-gradient(180deg, rgba(4, 16, 28, 0.93) 0%, rgba(4, 16, 28, 0.88) 60%, rgba(4, 16, 28, 0.66) 100%);
  }
  .home-hero__bg img,
  .page-hero__bg img { object-position: center 35%; }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}

.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: var(--sp-5);
  background: var(--surface-warm);
  border: 1px solid #F0E3B4;
  border-radius: var(--r-md);
  color: var(--brand-ink);
  flex: none;
}

.card__icon svg { width: 24px; height: 24px; }

.card__tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.9rem;
  padding: 0.28rem 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--surface-warm);
  border-radius: var(--r-xs);
}

.card h3 { margin-bottom: 0.65rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--ink-700); }

.card p { font-size: 0.9688rem; line-height: 1.66; color: var(--text-muted); }

.card__foot { margin-top: auto; padding-top: var(--sp-5); }

/* Card on dark */
.card--dark {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-invert);
}

.card--dark:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.24); }
.card--dark h3 { color: var(--text-invert); }
.card--dark p { color: var(--text-invert-soft); }
.card--dark .card__icon { background: rgba(255, 213, 0, 0.12); border-color: rgba(255, 213, 0, 0.3); color: var(--brand); }

/* Compact link card */
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 1.1rem 1.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.link-card:hover { border-color: var(--brand-deep); background: var(--surface-warm); }

.link-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.012em;
}

.link-card__sub { display: block; margin-top: 0.2rem; font-size: 0.8438rem; color: var(--text-muted); }

.link-card svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.link-card:hover svg { transform: translateX(3px); color: var(--ink-800); }

/* --------------------------------------------------------------------------
   Numbered process steps
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 0; }

.steps--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.step {
  position: relative;
  counter-increment: step;
  padding: var(--sp-6) var(--sp-5) var(--sp-6) 0;
  border-top: 2px solid var(--line);
}

.steps--row .step + .step { padding-left: var(--sp-5); }

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-ink);
}

.step h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.66; }

.section--ink .step, .section--charcoal .step { border-top-color: var(--line-invert); }
.section--ink .step::before, .section--charcoal .step::before { color: var(--brand); }
.section--ink .step p, .section--charcoal .step p { color: var(--text-invert-soft); }

@media (max-width: 900px) {
  .steps--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .steps--row { grid-template-columns: minmax(0, 1fr); }
  .steps--row .step + .step { padding-left: 0; }
}

/* --------------------------------------------------------------------------
   Feature list (checks)
   -------------------------------------------------------------------------- */
.check-list { list-style: none; display: grid; gap: 0.85rem; }

.check-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 1rem;
  line-height: 1.62;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 1.15rem; height: 0.6rem;
  border-left: 2.5px solid var(--brand-deep);
  border-bottom: 2.5px solid var(--brand-deep);
  transform: rotate(-45deg);
}

.section--ink .check-list li::before,
.section--charcoal .check-list li::before { border-color: var(--brand); }

.check-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 2rem; }

@media (max-width: 680px) { .check-list--2 { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   Definition panels (information blocks)
   -------------------------------------------------------------------------- */
.info-panel {
  padding: var(--sp-6);
  background: var(--surface);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.info-panel h3 { font-size: 1.125rem; margin-bottom: 0.6rem; }
.info-panel p { font-size: 0.9688rem; color: var(--text-muted); }

.note-panel {
  padding: 1.25rem 1.5rem;
  background: var(--surface-warm);
  border: 1px solid #F0E3B4;
  border-radius: var(--r-md);
  font-size: 0.9688rem;
  line-height: 1.66;
  color: var(--text-body);
}

.note-panel strong { display: block; margin-bottom: 0.3rem; color: var(--text); }

/* --------------------------------------------------------------------------
   Spec table
   -------------------------------------------------------------------------- */
.spec-table {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper);
}

.spec-table table { font-size: 0.9375rem; }

.spec-table th,
.spec-table td {
  padding: 0.95rem 1.25rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.spec-table thead th {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
}

.spec-table tbody th {
  font-family: var(--font-heading);
  font-weight: 650;
  color: var(--text);
  width: 34%;
}

.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td { border-bottom: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 560px) {
  .spec-table tbody th { width: 42%; }
  .spec-table th, .spec-table td { padding: 0.8rem 0.9rem; font-size: 0.875rem; }
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }

.faq__item { border-bottom: 1px solid var(--line); }

.faq__trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-5);
  width: 100%;
  padding: 1.35rem 0;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--text);
  text-align: left;
}

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

.faq__icon {
  position: relative;
  width: 22px; height: 22px;
  flex: none;
  margin-top: 0.15rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-xs);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-base) var(--ease);
}

.faq__icon::before { width: 10px; height: 1.5px; }
.faq__icon::after { width: 1.5px; height: 10px; }

.faq__trigger[aria-expanded="true"] .faq__icon { border-color: var(--brand-deep); background: var(--brand); }
.faq__trigger[aria-expanded="true"] .faq__icon::after { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }

/* See navigation.css: max-height against a JS-measured --panel-h, so the
   panel opens to its real height and answers stay readable without JS. */
.faq__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--t-base) var(--ease);
}

/* The trigger sits inside the heading, so it is not the panel's sibling.
   JavaScript mirrors the expanded state onto the panel as a class. */
.faq__panel.is-open {
  max-height: var(--panel-h, 100rem);
}

.faq__answer {
  padding-bottom: 1.5rem;
  padding-right: clamp(0rem, 4vw, 3.5rem);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq__answer p + p { margin-top: 0.8em; }

.section--ink .faq, .section--ink .faq__item { border-color: var(--line-invert); }
.section--ink .faq__trigger { color: var(--text-invert); }
.section--ink .faq__answer { color: var(--text-invert-soft); }
.section--ink .faq__icon { border-color: rgba(255, 255, 255, 0.3); }

/* No-JS fallback: panels open so answers remain readable and indexable */
.no-js .faq__panel { max-height: none; }
.no-js .faq__icon { display: none; }

/* --------------------------------------------------------------------------
   Area / link chips
   -------------------------------------------------------------------------- */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.6rem;
  list-style: none;
}

.chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.chip::before {
  content: "";
  width: 6px; height: 6px;
  flex: none;
  background: var(--brand);
  border-radius: 50%;
}

.chip:hover { border-color: var(--brand-deep); background: var(--surface-warm); color: var(--ink-900); }

.section--surface .chip { background: var(--paper); }

.section--ink .chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-invert);
  color: var(--text-invert-soft);
}

.section--ink .chip:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--brand); color: var(--text-invert); }

/* --------------------------------------------------------------------------
   Media
   -------------------------------------------------------------------------- */
.media-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
}

.media-frame img { width: 100%; height: 100%; object-fit: cover; }

.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--wide { aspect-ratio: 16 / 10; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame--accent::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 46%; height: 5px;
  background: var(--brand);
}

figure.media-frame { margin: 0; }

.figure { margin: 0; }
.figure img { border-radius: var(--r-md); }
.figure figcaption {
  margin-top: 0.75rem;
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.55;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--sp-4);
}

.gallery-grid figure {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 3 / 4;
}

.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}

.gallery-grid figure:hover img { transform: scale(1.04); }

/* --------------------------------------------------------------------------
   Contact strip / callout band
   -------------------------------------------------------------------------- */
.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-6);
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  background: var(--ink-900);
  color: var(--text-invert-soft);
  border-radius: var(--r-lg);
}

.callout h2 { color: var(--text-invert); font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem); }
.callout p { margin-top: 0.5rem; max-width: 56ch; }
.callout__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.callout--brand {
  background: var(--brand);
  color: var(--ink-800);
}

.callout--brand h2 { color: var(--ink-950); }

@media (max-width: 820px) {
  .callout { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   Article / prose
   -------------------------------------------------------------------------- */
.prose { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-body); }

.prose > * + * { margin-top: 1.15rem; }

.prose h2 {
  margin-top: 2.75rem;
  padding-top: 0.25rem;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.95rem);
}

.prose h3 { margin-top: 2rem; font-size: 1.3125rem; }
.prose h4 { margin-top: 1.6rem; }

.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.85rem; }

.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.5rem; }
.prose li::marker { color: var(--brand-deep); }
.prose ul li::marker { font-size: 1.1em; }

.prose blockquote {
  margin-block: 1.75rem;
  padding: 0.35rem 0 0.35rem 1.5rem;
  border-left: 3px solid var(--brand);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
}

.prose img { border-radius: var(--r-md); margin-block: 1.75rem; }

.prose hr { margin-block: 2.5rem; border: 0; border-top: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Table of contents (sticky rail)
   -------------------------------------------------------------------------- */
.toc {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.toc h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 0.15rem; }

.toc a {
  display: block;
  counter-increment: toc;
  padding: 0.45rem 0.6rem 0.45rem 2rem;
  position: relative;
  font-size: 0.9063rem;
  line-height: 1.45;
  color: var(--text-body);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.toc a:hover { background: var(--paper); color: var(--ink-900); }
.toc a:hover::before { color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   Post cards
   -------------------------------------------------------------------------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.post-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }

.post-card__media { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.035); }

.post-card__body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }

.post-card__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.post-card__meta a { color: var(--brand-ink); text-decoration: none; font-weight: 600; }
.post-card__meta a:hover { text-decoration: underline; }

.post-card h3 { font-size: 1.1875rem; margin-bottom: 0.55rem; }
.post-card h3 a { text-decoration: none; }
.post-card p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.64; }
.post-card__foot { margin-top: auto; padding-top: var(--sp-5); }

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
}

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

/* Without JavaScript nothing may stay hidden. */
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--ink-900);
  color: var(--text-invert);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility var(--t-base);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand); color: var(--ink-950); }
.to-top svg { width: 18px; height: 18px; }
