/* =========================================================
   (i)Sage — website components  ·  v1.0
   Requires tokens.css and ../fonts/fonts.css
   ========================================================= */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--isage-abyss);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--isage-orange); color: var(--isage-abyss); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--text); }
p { margin: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--isage-orange); color: var(--isage-abyss); padding: 8px 16px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { background: var(--bg); color: var(--text); padding: var(--section-y) 0; position: relative; overflow: hidden; }
.section--recessed { --bg: var(--isage-abyss-deep); }
.section--rule { border-top: var(--stroke) solid var(--line); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack > * + * { margin-top: var(--space-5); }
.stack-sm > * + * { margin-top: var(--space-3); }
@media (max-width: 900px) { .grid-12 > [class*="span-"] { grid-column: 1 / -1; } }

/* ---------- Type ---------- */
.eyebrow { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--accent); }
.surface-bone .eyebrow { color: var(--isage-teal-ink); }
.display { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
.display strong, .h1 strong { font-weight: 600; }
.h1 { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h1); line-height: 1.06; letter-spacing: var(--ls-display); }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h2); line-height: 1.12; letter-spacing: var(--ls-heading); }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: -0.01em; }
.caps { font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; letter-spacing: var(--ls-caps); text-transform: uppercase; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-body); max-width: var(--measure); }
.body { color: var(--text-body); max-width: var(--measure); }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-small); }
.label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  font-family: var(--font-text); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn--primary { background: var(--isage-orange); color: var(--isage-abyss); }
.btn--primary:hover { background: #F0B451; }
.btn--ghost { background: transparent; color: var(--text); border-color: currentColor; }
.btn--ghost:hover { background: var(--text); color: var(--bg); }
.surface-bone .btn--primary { background: var(--isage-abyss); color: var(--isage-bone); }
.surface-bone .btn--primary:hover { background: var(--isage-teal); }
.btn .arrow { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.text-link { font-weight: 600; text-decoration: none; color: var(--link); border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Header & navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 42, 56, 0.94); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--isage-rule-dark); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: var(--space-5); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.nav-list { display: flex; align-items: center; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.nav-list a:not(.btn) { color: var(--isage-bone); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav-list a:not(.btn):hover { border-bottom-color: var(--isage-tide); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--isage-orange); }
.nav-list .btn { min-height: 44px; padding: 0 18px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--isage-rule-dark); color: var(--isage-bone); width: 48px; height: 48px; border-radius: var(--radius-sm); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 77px 0 0 0; background: var(--isage-abyss); padding: var(--space-6) var(--gutter); transform: translateX(100%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); overflow-y: auto; }
  .site-nav.is-open { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--isage-rule-dark); }
  .nav-list a:not(.btn) { display: block; padding: 20px 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 300; border: 0; }
  .nav-list li:last-child { border: 0; padding-top: var(--space-6); }
  .nav-list .btn { width: 100%; justify-content: center; min-height: 56px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(72px, 10vw, 152px) 0 clamp(56px, 7vw, 104px); }
.hero .grid-12 { align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-7); }
.hero-mark { width: 100%; max-width: 440px; margin-left: auto; }
@media (max-width: 900px) { .hero-mark { max-width: 240px; margin: var(--space-5) auto 0; } .page-hero .hero-mark { display: none; } }
.page-hero { padding: clamp(64px, 8vw, 120px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--isage-rule-dark); }

/* Center node pulse — the only motion in the system */
.node-pulse { transform-origin: 60px 60px; animation: pulse 4.8s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.0; transform: scale(0.6); } 40% { opacity: 0.55; } 80% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .node-pulse { animation: none; opacity: 0; } html { scroll-behavior: auto; } }

/* ---------- Proof / stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: var(--space-6) var(--space-5) var(--space-6) 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: var(--space-6); }
.stat:last-child { border-right: 0; }
.stat-figure { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-figure); letter-spacing: -0.02em; line-height: 1.1; color: var(--accent); }
.surface-bone .stat-figure { color: var(--isage-teal-ink); }
.stat-label { margin-top: var(--space-2); font-size: var(--fs-small); color: var(--text-muted); }
.stat-company { font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text); margin-bottom: var(--space-2); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } .stat, .stat + .stat { padding: var(--space-5) 0; border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Lists of services / features ---------- */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-5); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); align-items: start; }
.row-index { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--accent); padding-top: 6px; }
.surface-bone .row-index { color: var(--isage-teal-ink); }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: var(--space-3); } }

/* ---------- 9 Vectors grid ---------- */
.vectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.vector { background: var(--bg); padding: var(--space-5); min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-3); }
.vector-num { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--text-muted); }
.vector-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.vector--center { background: var(--isage-orange); }
.vector--center .vector-num, .vector--center .vector-name { color: var(--isage-abyss); }
.vectors-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--space-3); }
.vectors-groups span { font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 520px) { .vector { min-height: 104px; padding: var(--space-4); } .vector-name { font-size: 1rem; } }

/* ---------- Quote ---------- */
.quote { border-left: 0; margin: 0; padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.quote p { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); line-height: 1.4; letter-spacing: -0.01em; color: var(--text); }
.quote footer { margin-top: var(--space-4); font-size: var(--fs-small); color: var(--text-muted); }
.quote cite { font-style: normal; font-weight: 600; color: var(--text); }

/* ---------- Panels ---------- */
.panel { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); }
.surface-bone .panel { background: var(--isage-white); }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text-muted); }

/* ---------- Article list ---------- */
.articles { border-top: 1px solid var(--line); }
.article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-5); padding: var(--space-5) 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); align-items: baseline; }
.article:hover .h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; min-height: 52px;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
@media (max-width: 700px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--isage-abyss-deep); color: var(--isage-bone); padding: var(--space-9) 0 var(--space-6); border-top: 1px solid var(--isage-rule-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-7); }
.footer-grid h2 { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--isage-fog); margin-bottom: var(--space-4); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-grid a { color: var(--isage-bone); text-decoration: none; }
.footer-grid a:hover { color: var(--isage-orange); }
.footer-legal { margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid var(--isage-rule-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); font-family: var(--font-mono); font-size: 12px; color: var(--isage-fog); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Decorative lattice (background motif) ---------- */
.lattice { position: absolute; pointer-events: none; opacity: 0.5; }
