/* Aricxpoint — shared styles */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --ink: #0d0d12;
  --text: #55536b;
  --muted: #7a7890;
  --line: #1f1d2b;
  --line-soft: #dcdbe3;
  --accent: #5b4bdb;
  --accent-ink: #ffffff;
  --radius: 14px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 56px);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Lab page runs a dark variant of the same system */
body.lab {
  --bg: #14131d;
  --surface: #1d1c2a;
  --ink: #f2f1f8;
  --text: #b9b7cc;
  --muted: #8b89a3;
  --line: #3a384f;
  --line-soft: #2b2a3c;
  --accent: #8f82ff;
  --accent-ink: #14131d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line-soft); box-shadow: 0 6px 24px rgba(20, 18, 40, .06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; }
.brand small { font-weight: 400; color: var(--muted); font-size: 15px; margin-left: 2px; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 16px; color: var(--text); transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font: 500 16px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 9vw, 110px); }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: clamp(19px, 2vw, 22px); max-width: 640px; margin-top: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(34px, 4.6vw, 56px); }
.section-head p { max-width: 520px; justify-self: end; }

/* ---------- Service list (matches reference design) ---------- */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 24px; align-items: start;
  padding: 40px 0 44px; border-bottom: 1px solid var(--line);
}
.service .num { font-size: 15px; color: var(--muted); padding-top: 14px; font-variant-numeric: tabular-nums; }
.service h3 { font-size: clamp(30px, 4.2vw, 52px); font-weight: 600; }
.service p { margin-top: 16px; max-width: 760px; font-size: clamp(17px, 1.6vw, 21px); }
.service .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--muted); }
.service .go {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-soft);
  display: grid; place-items: center; margin-top: 6px; color: var(--ink);
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.service:hover .go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
}
.card h3 { font-size: 24px; }
.card .step { font-size: 14px; color: var(--accent); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.card ul { margin: 4px 0 0; padding-left: 20px; }
.card li { margin: 4px 0; }

/* ---------- Lab track cards ---------- */
.track { position: relative; overflow: hidden; transition: border-color .2s, transform .2s; }
.track:hover { border-color: var(--accent); transform: translateY(-3px); }
.track .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.track .icon svg { width: 24px; height: 24px; }
.track .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.track details { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.track summary { cursor: pointer; color: var(--ink); font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; }
.track summary::-webkit-details-marker { display: none; }
.track summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.track details[open] summary::after { content: "–"; }
.track details ul { font-size: 16px; }

/* ---------- Split banner ---------- */
.banner {
  background: var(--ink); color: var(--bg); border-radius: calc(var(--radius) * 1.6);
  padding: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.banner h2 { color: var(--bg); font-size: clamp(30px, 4vw, 48px); }
.banner p { color: color-mix(in srgb, var(--bg) 75%, transparent); margin-top: 16px; }
.banner .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.banner .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.banner .btn-ghost { background: transparent; color: var(--bg); }
body.lab .banner { background: var(--accent); }
body.lab .banner h2, body.lab .banner p { color: var(--accent-ink); }
body.lab .banner .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
body.lab .banner .btn-ghost { background: transparent; color: var(--accent-ink); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); }
.contact-grid h2 { font-size: clamp(34px, 4.6vw, 56px); }
.contact-info { margin-top: 28px; display: grid; gap: 18px; }
.contact-info a { color: var(--ink); font-size: 20px; text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.contact-info a:hover { border-color: var(--accent); }
.contact-info span { display: block; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 400 17px/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 14px 16px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 140px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 40px; font-size: 15px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .banner { grid-template-columns: 1fr; }
  .banner .actions { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line-soft);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links li:last-child a { border: 0; margin-top: 12px; justify-content: center; }
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .service { grid-template-columns: 1fr; gap: 8px; padding: 32px 0 36px; }
  .service .num { padding-top: 0; }
  .service .go { display: none; }
  .grid-3, .grid-2, .row-2 { grid-template-columns: 1fr; }
}

/* Buttons inside the nav keep their own colours */
.nav-links a.btn { color: var(--bg); }
.nav-links a.btn-accent { color: var(--accent-ink); }
.nav-links a.btn:hover { color: var(--bg); }
.nav-links a.btn-accent:hover { color: var(--accent-ink); }
.field, .row-2 > *, .grid-3 > *, .grid-2 > * { min-width: 0; }

/* Logo lockups (black ink PNGs; inverted on the dark Labs theme) */
.brand-logo { height: 48px; width: auto; }
body.lab .brand-logo { filter: invert(1); }
@media (max-width: 760px) { .brand-logo { height: 38px; } }

/* Labs hero: copy beside the stacked logo */
.hero-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-split h1 { font-size: clamp(44px, 6.4vw, 84px); }
.hero-logo {
  background: #000; border-radius: calc(var(--radius) * 2);
  aspect-ratio: 6 / 5; display: grid; place-items: center; padding: 14%;
}
.hero-logo img { width: 100%; height: auto; filter: invert(1); }
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-logo { order: -1; max-width: 260px; }
}
