/* ============================================================
   Stark Informatics — Microsoft Fabric Consulting
   Core stylesheet
   ============================================================ */

/* -------- Design tokens -------- */
:root {
  /* Brand */
  --brand-primary: #0F6CBD;        /* Microsoft Fabric blue (logo-deep-blue family) */
  --brand-sky:     #4FB3E8;        /* Stark Informatics logo cloud-top blue */
  --brand-deep:    #1A4D7D;        /* Stark Informatics logo cloud-bottom blue */
  --brand-navy:    #0A1220;        /* Stark Informatics logo backdrop */
  --brand-teal:    #117865;        /* Used as a category accent in bubble web */
  --brand-purple:  #6264A7;        /* Used as a category accent in bubble web */
  --brand-magenta: #B146C2;        /* Used as a category accent in bubble web */
  --brand-gold:    #F2A93B;
  --brand-coral:   #E25C5C;

  /* Neutrals */
  --ink-900: #0B1320;
  --ink-800: #1A2236;
  --ink-700: #2F3A55;
  --ink-600: #495472;
  --ink-500: #6B7693;
  --ink-400: #98A1B8;
  --ink-300: #C7CCD9;
  --ink-200: #E3E6EE;
  --ink-100: #F0F2F7;
  --ink-50:  #F8FAFD;
  --white:   #FFFFFF;

  /* Surfaces */
  --bg:        var(--white);
  --bg-soft:   var(--ink-50);
  --bg-card:   var(--white);
  --border:    var(--ink-200);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 0 6px rgba(15, 108, 189, 0.12);

  /* Type */
  --font-sans: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "Cascadia Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 120ms;
  --t-base: 220ms;
  --t-slow: 420ms;

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
}

/* -------- Reset / Base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--brand-teal); }
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-7) 0;
}

/* -------- Typography -------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--ink-900);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.2vw + 0.8rem, 2.4rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 1.2vw + 0.8rem, 1.6rem); }
h4 { font-size: 1.15rem; }
p  { margin: 0 0 var(--space-4); }
.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-600);
  max-width: 65ch;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-deep);
  margin-bottom: var(--space-3);
}
code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.9em; }
code {
  background: var(--ink-100);
  color: var(--ink-800);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre {
  background: var(--ink-900);
  color: #E7EBF3;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}
pre code { background: transparent; color: inherit; padding: 0; }

/* -------- Layout -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}
.container--narrow { max-width: var(--container-narrow); }

section { padding-block: clamp(56px, 8vw, 96px); }
.section--soft { background: var(--bg-soft); }
.section--ink  { background: var(--ink-900); color: #DCE2F0; }
.section--ink h2, .section--ink h3 { color: var(--white); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-7);
}
.section-header .lead { margin-inline: auto; }

/* -------- Topbar / Nav -------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--brand-primary); }
/* Stark Informatics brand mark — your real PNG logo in /assets.
   To swap the logo image, replace assets/logo.png (same path, same name)
   and every page picks it up on next deploy. */
.brand__mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
  background: url("/assets/logo.png") center / contain no-repeat;
  border-radius: 8px;
}
.brand__mark::before,
.brand__mark::after { content: none; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.nav__link {
  position: relative;
  color: var(--ink-700);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 4px;
}
.nav__link:hover { color: var(--brand-primary); }
.nav__link[aria-current="page"] { color: var(--brand-primary); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-sky));
  border-radius: 2px;
}

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink-800);
  border-radius: 2px;
  position: relative;
  transition: transform var(--t-base) var(--ease-out);
}
.nav__toggle span::before { content: ""; position: absolute; top: -6px; left: 0; }
.nav__toggle span::after  { content: ""; position: absolute; top:  6px; left: 0; }

@media (max-width: 880px) {
  .nav { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) 24px var(--space-5);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    box-shadow: var(--shadow-md);
  }
  .nav.open .nav__link { padding: 10px 0; }
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              background var(--t-base) var(--ease-out),
              color var(--t-base) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-sky));
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(15, 108, 189, 0.5);
}
.btn--primary:hover {
  color: var(--white);
  box-shadow: 0 14px 28px -10px rgba(15, 108, 189, 0.55), var(--shadow-glow);
}
.btn--ghost {
  background: var(--white);
  color: var(--ink-800);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.btn--link {
  padding: 0;
  background: transparent;
  color: var(--brand-primary);
  border-radius: 0;
}
.btn--link:hover { color: var(--brand-teal); }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--lg { padding: 16px 28px; font-size: 1rem; }

.btn-arrow { transition: transform var(--t-base) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* -------- Hero -------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(80px, 12vw, 140px) clamp(60px, 8vw, 96px);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(79, 179, 232, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(15, 108, 189, 0.14), transparent 55%),
    radial-gradient(700px 400px at 50% 100%, rgba(26, 77, 125, 0.12), transparent 60%),
    linear-gradient(180deg, var(--white), var(--ink-50));
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__title { margin-bottom: var(--space-5); }
.hero__title .gradient-text {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-sky) 60%, var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  font-size: 1.18rem;
  color: var(--ink-600);
  max-width: 56ch;
  margin-bottom: var(--space-5);
}
.hero__ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.hero__stats {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
.stat__num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 0.82rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
}

/* -------- Hero visual: Fabric architecture diagram -------- */
.hero__visual {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.hero__visual svg { width: 100%; height: 100%; }

/* -------- Card grids -------- */
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* -------- Cards -------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
  position: relative;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 108, 189, 0.45);
}
.card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 108, 189, 0.12), rgba(17, 120, 101, 0.12));
  color: var(--brand-primary);
}
.card__icon svg { width: 22px; height: 22px; }
.card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0;
}
.card__body {
  color: var(--ink-600);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
}
.card__pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--ink-100);
  color: var(--ink-700);
}
.card__pill--blue   { background: rgba(15, 108, 189, 0.12); color: var(--brand-primary); }
.card__pill--teal   { background: rgba(17, 120, 101, 0.12); color: var(--brand-teal); }
.card__pill--purple { background: rgba(98, 100, 167, 0.12); color: var(--brand-purple); }
.card__pill--magenta{ background: rgba(177, 70, 194, 0.12); color: var(--brand-magenta); }
.card__pill--gold   { background: rgba(242, 169, 59, 0.16); color: #a76d12; }
.card__pill--coral  { background: rgba(226, 92, 92, 0.14); color: #b94545; }

.card--link {
  cursor: pointer;
  color: inherit;
}
.card--link::after {
  content: "";
  position: absolute; inset: 0;
}
.card--feature {
  padding: var(--space-6);
  background: linear-gradient(180deg, var(--white), var(--ink-50));
}

/* -------- Solution catalog (filterable grid) -------- */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-6);
  padding: var(--space-3);
  background: var(--ink-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-input input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-900);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-input input:focus {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}
.search-input::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7693' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat center / contain;
  pointer-events: none;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-teal));
  color: var(--white);
  border-color: transparent;
}

/* -------- Guide page layout -------- */
.guide-hero {
  padding-block: clamp(64px, 9vw, 96px) clamp(40px, 6vw, 64px);
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(98, 100, 167, 0.14), transparent 60%),
    radial-gradient(700px 360px at 0% 20%, rgba(15, 108, 189, 0.12), transparent 60%),
    linear-gradient(180deg, var(--white), var(--ink-50));
  border-bottom: 1px solid var(--border);
}
.guide-hero__crumb {
  font-size: 0.85rem;
  color: var(--ink-500);
  margin-bottom: var(--space-4);
}
.guide-hero__crumb a { color: var(--ink-600); }
.guide-hero__crumb a:hover { color: var(--brand-primary); }
.guide-hero__inner {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-5);
  align-items: center;
}
.guide-icon {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.guide-icon svg { width: 44px; height: 44px; }

.guide-meta {
  display: flex; gap: var(--space-3); flex-wrap: wrap;
  margin-top: var(--space-4);
  font-size: 0.88rem;
  color: var(--ink-600);
}
.guide-meta > span { display: inline-flex; align-items: center; gap: 6px; }

.guide-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static !important; }
}

.guide-toc {
  position: sticky;
  top: 96px;
  font-size: 0.9rem;
  border-left: 2px solid var(--border);
  padding-left: var(--space-4);
}
.guide-toc__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.guide-toc a {
  display: block;
  padding: 6px 0;
  color: var(--ink-600);
  font-weight: 500;
  border-left: 2px solid transparent;
  margin-left: -18px;
  padding-left: 16px;
  transition: all var(--t-fast);
}
.guide-toc a:hover { color: var(--brand-primary); }
.guide-toc a.active {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
}

.guide-body h2 {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  scroll-margin-top: 96px;
}
.guide-body h2:first-child { margin-top: 0; padding-top: 0; }
.guide-body h3 {
  margin-top: var(--space-5);
  scroll-margin-top: 96px;
}
.guide-body p, .guide-body ul, .guide-body ol { font-size: 1.02rem; }
.guide-body ul, .guide-body ol { padding-left: 1.4em; margin-bottom: var(--space-4); }
.guide-body li { margin-bottom: 6px; }

.callout {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--ink-50);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  margin-block: var(--space-5);
}
.callout--tip     { border-left-color: var(--brand-teal); background: rgba(17,120,101,0.06); }
.callout--warn    { border-left-color: var(--brand-gold); background: rgba(242,169,59,0.08); }
.callout--insight { border-left-color: var(--brand-purple); background: rgba(98,100,167,0.07); }
.callout p:last-child { margin: 0; }
.callout__icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--white);
  color: var(--brand-primary);
}

/* Step list */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
}
.steps > li {
  position: relative;
  padding: var(--space-4) var(--space-5) var(--space-4) calc(var(--space-7) + 12px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: var(--space-4); top: var(--space-4);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-sky));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.steps strong { color: var(--ink-900); }

/* Related items */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.related-card {
  display: flex; gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--ink-700);
  transition: all var(--t-fast);
}
.related-card:hover {
  border-color: var(--brand-primary);
  transform: translateX(2px);
  color: var(--brand-primary);
}
.related-card__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  flex-shrink: 0;
}

/* -------- CTA section -------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(700px 400px at 80% 30%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(135deg, #0F6CBD 0%, #4FB3E8 60%, #1A4D7D 100%);
  color: var(--white);
  text-align: center;
}
.cta-band h2, .cta-band h3 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.86); max-width: 60ch; margin-inline: auto; }
.cta-band .btn--primary {
  background: var(--white);
  color: var(--brand-primary);
}
.cta-band .btn--primary:hover { color: var(--brand-teal); }
.cta-band .btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.cta-band .btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}

/* -------- Process / steps timeline -------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  position: relative;
}
@media (max-width: 880px) {
  .timeline { grid-template-columns: 1fr; }
}
.timeline__step {
  position: relative;
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.timeline__num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-sky));
  color: var(--white); font-weight: 700;
  margin-bottom: var(--space-3);
}

/* -------- Pricing / engagement -------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 880px) { .tier-grid { grid-template-columns: 1fr; } }
.tier {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.tier--featured {
  border-color: rgba(15, 108, 189, 0.5);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--white), var(--ink-50));
}
.tier--featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-sky));
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.tier__title { font-size: 1.25rem; }
.tier__price { font-size: 2rem; font-weight: 700; color: var(--ink-900); margin-block: var(--space-2); }
.tier__price small { font-size: 0.85rem; color: var(--ink-500); font-weight: 500; }
.tier__features { list-style: none; padding: 0; margin: var(--space-4) 0; }
.tier__features li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 6px 0;
  color: var(--ink-700);
  font-size: 0.95rem;
}
.tier__features li::before {
  content: "";
  width: 18px; height: 18px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23117865' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
  flex-shrink: 0;
}

/* -------- Form -------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}
.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-900);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

/* -------- Logos / trust -------- */
.logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-5);
  align-items: center;
  opacity: 0.7;
}
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  height: 48px;
  color: var(--ink-500);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* -------- Footer -------- */
.footer {
  background: var(--ink-900);
  color: #C7CCD9;
  padding-block: var(--space-7) var(--space-5);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}
@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
.footer h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #98A1B8;
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.footer a { color: #C7CCD9; display: block; padding: 4px 0; font-size: 0.92rem; }
.footer a:hover { color: var(--white); }
.footer__brand .brand { color: var(--white); }
.footer__brand p { color: #98A1B8; margin-top: var(--space-3); font-size: 0.92rem; max-width: 40ch; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: #98A1B8;
}

/* -------- Animated underline link -------- */
.link-anim {
  position: relative;
  font-weight: 600;
  color: var(--brand-primary);
}
.link-anim::after {
  content: "→";
  display: inline-block;
  margin-left: 4px;
  transition: transform var(--t-base) var(--ease-out);
}
.link-anim:hover::after { transform: translateX(4px); }

/* -------- Reveal on scroll -------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* -------- Misc helpers -------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.hide-mobile { display: initial; }
@media (max-width: 600px) { .hide-mobile { display: none; } }

/* Tag/badge */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag--new { background: rgba(177, 70, 194, 0.12); color: var(--brand-magenta); }
.tag--preview { background: rgba(242, 169, 59, 0.18); color: #a76d12; }
.tag--ga { background: rgba(17, 120, 101, 0.14); color: var(--brand-teal); }

/* Hero animation: soft floating shapes */
.hero__shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.hero__shape--1 { width: 320px; height: 320px; background: var(--brand-primary); top: -60px; left: -40px; }
.hero__shape--2 { width: 280px; height: 280px; background: var(--brand-sky); top: 40%; right: -80px; animation-delay: -6s; }
.hero__shape--3 { width: 240px; height: 240px; background: var(--brand-deep); bottom: -50px; left: 30%; animation-delay: -12s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.06); }
  66% { transform: translate(-25px, 25px) scale(0.96); }
}
.hero > .container { position: relative; z-index: 1; }

/* Two-column with image */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.split--reverse > :first-child { order: 2; }
@media (max-width: 880px) { .split--reverse > :first-child { order: 0; } }

/* Diagram tile */
.tile-diagram {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff, #f0f4fa);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.tile-diagram svg { width: 100%; height: 100%; }

/* Print-safe focus */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip to content */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-primary);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ================================================================
   Interactive Fabric Web (bubble network)
   ================================================================ */
.fabric-web-section {
  padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 120px);
  background: linear-gradient(180deg, var(--bg-soft), var(--white));
  position: relative;
  overflow: hidden;
}
.fabric-web-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 80% 30%, rgba(98, 100, 167, 0.08), transparent 60%),
    radial-gradient(700px 400px at 10% 70%, rgba(15, 108, 189, 0.07), transparent 60%);
  pointer-events: none;
}
.fabric-web {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.fabric-web__scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 8px 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-300) transparent;
}
.fabric-web__svg {
  display: block;
  width: 100%;
  min-width: 880px;
  height: auto;
  font-family: var(--font-sans);
  user-select: none;
}
/* On phones, let the bubble web compress to ~700px so users don't have
   to scroll as far. Combined with the JS auto-center, it lands with the
   "Fabric" hub bubble visible in the middle of the screen. */
@media (max-width: 760px) {
  .fabric-web__svg { min-width: 700px; }
}
@media (max-width: 480px) {
  .fabric-web__svg { min-width: 620px; }
}

/* Bubble container groups
   IMPORTANT: transform-box + transform-origin: center makes each bubble
   scale around its own center instead of the SVG (0,0) corner.
   Without this, hovering causes the bubble to "fly" toward the corner,
   the cursor falls out of the hit area, mouseleave fires, the bubble
   shrinks back, mouseenter fires again — endless oscillation. */
.web-bubble {
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
  transform-box: fill-box;
  transform-origin: center;
  outline: none;
}
/* Text labels never intercept pointer events — prevents flicker when
   the cursor moves between the circle and its label inside the same bubble. */
.web-bubble text {
  pointer-events: none;
}
.web-bubble:hover,
.web-bubble:focus-visible {
  transform: scale(1.06);
}

.web-bubble__circle--center {
  fill: url(#bubble-grad-center);
  stroke: rgba(255,255,255,0.4);
  stroke-width: 2;
  filter: drop-shadow(0 8px 24px rgba(15, 108, 189, 0.35));
}
.web-bubble__circle--primary {
  stroke: white;
  stroke-width: 2;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.18));
}
.web-bubble__circle--item {
  fill: white;
  stroke-width: 2;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.12));
}
.web-bubble:hover .web-bubble__circle--item {
  stroke-width: 3;
  fill: var(--bubble-tint, #F8FAFD);
}

.web-bubble__label--center {
  fill: white;
  font-size: 22px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  letter-spacing: -0.01em;
}
.web-bubble__sub--center {
  fill: rgba(255,255,255,0.85);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-anchor: middle;
  dominant-baseline: middle;
}
.web-bubble__label--primary {
  fill: white;
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  letter-spacing: 0;
  pointer-events: none;
}
.web-bubble__label--item {
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

/* Connection lines */
.web-line {
  stroke: var(--ink-300);
  stroke-width: 1.5;
  fill: none;
  opacity: 0.55;
}
.web-line--primary {
  stroke: var(--brand-primary);
  stroke-opacity: 0.35;
  stroke-width: 2;
  stroke-dasharray: none;
}
.web-line--item {
  stroke-dasharray: 3 4;
}

/* Tooltip */
.web-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink-900);
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 300px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255,255,255,0.05);
  z-index: 20;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.web-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.web-tooltip__title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 4px;
  color: white;
  letter-spacing: -0.01em;
}
.web-tooltip__category {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #67B5FF;
  margin-bottom: 6px;
}
.web-tooltip__desc {
  color: rgba(255,255,255,0.82);
  margin: 0;
}
.web-tooltip__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  color: #67B5FF;
  font-weight: 600;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
}

/* Legend */
.web-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: center;
  margin-top: var(--space-6);
  font-size: 0.85rem;
  color: var(--ink-600);
}
.web-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.web-legend__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink-300);
  background: white;
}

/* Hint label */
.web-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-500);
  margin-bottom: var(--space-5);
}
.web-hint kbd {
  background: var(--ink-100);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.8em;
  font-family: var(--font-mono);
  color: var(--ink-700);
}

@media (max-width: 760px) {
  .web-tooltip { display: none !important; }
}

/* ================================================================
   Client portal (login + dashboard)
   ================================================================ */

/* Login screen */
.login-screen {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, var(--bg-soft), var(--white));
}
@media (max-width: 880px) {
  .login-screen { grid-template-columns: 1fr; min-height: auto; }
}

.login-side {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(800px 500px at 80% 30%, rgba(98, 100, 167, 0.2), transparent 60%),
    radial-gradient(700px 400px at 20% 80%, rgba(17, 120, 101, 0.18), transparent 60%),
    linear-gradient(135deg, #0F6CBD 0%, #117865 60%, #6264A7 100%);
  color: white;
}
.login-side h2, .login-side h3 { color: white; }
.login-side p { color: rgba(255,255,255,0.86); }
.login-side ul { color: rgba(255,255,255,0.86); }
.login-side .eyebrow { color: rgba(255,255,255,0.85); }

.login-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 64px);
  max-width: 480px;
  width: 100%;
  margin-inline: auto;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--ink-500);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-microsoft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-900);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
}
.btn-microsoft:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
  color: var(--ink-900);
}
.btn-microsoft__logo {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 18px; height: 18px;
  gap: 1.5px;
}
.btn-microsoft__logo span {
  background: #F25022;
}
.btn-microsoft__logo span:nth-child(2) { background: #7FBA00; }
.btn-microsoft__logo span:nth-child(3) { background: #00A4EF; }
.btn-microsoft__logo span:nth-child(4) { background: #FFB900; }

/* Portal layout */
.portal {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
}
@media (max-width: 880px) {
  .portal { grid-template-columns: 1fr; }
  .portal__sidebar { position: static !important; height: auto !important; border-right: none !important; border-bottom: 1px solid var(--border); }
}

.portal__sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  background: var(--ink-50);
  border-right: 1px solid var(--border);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.portal__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--border);
}
.portal__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-teal));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}
.portal__user-meta { flex: 1; min-width: 0; }
.portal__user-name { font-weight: 600; color: var(--ink-900); font-size: 0.92rem; }
.portal__user-org { color: var(--ink-500); font-size: 0.8rem; }

.portal__nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--ink-700);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--t-fast);
}
.portal__nav-link:hover { background: var(--white); color: var(--brand-primary); }
.portal__nav-link[aria-current="page"] {
  background: var(--white);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.portal__nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.portal__main {
  padding: clamp(24px, 4vw, 48px);
  background: var(--white);
}
.portal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.portal__header h1 { margin: 0; font-size: 1.8rem; }

/* Stat cards */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.stat-card__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.stat-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card__sub { font-size: 0.85rem; color: var(--ink-600); margin-top: var(--space-2); }
.stat-card__sub.up { color: var(--brand-teal); }
.stat-card__sub.warn { color: #C77700; }

/* Document table */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
.doc-table th, .doc-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.doc-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  font-weight: 600;
  background: var(--ink-50);
}
.doc-table tr:hover { background: var(--ink-50); }
.doc-table .doc-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink-100);
  color: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-table .doc-icon--pdf { background: rgba(226, 92, 92, 0.14); color: #C73E3E; }
.doc-table .doc-icon--docx { background: rgba(15, 108, 189, 0.14); color: var(--brand-primary); }
.doc-table .doc-icon--xlsx { background: rgba(17, 120, 101, 0.14); color: var(--brand-teal); }

.doc-status {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.doc-status--active { background: rgba(17, 120, 101, 0.14); color: var(--brand-teal); }
.doc-status--draft  { background: rgba(242, 169, 59, 0.18); color: #A76D12; }
.doc-status--paid   { background: rgba(98, 100, 167, 0.14); color: var(--brand-purple); }
.doc-status--review { background: rgba(15, 108, 189, 0.14); color: var(--brand-primary); }

/* Project timeline */
.project-progress {
  height: 8px;
  background: var(--ink-100);
  border-radius: 4px;
  overflow: hidden;
}
.project-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-teal));
  border-radius: 4px;
}
