:root {
  --bg: #070809;
  --bg-soft: #0a0c0e;
  --panel: #0d1012;
  --panel-2: #111416;
  --ink: #f3f1ea;
  --muted: #8f928d;
  --muted-2: #60645f;
  --line: rgba(243, 241, 234, 0.1);
  --line-strong: rgba(243, 241, 234, 0.2);
  --amber: #ff5a1f;
  --amber-2: #ffb489;
  --amber-dim: rgba(255, 90, 31, 0.12);
  --cyan: #74e6ff;
  --green: #9fe870;
  --wrap: 1280px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

::selection {
  background: var(--amber);
  color: #0a0705;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, p, dl, dd, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #08090a;
}

::-webkit-scrollbar-thumb {
  background: #24282a;
  border: 2px solid #08090a;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3f41;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--amber);
  color: #0a0705;
  font-size: 13px;
  transition: top 0.2s;
}

.skip:focus {
  top: 16px;
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(620px circle at var(--mx, 62%) var(--my, 24%), rgba(255, 90, 31, 0.075), transparent 62%);
  opacity: 0;
  transition: opacity 0.6s;
}

body.has-pointer .spotlight {
  opacity: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--amber);
  flex: none;
}

.eyebrow .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.55);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(255, 90, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.btn span {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  transition: transform 0.3s var(--ease);
}

.btn:hover span {
  transform: translate(2px, -2px);
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #100805;
}

.btn-primary:hover {
  background: #ff7a44;
  border-color: #ff7a44;
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(255, 90, 31, 0.22);
}

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

.btn-ghost:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.btn-sm {
  height: 42px;
  padding: 0 18px;
  font-size: 13px;
}

.btn-lg {
  height: 60px;
  padding: 0 34px;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--amber-2);
  border-bottom: 1px solid rgba(255, 90, 31, 0.35);
  padding-bottom: 4px;
  transition: gap 0.3s var(--ease), border-color 0.3s;
}

.link-arrow:hover {
  gap: 16px;
  border-color: var(--amber);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

.site-header.is-scrolled {
  background: rgba(7, 8, 9, 0.72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav a {
  position: relative;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.25s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 28px;
  background: #060708;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: 48px;
}

.footer-brand p {
  margin-top: 18px;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.footer-col h3 {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
  margin-bottom: 18px;
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--amber-2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-2);
}

/* ---------------- shared ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.section {
  position: relative;
  padding: 128px 0;
  border-top: 1px solid var(--line);
}

.sec-head {
  max-width: 820px;
}

.sec-head h2 {
  margin-top: 22px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.sec-head .sec-lede {
  margin-top: 22px;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

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

.muted {
  color: var(--muted);
}

.amber {
  color: var(--amber);
}

.is-hidden {
  display: none !important;
}

/* ---------------- forms ---------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field > label,
.field-label {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.25s, background 0.25s;
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: #575b57;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(255, 90, 31, 0.7);
  background: rgba(255, 90, 31, 0.035);
}

.textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.8;
}

.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--amber);
  flex: none;
}

.form-error {
  display: none;
  padding: 11px 14px;
  border: 1px solid rgba(255, 90, 31, 0.4);
  background: rgba(255, 90, 31, 0.07);
  color: #ffb394;
  font-size: 13px;
  border-radius: 4px;
}

.form-error.show {
  display: block;
}

/* ---------------- page head (sub pages) ---------------- */

.sub-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 8, 9, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sub-header .header-inner {
  height: 70px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--ink);
}

.header-help {
  font-size: 12px;
  color: var(--muted);
}

.header-help b {
  color: var(--amber-2);
  font-weight: 500;
}

/* ---------------- responsive ---------------- */

@media (max-width: 1000px) {
  .nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { height: 66px; }
  .brand-text strong { font-size: 15px; }
  .brand-text small { display: none; }
  .section { padding: 84px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; margin-top: 40px; }
  .header-help { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .spotlight { display: none; }
}
