/* ==========================================================================
   谈球吧账号中文站 / assets/site.css
   共享外壳：reset、变量、中文排版、页头页脚、通用按钮、面包屑、正文容器、栅格
   ========================================================================== */

:root {
  --ink: #071b16;
  --ink-deep: #05130f;
  --forest: #0e2a22;
  --teal: #0f4a3f;
  --cyan: #3df2d0;
  --amber: #ffb24a;
  --plum: #63233b;
  --indigo: #272a5c;
  --paper: #e8f4ee;
  --sage: #8cb3a6;
  --coral: #ff7a6b;

  --bg: var(--ink);
  --fg: var(--paper);
  --muted: var(--sage);
  --line: rgba(140, 179, 166, 0.22);
  --line-soft: rgba(140, 179, 166, 0.14);
  --line-cyan: rgba(61, 242, 208, 0.4);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --shell: 1200px;
  --gut: clamp(18px, 4vw, 48px);
  --header-h: 78px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-focus: 0 0 0 1px rgba(61, 242, 208, 0.35),
    0 28px 60px -42px rgba(61, 242, 208, 0.65);
}

/* --------------------------------------------------------------- reset --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--fg);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 520px at 82% -6%, rgba(61, 242, 208, 0.1), transparent 62%),
    radial-gradient(880px 460px at -6% 2%, rgba(15, 74, 63, 0.6), transparent 64%),
    linear-gradient(to right, rgba(140, 179, 166, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140, 179, 166, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 80px 80px, 80px 80px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-position: 0 0, 0 0, 0 0, 0 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}

img,
picture,
video {
  display: block;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  margin: 0 0 1.05em;
  padding-left: 1.25em;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: clamp(28px, 4vw, 52px) 0;
}

::selection {
  background: rgba(61, 242, 208, 0.28);
  color: var(--paper);
}

/* ------------------------------------------------------------ typography --- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 800;
  font-stretch: 88%;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 0.62em;
  color: var(--paper);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.05rem, 5vw, 3.9rem);
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(1.45rem, 2.9vw, 2.2rem);
}

h3 {
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0;
}

h4 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--cyan);
}

p {
  margin: 0 0 1.05em;
  color: rgba(232, 244, 238, 0.82);
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
  text-underline-offset: 0.24em;
  transition: color 0.2s var(--ease);
}

a:hover {
  text-decoration: underline;
}

strong,
b {
  color: var(--paper);
  font-weight: 700;
}

small {
  font-size: 0.84rem;
}

code,
kbd,
samp,
time,
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: 0.03em;
}

code {
  padding: 0.12em 0.44em;
  border-radius: 5px;
  background: rgba(15, 74, 63, 0.6);
  border: 1px solid var(--line);
  font-size: 0.88em;
  color: var(--cyan);
}

blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: rgba(15, 74, 63, 0.34);
  color: var(--paper);
}

blockquote p:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- focus --- */

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

/* -------------------------------------------------------------- layout --- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section {
  padding-block: clamp(44px, 7vw, 96px);
}

.section--tight {
  padding-block: clamp(26px, 4vw, 54px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

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

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

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

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr));
}

.stack > * + * {
  margin-top: var(--stack-gap, 1rem);
}

/* ---------------------------------------------------------- skip link --- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 300;
  display: inline-block;
  padding: 11px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--cyan);
  color: #05201a;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: top 0.24s var(--ease);
}

.skip-link:hover {
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* --------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.24s var(--ease), border-color 0.24s var(--ease),
    box-shadow 0.24s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(61, 242, 208, 0.55),
    rgba(255, 178, 74, 0.4),
    transparent
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease);
  pointer-events: none;
}

.site-header[data-solid="true"] {
  background: rgba(7, 27, 22, 0.97);
  border-bottom-color: rgba(61, 242, 208, 0.16);
  box-shadow: 0 26px 54px -44px #000;
}

.site-header[data-solid="true"]::after {
  opacity: 1;
}

.site-header[data-open="true"] {
  background: rgba(7, 27, 22, 0.99);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 28px);
  min-height: var(--header-h);
}

/* ---------------------------------------------------------------- brand --- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding-block: 6px;
  color: var(--paper);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(61, 242, 208, 0.42);
  background: linear-gradient(150deg, #10513f, #071b16 78%);
  box-shadow: inset 0 0 18px -8px rgba(61, 242, 208, 0.8);
}

.brand__mark::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  border-right-color: transparent;
  border-top-color: transparent;
  transform: rotate(-38deg);
}

.brand__mark::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 178, 74, 0.9);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.06;
}

.brand__name {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--sage);
}

.brand--footer .brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand--footer .brand__name {
  font-size: 1rem;
}

/* ------------------------------------------------------------------ nav --- */

.site-nav {
  margin-inline: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 6px;
  font-size: 0.94rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: rgba(232, 244, 238, 0.78);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(61, 242, 208, 0.15));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--paper);
  text-decoration: none;
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--cyan);
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------------------- tools --- */

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.header-tools__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: rgba(232, 244, 238, 0.8);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.header-tools__link:hover,
.header-tools__link:focus-visible {
  color: var(--paper);
  border-color: var(--line-cyan);
  background: rgba(61, 242, 208, 0.1);
  text-decoration: none;
}

.header-tools__link--cta {
  border-color: rgba(61, 242, 208, 0.5);
  background: rgba(61, 242, 208, 0.14);
  color: var(--cyan);
  font-weight: 700;
}

.header-tools__link--cta:hover,
.header-tools__link--cta:focus-visible {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #05201a;
}

.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(61, 242, 208, 0.14);
}

.dot--amber {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 178, 74, 0.16);
}

.dot--coral {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 122, 107, 0.16);
}

.dot--plum {
  background: #c2668c;
  box-shadow: 0 0 0 4px rgba(99, 35, 59, 0.35);
}

/* ---------------------------------------------------------- nav toggle --- */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(61, 242, 208, 0.34);
  background: rgba(15, 74, 63, 0.55);
  color: var(--paper);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover {
  background: rgba(15, 74, 63, 0.9);
  border-color: var(--line-cyan);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--cyan);
  background: rgba(61, 242, 208, 0.16);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* ------------------------------------------------------- scroll progress --- */

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 2;
  width: 0;
  height: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  pointer-events: none;
  transition: width 0.12s linear;
}

/* -------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--cyan);
  color: #05201a;
}

.btn--primary:hover {
  background: #6df8df;
  color: #05201a;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(61, 242, 208, 0.42);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  background: rgba(61, 242, 208, 0.1);
  color: var(--cyan);
}

.btn--amber {
  background: var(--amber);
  color: #2a1600;
}

.btn--amber:hover {
  background: #ffc476;
  color: #2a1600;
}

.btn--small {
  padding: 9px 18px;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- cards --- */

.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(
    160deg,
    rgba(15, 74, 63, 0.62),
    rgba(14, 42, 34, 0.88) 72%
  );
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease),
    box-shadow 0.3s var(--ease);
}

.card:hover,
.card:focus-within {
  border-color: rgba(61, 242, 208, 0.55);
  box-shadow: var(--shadow-focus);
  transform: translateY(-3px);
}

.card__index {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(61, 242, 208, 0.85);
}

.card__title {
  margin-bottom: 0.4em;
  font-size: 1.14rem;
}

.card__desc {
  margin-bottom: 0;
  font-size: 0.94rem;
  color: rgba(232, 244, 238, 0.72);
}

/* ----------------------------------------------------------------- tags --- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--sage);
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(61, 242, 208, 0.45);
  background: rgba(61, 242, 208, 0.09);
}

.tag--amber {
  color: var(--amber);
  border-color: rgba(255, 178, 74, 0.45);
  background: rgba(255, 178, 74, 0.1);
}

.tag--coral {
  color: var(--coral);
  border-color: rgba(255, 122, 107, 0.45);
  background: rgba(255, 122, 107, 0.1);
}

.tag--plum {
  color: #f0a8c3;
  border-color: rgba(99, 35, 59, 0.9);
  background: rgba(99, 35, 59, 0.42);
}

/* --------------------------------------------------------- section head --- */

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.section-head > * {
  margin-bottom: 0;
}

.section-head__index {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  color: rgba(61, 242, 208, 0.85);
}

/* ----------------------------------------------------------- breadcrumb --- */

.breadcrumbs {
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  color: var(--sage);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(140, 179, 166, 0.5);
}

.breadcrumbs a {
  color: var(--sage);
}

.breadcrumbs a:hover {
  color: var(--cyan);
  text-decoration: none;
}

.breadcrumbs [aria-current="page"] {
  color: var(--paper);
}

/* -------------------------------------------------------------- article --- */

.prose {
  max-width: 72ch;
}

.prose > h2 {
  margin-top: 1.9em;
  padding-top: 0.2em;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose > h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  color: rgba(232, 244, 238, 0.82);
}

.prose li {
  margin-bottom: 0.45em;
}

.prose li::marker {
  color: rgba(61, 242, 208, 0.7);
}

.prose a {
  border-bottom: 1px solid rgba(61, 242, 208, 0.35);
}

.prose a:hover {
  text-decoration: none;
  border-bottom-color: var(--cyan);
}

/* ---------------------------------------------------------------- media --- */

.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background-color: var(--forest);
  background-image:
    repeating-linear-gradient(
      118deg,
      rgba(61, 242, 208, 0.07) 0 2px,
      transparent 2px 17px
    ),
    radial-gradient(120% 100% at 18% 0%, rgba(15, 74, 63, 0.92), rgba(7, 27, 22, 0.96));
  aspect-ratio: 16 / 9;
}

.media--wide {
  aspect-ratio: 21 / 9;
}

.media--tall {
  aspect-ratio: 4 / 5;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media > img,
.media > picture,
.media > video,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 16px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(232, 244, 238, 0.9);
  background: linear-gradient(transparent, rgba(5, 19, 15, 0.88));
}

/* --------------------------------------------------------------- footer --- */

.site-footer {
  position: relative;
  margin-top: clamp(52px, 8vw, 110px);
  overflow: hidden;
  color: var(--paper);
  border-top: 1px solid rgba(61, 242, 208, 0.2);
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(760px 340px at 6% -22%, rgba(99, 35, 59, 0.55), transparent 68%),
    radial-gradient(720px 320px at 94% -14%, rgba(39, 42, 92, 0.62), transparent 66%),
    linear-gradient(180deg, #0a2019 0%, #05130f 72%);
  background-repeat: no-repeat, no-repeat, no-repeat;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(61, 242, 208, 0.85),
    rgba(255, 178, 74, 0.75),
    transparent
  );
  opacity: 0.6;
  pointer-events: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(42px, 6vw, 78px) clamp(28px, 4vw, 46px);
}

.footer__intro .brand {
  margin-bottom: 16px;
}

.footer__desc {
  max-width: 34ch;
  margin-bottom: 14px;
  font-size: 0.93rem;
  color: rgba(232, 244, 238, 0.72);
}

.footer__note {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(140, 179, 166, 0.9);
}

.footer__title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__list--meta {
  margin-bottom: 22px;
}

.footer__link {
  display: inline-block;
  padding-block: 1px;
  font-size: 0.94rem;
  color: rgba(232, 244, 238, 0.74);
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer__link::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  border-radius: 50%;
  background: rgba(140, 179, 166, 0.55);
  vertical-align: middle;
  transition: background-color 0.2s var(--ease);
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--cyan);
  text-decoration: none;
}

.footer__link:hover::before,
.footer__link:focus-visible::before {
  background: var(--cyan);
}

.footer__contact {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.88rem;
}

.footer__contact-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.footer__contact dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(140, 179, 166, 0.95);
}

.footer__contact dd {
  margin: 0;
  color: rgba(232, 244, 238, 0.8);
  word-break: break-word;
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--line-soft);
}

.footer__bar p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  color: rgba(140, 179, 166, 0.88);
}

.footer__copy {
  color: rgba(232, 244, 238, 0.62) !important;
}

/* -------------------------------------------------------------- to top --- */

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(61, 242, 208, 0.45);
  background: rgba(14, 42, 34, 0.94);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.95);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s var(--ease), background-color 0.2s var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: rgba(15, 74, 63, 1);
  color: #6df8df;
}

.to-top__icon {
  display: block;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------- breakpoints --- */

@media (max-width: 1080px) {
  .site-nav__link {
    font-size: 0.88rem;
    padding-inline: 5px;
  }

  .site-nav__link::after {
    left: 5px;
    right: 5px;
  }

  .header-tools__link {
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    background: rgba(7, 27, 22, 0.92);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gut) 22px;
    border-top: 1px solid rgba(61, 242, 208, 0.18);
    border-bottom: 1px solid rgba(61, 242, 208, 0.18);
    background-color: #09201a;
    background-image:
      radial-gradient(420px 220px at 100% 0%, rgba(39, 42, 92, 0.5), transparent 70%),
      radial-gradient(360px 200px at 0% 100%, rgba(99, 35, 59, 0.4), transparent 72%);
    background-repeat: no-repeat;
    box-shadow: 0 30px 60px -32px #000;
  }

  .site-nav[data-open="true"] {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 14px 10px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    color: rgba(232, 244, 238, 0.86);
  }

  .site-nav__list li:last-child .site-nav__link {
    border-bottom: 0;
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(61, 242, 208, 0.08);
    border-radius: var(--r-sm);
    padding-left: 14px;
  }

  .header-tools {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body {
    background-size: auto, auto, 56px 56px, 56px 56px;
    background-repeat: no-repeat, no-repeat, repeat, repeat;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .footer__bar {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer__contact-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .brand__sub {
    letter-spacing: 0.12em;
  }

  .to-top {
    width: 42px;
    height: 42px;
  }
}

/* ------------------------------------------------------------- reduced --- */

@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;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .card:focus-within,
  .btn:hover {
    transform: none;
  }
}
