/* Cursor */
#cur {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition:
    width 0.35s var(--ease-out),
    height 0.35s var(--ease-out),
    margin 0.35s var(--ease-out),
    opacity 0.3s;
  will-change: transform;
}

#cur.on {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  background: transparent;
  border: 1px solid #fff;
}

#cur.hid {
  opacity: 0;
}

@media (pointer: coarse) {
  #cur {
    display: none;
  }
}

/* Loader */
#load {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: grid;
  place-items: center;
}

#load .load-inner {
  text-align: center;
  width: min(220px, 70vw);
}

#load .load-name {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.42em;
  margin-bottom: var(--s-5);
  opacity: 0.55;
}

#load .load-bar {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#load .load-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fg);
}

#load .load-pct {
  margin-top: var(--s-4);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--dim);
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad-x);
  mix-blend-mode: difference;
  pointer-events: none;
}
.topbar a,
.topbar button {
  pointer-events: auto;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
}

.logo-mark img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.top-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.top-links a {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  opacity: 0.7;
  transition: opacity var(--dur-micro);
}

.top-links a:hover {
  opacity: 1;
}

.top-links .pill {
  opacity: 1;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-full);
  transition:
    background var(--dur-ui),
    color var(--dur-ui),
    border-color var(--dur-ui);
}

.top-links .pill:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

@media (max-width: 760px) {
  .top-links a:not(.pill) {
    display: none;
  }
}

/* Progress dots */
.progress {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  mix-blend-mode: difference;
}

.progress span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition:
    height 0.4s var(--ease-out),
    background 0.3s;
}

.progress span.on {
  background: #fff;
  height: 18px;
  border-radius: 4px;
}

@media (max-width: 700px) {
  .progress {
    display: none;
  }
}

/* Scroll hint */
.scroll-hint {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  opacity: 0.45;
  mix-blend-mode: difference;
  animation: hint 2.4s ease-in-out infinite;
}

@keyframes hint {
  50% {
    opacity: 0.15;
    transform: translateX(-50%) translateY(4px);
  }
}

html.reduced .scroll-hint {
  animation: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.4rem;
  border-radius: var(--r-full);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  font-weight: 500;
  transition:
    transform 0.4s var(--ease-out),
    background var(--dur-ui),
    color var(--dur-ui),
    border-color var(--dur-ui),
    box-shadow 0.35s;
}

.btn:hover {
  transform: scale(1.03);
}

.btn:active {
  transform: scale(0.98);
}

.btn-w {
  background: var(--fg);
  color: #0a0a0c;
}

.btn-w:hover {
  box-shadow: 0 0 0 1px #fff, 0 12px 40px rgba(167, 139, 250, 0.25);
}

.btn-g {
  border: 1px solid var(--line);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
}

.btn-g:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ico {
  flex-shrink: 0;
  display: block;
  opacity: 0.92;
}

/* Tags */
.tag {
  padding: 0.7rem 1.05rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition:
    color var(--dur-ui),
    border-color var(--dur-ui),
    background var(--dur-ui),
    transform 0.35s var(--ease-out);
}

.tag:hover {
  color: var(--fg);
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.1);
  transform: translateY(-3px);
}

.cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Section head */
.sec {
  padding: var(--pad-sec) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

.sec-head {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
  margin-bottom: clamp(3rem, 8vh, 5rem);
  align-items: end;
}

@media (max-width: 800px) {
  .sec-head {
    grid-template-columns: 1fr;
  }
}

.sec-num {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.sec-head h2 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.sec-head p {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  max-width: 38ch;
  justify-self: end;
}

@media (max-width: 800px) {
  .sec-head p {
    justify-self: start;
  }
}

/* Footer */
footer {
  padding: 2.5rem var(--pad-x) 3rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  position: relative;
  z-index: 3;
}
