/* ============================================================
   AGENTIS — design tokens & base
   ============================================================ */
:root {
  /* core palette (from brief) */
  --bg:        #FAFAF7;   /* warm off-white */
  --bg-2:      #F3F2EC;   /* cooler off-white for alternating sections */
  --bg-3:      #ECEAE1;   /* slightly deeper panel */
  --ink:       #1A1A2E;   /* deep ink text */
  --teal:      #0E8A6B;   /* single confident accent */
  --teal-deep: #0B6E55;
  --teal-soft: #E4F1EC;   /* teal tint backgrounds */
  --navy:      #16243D;   /* secondary depth */
  --navy-2:    #1E3150;

  /* derived neutrals */
  --ink-70: #45465c;
  --ink-55: #66677a;
  --ink-40: #8c8d9c;
  --hair:   rgba(26,26,46,0.10);
  --hair-2: rgba(26,26,46,0.16);
  --hair-soft: rgba(26,26,46,0.055);

  /* on-dark */
  --d-fg:   #EAE9E0;
  --d-fg-60: rgba(234,233,224,0.62);
  --d-fg-40: rgba(234,233,224,0.40);
  --d-hair: rgba(255,255,255,0.12);

  /* type */
  --serif: "Newsreader", Georgia, serif;
  --sans:  "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;

  --shadow-1: 0 1px 2px rgba(22,36,61,0.04), 0 2px 8px rgba(22,36,61,0.05);
  --shadow-2: 0 2px 6px rgba(22,36,61,0.06), 0 18px 40px -16px rgba(22,36,61,0.18);
  --shadow-teal: 0 6px 24px -8px rgba(14,138,107,0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--teal); color: #fff; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }
.section--alt { background: var(--bg-2); }
.section--dark { background: var(--navy); color: var(--d-fg); }
.section--dark .eyebrow { color: rgba(255,255,255,0.5); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-40);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: -0.02em; }
.display {
  font-size: clamp(2.7rem, 6.1vw, 5.1rem);
  font-weight: 460;
  line-height: 0.98;
  letter-spacing: -0.028em;
}
.h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 480; letter-spacing: -0.024em; }
.h2 em { font-style: italic; color: var(--teal); }
.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-70);
  font-weight: 400;
  max-width: 46ch;
  text-wrap: pretty;
}
.section--dark .lead { color: var(--d-fg-60); }
.muted { color: var(--ink-55); }
.mono { font-family: var(--mono); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.92em 1.5em;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-teal); }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(14,138,107,0.55); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair-2); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.section--dark .btn-ghost { color: var(--d-fg); border-color: var(--d-hair); }
.section--dark .btn-ghost:hover { border-color: var(--d-fg); }
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250,250,247,0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--hair); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 560;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.94rem; font-weight: 500; color: var(--ink-70);
  transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta a { white-space: nowrap; }
.nav-cta .btn { padding: 0.62em 1.15em; font-size: 0.92rem; }
@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ---------- generic reveal ---------- */
/* gated behind .js so content is always visible if scripts fail */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* hairline divider util */
.rule { height: 1px; background: var(--hair); border: 0; }
