/* ==========================================================================
   AG服务 · 共享站点样式 /assets/site.css
   档案书脊 + 编号框架 + 矿物色体系
   ========================================================================== */

/* 1. reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, hr {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
hr { border: 0; }

/* 2. tokens --------------------------------------------------------------- */
:root {
  --ag-green: #1F6F5C;
  --ag-deep: #123C33;
  --ag-moss: #6E8B5B;
  --ag-sand: #B98A5A;
  --ag-clay: #A65E44;
  --ag-stone: #5C6662;
  --ag-cream: #F4EFE6;
  --ag-mist: #E2E6DF;
  --ag-signal: #C85F1A;
  --ag-ink: #0F2A24;
  --ag-body: #1B2B26;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  --rail-w: 224px;
  --frame-top-h: 68px;
  --maxw: 1320px;
  --line: rgba(18, 60, 51, 0.16);
  --line-strong: rgba(18, 60, 51, 0.32);
  --chamfer: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

/* 3. base typography ------------------------------------------------------ */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: clamp(16px, 0.35vw + 14.4px, 17px);
  font-weight: 400;
  line-height: 1.9;
  color: var(--ag-body);
  background-color: var(--ag-cream);
  background-image:
    radial-gradient(70ch 40ch at 88% -6%, rgba(31, 111, 92, 0.10), transparent 62%),
    radial-gradient(60ch 40ch at 4% 104%, rgba(185, 138, 90, 0.16), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  text-underline-offset: 3px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--ag-deep);
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.4; }

::selection { background: rgba(200, 95, 26, 0.24); color: var(--ag-ink); }

:focus-visible {
  outline: 2px solid var(--ag-signal);
  outline-offset: 3px;
  border-radius: 2px;
}

html.is-nav-open { overflow: hidden; }

/* 4. page components ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 56px);
}
.container--wide { max-width: 1440px; }

.section { padding-block: clamp(44px, 6vw, 84px); }
.section--wide { padding-block: clamp(64px, 9vw, 132px); }
.section--narrow { padding-block: clamp(28px, 4vw, 56px); }
.section--mist { background: var(--ag-mist); }
.section--ink {
  background: var(--ag-deep);
  color: rgba(244, 239, 230, 0.88);
}
.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4 { color: var(--ag-cream); }
.section--ink .lead,
.section--ink .prose { color: rgba(244, 239, 230, 0.82); }
.section--ink .prose strong { color: var(--ag-cream); }
.section--ink .prose li::before { background: var(--ag-sand); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ag-green);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--ag-signal);
  transform: skewX(-24deg);
}

.display {
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ag-deep);
  text-wrap: balance;
}
.display--sm {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.18;
}

.lead {
  max-width: 60ch;
  font-size: clamp(16.5px, 1.3vw, 19px);
  line-height: 1.85;
  color: #2C3A35;
}

.prose {
  max-width: 68ch;
  font-size: clamp(16px, 1.1vw, 17.5px);
  line-height: 1.9;
  color: #243430;
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { display: flex; flex-direction: column; gap: 0.5em; }
.prose li { position: relative; padding-left: 20px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 2px;
  background: var(--ag-moss);
  transform: skewX(-24deg);
}
.prose strong { color: var(--ag-deep); font-weight: 700; }
.prose a {
  color: var(--ag-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(31, 111, 92, 0.42);
}
.prose a:hover { text-decoration-color: var(--ag-green); }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.index-num {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ag-green);
  background: rgba(31, 111, 92, 0.07);
  border: 1px solid rgba(31, 111, 92, 0.32);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.timestamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ag-stone);
}
.timestamp::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--ag-sand);
  transform: rotate(45deg);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  border-radius: 2px;
}
.tag--version {
  color: #7E432F;
  background: rgba(166, 94, 68, 0.14);
  border-color: rgba(166, 94, 68, 0.45);
}
.tag--status {
  color: #42552F;
  background: rgba(110, 139, 91, 0.18);
  border-color: rgba(110, 139, 91, 0.5);
}
.tag--signal {
  color: #8A3F0F;
  background: rgba(200, 95, 26, 0.14);
  border-color: rgba(200, 95, 26, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: var(--chamfer);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn--primary { background: var(--ag-green); color: var(--ag-cream); }
.btn--primary:hover { background: var(--ag-deep); }
.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ag-deep);
}
.btn--ghost:hover { background: var(--ag-mist); border-color: var(--ag-green); }
.btn--signal { background: var(--ag-signal); color: #FFF8EF; }
.btn--signal:hover { background: var(--ag-clay); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--ag-signal);
}

.cut-panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--ag-cream);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -40px rgba(15, 42, 36, 0.7);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.cut-panel--mist { background: var(--ag-mist); }
.cut-panel--ink {
  background: var(--ag-deep);
  border-color: rgba(244, 239, 230, 0.18);
  color: rgba(244, 239, 230, 0.86);
}
.cut-panel--ink h2,
.cut-panel--ink h3,
.cut-panel--ink h4 { color: var(--ag-cream); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--7-5,
.grid--8-4,
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) {
  .grid--7-5 { grid-template-columns: 7fr 5fr; }
  .grid--8-4 { grid-template-columns: 8fr 4fr; }
}

.breadcrumb { padding-block: clamp(14px, 2vw, 22px); font-size: 13px; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ag-stone);
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--ag-sand);
}
.breadcrumb__link { color: var(--ag-green); text-decoration: none; }
.breadcrumb__link:hover { text-decoration: underline; }
.breadcrumb__current { color: var(--ag-deep); }

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--ag-mist);
  background-image:
    linear-gradient(135deg, rgba(31, 111, 92, 0.16), rgba(226, 230, 223, 0.5) 45%, rgba(185, 138, 90, 0.22)),
    repeating-linear-gradient(120deg, rgba(18, 60, 51, 0.10) 0 1px, transparent 1px 14px);
}
.media-frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 56px;
  background: repeating-linear-gradient(90deg, rgba(18, 60, 51, 0.35) 0 1px, transparent 1px 6px);
  opacity: 0.5;
  pointer-events: none;
}
.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }

.media-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ag-stone);
}

.divider-diagonal {
  height: 1px;
  margin-block: clamp(28px, 4vw, 48px);
  background: linear-gradient(90deg, var(--ag-moss) 0 18%, rgba(18, 60, 51, 0.18) 18% 100%);
  border: 0;
}

html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
html.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 5. header --------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 80;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ag-cream);
  background: var(--ag-ink);
  border-radius: 2px;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

.frame-top {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  min-height: var(--frame-top-h);
  padding: 8px clamp(16px, 3vw, 36px);
  background: rgba(244, 239, 230, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-strong);
}
.frame-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(115deg, rgba(31, 111, 92, 0.34) 0 1px, transparent 1px 9px);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ag-cream);
  background: var(--ag-deep);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: background-color 0.2s ease;
}
.brand:hover .brand__mark { background: var(--ag-green); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ag-deep);
}
.brand__tagline {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ag-stone);
}

.site-nav { position: relative; z-index: 2; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.1vw, 20px);
}
.nav-item { position: relative; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 4px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ag-body);
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 2px;
  background: var(--ag-signal);
  transform: scaleX(0) skewX(-16deg);
  transform-origin: left center;
  transition: transform 0.22s ease;
}
.nav-link:hover { color: var(--ag-green); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1) skewX(-16deg); }
.nav-link[aria-current="page"] { color: var(--ag-deep); font-weight: 700; }
.nav-link__index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ag-moss);
  transform: translateY(-4px);
}
.nav-link[aria-current="page"] .nav-link__index { color: var(--ag-signal); }
.nav-link__label { display: inline-block; }

.utility {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.utility-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ag-deep);
  background: transparent;
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.utility-link:hover { background: var(--ag-mist); border-color: var(--ag-green); }
.utility-link--signal {
  color: var(--ag-cream);
  background: var(--ag-signal);
  border-color: var(--ag-signal);
}
.utility-link--signal:hover {
  color: var(--ag-cream);
  background: var(--ag-clay);
  border-color: var(--ag-clay);
}

.nav-toggle {
  position: relative;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ag-deep);
  background: rgba(244, 239, 230, 0.7);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s ease;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s ease, top 0.22s ease;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.nav-toggle__label { display: inline-block; }

.frame-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 4;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ag-green), var(--ag-moss) 62%, var(--ag-signal));
  transition: width 0.12s linear;
  pointer-events: none;
}

.frame-rail {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 60;
  width: var(--rail-w);
  padding: calc(var(--frame-top-h) + 26px) 18px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background-image: linear-gradient(180deg, #E7EAE3 0%, #EDE9E0 55%, #F2EDE4 100%);
}
.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 10px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ag-stone);
  border-bottom: 1px solid var(--line);
}
.rail-list { display: flex; flex-direction: column; gap: 2px; }
.rail-item { display: block; }
.rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  color: var(--ag-body);
  border-left: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.rail-link:hover {
  background: rgba(244, 239, 230, 0.9);
  border-left-color: var(--ag-moss);
}
.rail-link[aria-current="page"] {
  color: var(--ag-deep);
  font-weight: 700;
  background: var(--ag-cream);
  border-left-color: var(--ag-signal);
}
.rail-link__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ag-moss);
}
.rail-link[aria-current="page"] .rail-link__index { color: var(--ag-signal); }
.rail-link__label { display: inline-block; }

/* 6. footer --------------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  color: rgba(244, 239, 230, 0.86);
  background: var(--ag-ink);
}
.footer-hatch {
  height: 6px;
  background: repeating-linear-gradient(115deg, var(--ag-moss) 0 2px, transparent 2px 12px);
  opacity: 0.6;
}
.footer-frame {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3.5vw, 56px);
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 56px) clamp(28px, 4vw, 44px);
}
.footer-brand__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ag-cream);
}
.footer-brand__name::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--ag-signal);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}
.footer-brand__tagline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.12em;
  color: var(--ag-sand);
}
.footer-brand__note {
  max-width: 34ch;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.66);
}
.footer-col__title,
.footer-contact__title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ag-moss);
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}
.footer-links { display: flex; flex-direction: column; gap: 2px; }
.footer-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  text-decoration: none;
  color: rgba(244, 239, 230, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-link:hover { color: #FFFFFF; transform: translateX(3px); }
.footer-link[aria-current="page"] { color: var(--ag-sand); font-weight: 700; }
.footer-contact__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.footer-contact__label {
  flex: 0 0 34px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ag-moss);
}
.footer-contact__value {
  color: rgba(244, 239, 230, 0.92);
  word-break: break-word;
}
.footer-contact__note {
  margin-top: 12px;
  padding-left: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.6);
  border-left: 2px solid var(--ag-clay);
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px clamp(18px, 4vw, 56px) 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(244, 239, 230, 0.6);
  border-top: 1px solid rgba(244, 239, 230, 0.14);
}
.footer-legal { display: inline-block; }
.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.to-top {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ag-cream);
  background: var(--ag-deep);
  border: 1px solid rgba(244, 239, 230, 0.5);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}
.to-top::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 2px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}
.to-top[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover { background: var(--ag-green); }

/* 7. responsive ----------------------------------------------------------- */
@media (min-width: 620px) {
  .footer-frame { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .footer-frame { grid-template-columns: 1.4fr 0.8fr 0.8fr 1.3fr; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 1119px) {
  .utility .utility-link:not(.utility-link--signal) { display: none; }
}

@media (max-width: 1023px) {
  :root { --frame-top-h: 60px; }

  .frame-top { gap: 12px; min-height: var(--frame-top-h); }
  .brand__tagline { display: none; }
  .nav-toggle { display: inline-flex; }
  .utility-link { padding: 8px 11px; font-size: 12px; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--frame-top-h);
    z-index: 65;
    max-height: calc(100vh - var(--frame-top-h));
    overflow-y: auto;
    padding: 10px 16px 22px;
    background: var(--ag-deep);
    border-bottom: 1px solid rgba(244, 239, 230, 0.16);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease, visibility 0.24s ease;
  }
  .site-header[data-open] .site-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 6px;
    font-size: 17px;
    color: var(--ag-cream);
    border-bottom: 1px solid rgba(244, 239, 230, 0.14);
  }
  .nav-link__index { color: var(--ag-sand); transform: translateY(-3px); }
  .nav-link::after { display: none; }
  .nav-link:hover { color: var(--ag-cream); }
  .nav-link[aria-current="page"] {
    color: #FFFFFF;
    background: rgba(200, 95, 26, 0.18);
  }
  .nav-link[aria-current="page"] .nav-link__index { color: var(--ag-signal); }
}

@media (min-width: 1180px) {
  body { padding-left: var(--rail-w); }
  .frame-rail { display: block; }
}

/* 8. reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js-reveal [data-reveal] { opacity: 1; transform: none; }
  .frame-progress { transition: none; }
}
