/* ==========================================================
   AtrixTech — Global styles
   Apple-inspired: system type, generous whitespace, restraint
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --surface-dark: #161617;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --text-on-dark: #f5f5f7;
  --text-on-dark-2: #a1a1a6;
  --line: #d2d2d7;
  --line-dark: #424245;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --link-on-dark: #2997ff;

  --grad-a: #2997ff;
  --grad-b: #7d5cff;
  --grad-c: #00c2a8;

  --radius-lg: 28px;
  --radius-md: 18px;
  --maxw: 1024px;
  --maxw-wide: 1180px;
  --gutter: 22px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "Inter", "Segoe UI", Arial, "PingFang HK", "PingFang SC",
    sans-serif;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 var(--gutter); }

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

/* ---------- Global nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 48px;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s var(--ease);
}
.nav-inner {
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo-mark { width: 24px; height: 24px; flex: none; transition: transform 0.4s var(--ease); }
.brand:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }
.logo-word { font-weight: 600; letter-spacing: -0.02em; }
.logo-word span { font-weight: 400; color: var(--text-2); }
.nav-links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 12px;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.8);
  transition: color 0.2s;
}
.nav-links a:hover { color: #000; text-decoration: none; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -12px;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav.open .nav-toggle span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

@media (max-width: 833px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 36px 32px;
    background: rgba(251, 251, 253, 0.97);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { display: block; padding: 12px 0; font-size: 24px; font-weight: 600; color: var(--text); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  transition: background 0.2s var(--ease), color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }
.link-arrow { font-size: 17px; }
.link-arrow::after { content: " ›"; font-size: 1.1em; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
  margin-bottom: 12px;
}
.headline {
  font-size: clamp(40px, 6.2vw, 64px);
  line-height: 1.0625;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.section-title {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.005em;
  font-weight: 700;
}
.lead {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.33;
  letter-spacing: 0.005em;
  color: var(--text-2);
  font-weight: 400;
}
.gradient-text {
  background: linear-gradient(95deg, var(--grad-a) 0%, var(--grad-b) 50%, var(--grad-c) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 140px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section-dark .eyebrow { color: var(--text-on-dark-2); }
.section-dark .lead { color: var(--text-on-dark-2); }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 72px; }
.section-head .lead { margin-top: 20px; }

@media (max-width: 734px) {
  .section { padding: 96px 0; }
  .section-head { margin-bottom: 48px; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  padding: 36px 0 28px;
}
.footer .container { max-width: var(--maxw); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.footer-company { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.footer-tagline { color: var(--text-2); font-size: 12px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 0; padding: 0; }
.footer-links li + li::before { content: "·"; margin: 0 10px; color: var(--text-3); }
.footer-links a { color: var(--text-2); }
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
  padding: 8px 0 32px;
  border-bottom: 1px solid var(--line);
}
.footer-cols h4 { color: var(--text); font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li + li { margin-top: 8px; }
.footer-cols a { color: var(--text-2); }
.footer-brand .brand { font-size: 17px; margin-bottom: 12px; color: var(--text); }
.footer-brand p { color: var(--text-2); max-width: 340px; }
.footer-meta { padding: 16px 0 0; color: var(--text-2); }
@media (max-width: 734px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 120px 0 100px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 48px); letter-spacing: -0.01em; line-height: 1.08; font-weight: 700; }
.legal .updated { color: var(--text-2); margin: 12px 0 48px; }
.legal h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -0.01em; }
.legal p, .legal li { color: #333336; font-size: 17px; line-height: 1.6; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 22px; margin: 12px 0 0; }
.legal li + li { margin-top: 6px; }
