.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.page-progress .bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--rule);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 120ms linear;
}

.mini-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--pad-outer-y) var(--pad-outer-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(243,241,236,0.78), rgba(243,241,236,0));
  mix-blend-mode: normal;
}
.mini-nav .mn-left,
.mini-nav .mn-right {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mn-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ink);
  display: inline-block;
  transform: translateY(-0.5px);
}
.mn-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg);
}
.mn-index {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
  cursor: pointer;
}
.mn-index .mn-idx {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.mn-index .mn-idx-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}
.mn-index:hover {
  color: var(--fg);
}
.mn-index.is-active {
  color: var(--ink);
  background: rgba(23,23,20,0.06);
}
@media (max-width: 430px) {
  .mn-index { width: 22px; height: 22px; }
  .mn-index .mn-idx { font-size: 9.5px; }
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-outer-x);
  padding-right: var(--pad-outer-x);
  padding-top: 56px;
}

section[data-section] {
  padding: clamp(40px, 10vw, 128px) 0;
  position: relative;
}
section[data-section] + section[data-section] {
  border-top: 1px solid var(--rule-soft);
}

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 16px;
  margin-bottom: clamp(20px, 4.5vw, 72px);
}
.sec-head .sec-idx {
  font-size: 13px;
  letter-spacing: 0.26em;
  color: var(--muted);
  align-self: center;
}
.sec-head .sec-title {
  font-size: clamp(28px, 5.0vw, 60px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}
.sec-head .sec-sep {
  display: inline-block;
  align-self: center;
  width: clamp(28px, 5vw, 110px);
  height: 1px;
  background: var(--rule-soft);
}

@media (max-width: 430px) {
  section[data-section] { padding: 32px 0; }
  .sec-head {
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 4px;
    margin-bottom: 16px;
  }
  .sec-head .sec-sep { display: none; }
  .sec-head .sec-idx { font-size: 12px; letter-spacing: 0.22em; }
  .sec-head .sec-title { font-size: 28px; line-height: 1.05; }
  .site-foot { margin-top: 28px; padding-top: 22px; }
}
@media (max-width: 375px) {
  section[data-section] { padding: 26px 0; }
  .sec-head { margin-bottom: 12px; }
  .sec-head .sec-idx { font-size: 11px; }
  .sec-head .sec-title { font-size: 25px; }
}

.site-foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--pad-outer-x) calc(40px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--rule-soft);
  margin-top: clamp(48px, 8vw, 104px);
  flex-wrap: wrap;
}

/* === Section internals spacing helpers === */
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; align-items: center; }
.rule-line {
  height: 1px;
  background: var(--rule-soft);
}
.space-24 { height: 24px; }
.space-32 { height: 32px; }
.space-48 { height: clamp(24px, 5vw, 48px); }
.space-64 { height: clamp(36px, 7vw, 64px); }

/* === Reveal typography motion primitives === */
[data-spatial] .sm-wrap {
  will-change: transform, opacity, font-size, letter-spacing;
}
[data-spatial] .sm-track {
  will-change: transform, width;
}

/* === Generic hover utilities === */
.hover-line {
  position: relative;
}
.hover-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease-out);
}
.hover-line:hover::after,
.hover-line:focus-visible::after {
  transform: scaleX(1);
}
