/* =========================================================
   Xoriant — Base: tokens, reset, typography, utilities
   ========================================================= */

:root {
  /* Brand colours (from Figma) */
  --green: #14bb30;
  --green-dark: #0f9a27;
  --ink: #1d1f1f;
  --ink-2: #242424;
  --ink-3: #313131;
  --grey: #717373;
  --grey-2: #858585;
  --line: #e2e5e4;
  --bg: #ffffff;
  --bg-soft: #f8f9f9;
  --bg-card: #f3f3f5;
  --bg-pill: #f5f5f5;
  --bg-btn-alt: #ebeae8;
  --hi: #427f4c;
  --ai: #1a5f90;
  --sky-1: #5fa9e7;
  --sky-2: #0477c8;

  /* Tag colours */
  --tag-article: #e2e5e4;
  --tag-blog: #c9d1d9;
  --tag-case: #b8c2b7;
  --tag-podcast: #d1c9c2;
  --tag-interview: #d5d6bc;
  --tag-whitepaper: #dad5e0;

  /* Type */
  --font-display: 'Gambarino', 'Times New Roman', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Fluid type scale (design is 1920 wide) */
  --fs-hero: clamp(52px, 5.2vw, 100px);
  --fs-h2: clamp(40px, 3.9vw, 75px);
  --fs-h3: clamp(24px, 1.5vw, 28px);
  --fs-card-title: clamp(26px, 1.82vw, 35px);
  --fs-body: 17px;
  --fs-eyebrow: 17px;
  --fs-btn: 12px;

  /* Layout */
  --container: 1440px;
  --gutter: clamp(20px, 3vw, 60px);
  --radius: 10px;
  --radius-sm: 6px;
  --nav-h: 94px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.45s;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `clip` (not `hidden`) clips horizontal overflow without making <body> a
     scroll container — that would break the hero's `position: sticky`. */
  overflow-x: clip;
}

body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.container--narrow { width: min(1140px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.h1 { font-size: var(--fs-hero); line-height: 1; }
.h2 { font-size: var(--fs-h2); line-height: 0.95; }
.h2--tight { line-height: 0.78; }

.accent { color: var(--green); }

.eyebrow {
  font-family: var(--font-body);
  font-weight:600;
  font-size: var(--fs-eyebrow);
  line-height: 1.36;
  letter-spacing: 0.33em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow--muted { color: var(--ink-3); }
.eyebrow--light { color: #fff; }

.lead {
  font-size: clamp(18px, 1.11vw, 21.4px);
  line-height: 2;
  color: var(--ink);
}

.section-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 40px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-weight:600;
  font-size: var(--fs-btn);
  line-height: 16px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  transition: background var(--dur) var(--ease-out);
}
/* Simple hover: subtle background darken; the arrow nudges forward. */
.btn:hover { background: var(--green-dark); }
.btn .btn__icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .btn__icon { transform: translateX(4px); }

.btn--dark { background: var(--ink); }
.btn--dark:hover { background: #000; }

.btn--soft {
  background: var(--bg-btn-alt);
  color: var(--ink);
  height: 43px;
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
  gap: 9px;
}
.btn--soft:hover { background: #dcdad7; }

/* ---------- Tags / pills ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 19px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 9.2px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--tag-article);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), filter 0.3s;
}
.tag:hover { transform: translateY(-1px); filter: brightness(0.96); }
.tag.is-active { outline: 1.5px solid var(--ink); outline-offset: 1px; }

/* Clear-one (×) affordance — only visible while that tag is selected */
.tag__x {
  display: none;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  margin-left: 6px;
  margin-right: -3px;
  border-radius: 2px;
  font-size: 9px;
  line-height: 1;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.tag.is-active .tag__x { display: inline-flex; }
.tag.is-active .tag__x:hover { background: var(--ink); color: #fff; }
.tag--article { background: var(--tag-article); }
.tag--blog { background: var(--tag-blog); }
.tag--case { background: var(--tag-case); }
.tag--podcast { background: var(--tag-podcast); }
.tag--interview { background: var(--tag-interview); }
.tag--whitepaper { background: var(--tag-whitepaper); }

/* ---------- Curved edges ---------- */
.curve {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(60px, 9.4vw, 180px);
  pointer-events: none;
}
.curve svg { width: 100%; height: 100%; display: block; }
.curve--bottom { bottom: -1px; }
.curve--top { top: -1px; }

/* ---------- Motion helpers (initial states set by JS) ---------- */
.split-line { display: block; overflow: hidden; }
.split-line > .split-inner { display: block; }
.split-char, .split-word { display: inline-block; white-space: pre; }

.reveal { opacity: 1; }
html.no-js .reveal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; }
}

/* ---------- Accessibility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
