/* ==========================================================================
   Ablatehub — site styles
   Hero-only landing page (English).
   Order: tokens → base → nav → hero → animation & a11y → responsive
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --bg: #0A101E;
  --text: #E9EFFA;
  --muted: #8FA0BC;
  --accent: #4C8DFF;
  --border: rgba(146, 180, 255, 0.12);
  --border-strong: rgba(146, 180, 255, 0.26);
  --grad: linear-gradient(120deg, #3E7BFA 0%, #7FB5FF 100%);
  --green: #3DDBA4;

  /* metrics & depth */
  --nav-h: 72px;
  --shadow-cta: 0 8px 26px rgba(62, 123, 250, 0.35);
  --shadow-cta-hover: 0 14px 34px rgba(62, 123, 250, 0.5);
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(76, 141, 255, 0.35); }
a { color: inherit; text-decoration: none; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Dark scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #22314F; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2E4066; }

/* Skip link — hidden until keyboard-focused */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--accent); color: #071022;
  padding: 10px 18px; border-radius: 10px; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(10, 16, 30, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-nav.scrolled {
  background: rgba(10, 16, 30, 0.88);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 32px rgba(3, 8, 20, 0.4);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; }
.brand { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 32px) 0 56px;
  overflow: hidden;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(126, 166, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 166, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 42%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 42%, #000 25%, transparent 72%);
}
/* primary blue glow + secondary teal/blue washes */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(620px 420px at 50% -6%, rgba(62, 123, 250, 0.3), transparent 70%),
    radial-gradient(460px 340px at 12% 32%, rgba(56, 217, 192, 0.07), transparent 70%),
    radial-gradient(460px 340px at 88% 32%, rgba(62, 123, 250, 0.1), transparent 70%);
}
.hero-inner { position: relative; width: 100%; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 8px 18px;
  font-size: 0.85rem; color: var(--muted);
  background: rgba(17, 27, 48, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 219, 164, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(61, 219, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 219, 164, 0); }
}
.hero h1 {
  margin: 30px auto 24px; max-width: 1000px;
  font-size: clamp(2.4rem, 5.6vw, 3.8rem); line-height: 1.14;
  font-weight: 800; letter-spacing: -0.03em;
  text-wrap: balance;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }
.hero-cta { display: flex; justify-content: center; margin-top: 38px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; padding: 14px 34px; font-weight: 600; font-size: 0.98rem;
  transition: transform 0.2s, box-shadow 0.2s; font-family: inherit;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--grad); color: #071022; box-shadow: var(--shadow-cta); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-cta-hover); }

/* ---------- Reveal on load ---------- */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.js .reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.07s; }
.d2 { transition-delay: 0.14s; }
.d3 { transition-delay: 0.21s; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@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;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero { padding-bottom: 48px; }
  .badge { font-size: 0.8rem; padding: 7px 15px; }
  .btn { padding: 13px 28px; }
}
