/* Altus Initiatives — base styles, design tokens, and component primitives.
   Tokens are the canonical values from altus-vault/public/brand/*; Tailwind (assets/tailwind.config.js)
   maps the same palette/type into utilities. This file owns CSS variables, base type, and reusable
   component classes (wordmark, buttons, eyebrow, nav, fields, reveal, dark-section, sticky CTA). */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=Inter:wght@300;400;500&display=swap');

:root {
  /* Color tokens — mirror of brand-color-tokens.md */
  --slate-deep:  #2C3E50;
  --slate-mid:   #4A6275;
  --slate-light: #7B97A8;
  --slate-tint:  #EDF2F5;
  --brass:       #B8924A;
  --brass-light: #D4AA6A;
  --brass-tint:  #F5ECD8;
  --near-black:  #1A1A1A;
  --off-white:   #F8F7F4;
  --white:       #FFFFFF;

  /* Type tokens — verbatim from brand-typography-tokens.md */
  --font-heading: 'Lora', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-display: 500 48px/1.2 var(--font-heading);
  --text-h1: 500 40px/1.2 var(--font-heading);
  --text-h2: 500 30px/1.3 var(--font-heading);
  --text-h3: 400 21px/1.35 var(--font-heading);
  --text-eyebrow: 500 11px/1 var(--font-body);
  --text-body: 400 16px/1.7 var(--font-body);
  --text-body-sm: 400 15px/1.7 var(--font-body);
  --text-ui: 500 13px/1 var(--font-body);
  --text-caption: 400 12px/1.5 var(--font-body);

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

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: var(--text-body);
  color: var(--near-black);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }

/* ---------- typography helpers (responsive per mobile-layout-spec) ---------- */
.t-display, .t-h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--slate-deep);
  margin: 0;
  font-size: 32px;            /* mobile */
}
@media (min-width: 641px)  { .t-display, .t-h1 { font-size: 40px; } }
@media (min-width: 1025px) { .t-display, .t-h1 { font-size: 48px; line-height: 1.1; } }

.t-h2 {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 26px; line-height: 1.3; letter-spacing: -0.02em;
  color: var(--slate-deep); margin: 0;
}
@media (min-width: 1025px) { .t-h2 { font-size: 30px; } }

.t-h3 {
  font-family: var(--font-heading); font-weight: 400;
  font-size: 20px; line-height: 1.35; color: var(--slate-deep); margin: 0;
}
@media (min-width: 1025px) { .t-h3 { font-size: 21px; } }

.t-body    { font: var(--text-body); margin: 0; }
.t-body-sm { font: var(--text-body-sm); margin: 0; }
.t-ui      { font: var(--text-ui); }
.t-caption { font: var(--text-caption); }
.measure   { max-width: 68ch; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---------- wordmark (brand-logo-tokens) ---------- */
.wordmark { display: inline-flex; flex-direction: column; gap: 6px; line-height: 1; text-decoration: none; }
.wordmark-name {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 21px; letter-spacing: 0.04em; color: var(--slate-deep); line-height: 1;
}
@media (min-width: 1025px) { .wordmark-name { font-size: 24px; } }
.wordmark-descriptor {
  font-family: var(--font-body); font-weight: 400;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); line-height: 1;
}
.wordmark--reversed .wordmark-name { color: var(--off-white); }
.wordmark--reversed .wordmark-descriptor { color: var(--brass-light); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px; line-height: 1;
  min-height: 48px; padding: 0 22px; border-radius: 7px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; user-select: none; white-space: nowrap;
  transition: background-color 200ms var(--ease-settle), color 200ms var(--ease-settle),
              box-shadow 200ms var(--ease-settle), transform 120ms var(--ease-settle);
}
.btn-primary {
  background: var(--brass); color: var(--off-white);
  box-shadow: 0 1px 2px rgba(44,62,80,0.16), 0 8px 18px rgba(184,146,74,0.22);
}
.btn-primary:hover  { background: var(--brass-light); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(44,62,80,0.18); }
.btn-primary:focus-visible { outline: 2px solid var(--slate-deep); outline-offset: 3px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  color: var(--brass); text-decoration: none; min-height: 44px;
  transition: color 200ms var(--ease-settle);
}
.link-arrow:hover { color: var(--brass-light); }
.link-arrow:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 3px; }
.link-arrow .arrow { display: inline-block; transition: transform 220ms var(--ease-settle); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- nav links ---------- */
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  color: var(--slate-mid); text-decoration: none;
  transition: color 200ms var(--ease-settle);
}
.nav-link:hover { color: var(--slate-deep); }
.nav-link:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 3px; }
.nav-link.is-current { color: var(--slate-deep); }
.nav-link.is-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px;
  background: var(--brass); border-radius: 2px;
}
.nav-link--footer { color: var(--slate-light); }
.nav-link--footer:hover { color: var(--off-white); }
.nav-link--footer.is-current { color: var(--off-white); }

/* ---------- form field (Calendly fallback / inputs) ---------- */
.field {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: var(--text-body-sm); color: var(--near-black);
  background: var(--white); border: 1px solid var(--slate-light); border-radius: 8px;
  transition: border-color 200ms var(--ease-settle), box-shadow 200ms var(--ease-settle);
}
.field::placeholder { color: var(--slate-light); }
.field:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(184,146,74,0.18); }

/* ---------- divider ---------- */
.divider { height: 1px; border: 0; background: var(--slate-tint); }
.divider--brass { background: var(--brass-tint); }

/* ---------- cards & content primitives ---------- */
.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--white); border: 1px solid var(--slate-tint);
  border-radius: 14px; padding: 24px;
  box-shadow: 0 1px 2px rgba(44,62,80,0.05), 0 4px 12px rgba(44,62,80,0.06), 0 12px 28px rgba(44,62,80,0.05);
}
.card--interactive { transition: transform 200ms var(--ease-settle), box-shadow 200ms var(--ease-settle); }
.card--interactive:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(44,62,80,0.06), 0 10px 24px rgba(44,62,80,0.08), 0 28px 56px rgba(44,62,80,0.07); }
.card__foot { margin-top: auto; padding-top: 4px; }

/* price · timeline meta line */
.meta-brass { font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0.02em; color: var(--brass); }

/* large outcome stat (case-study cards / proof) */
.stat { font-family: var(--font-heading); font-weight: 500; color: var(--brass); font-size: 34px; line-height: 1.05; letter-spacing: -0.02em; }
@media (min-width: 1025px) { .stat { font-size: 40px; } }

/* index numeral label (01 / 02 / 03) */
.index-num { font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }

/* thin brass top accent (outcome pillars) */
.accent-top { border-top: 2px solid var(--brass-tint); padding-top: 20px; }
.dark-section .accent-top { border-top-color: rgba(212,170,106,0.45); }

/* ---------- dark section (Slate Deep, faint radial wash + subtle grain) ---------- */
.dark-section { position: relative; background: var(--slate-deep); color: var(--off-white); overflow: hidden; }
.dark-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(123,151,168,0.16), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(184,146,74,0.10), transparent 55%);
}
.dark-section::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.05; mix-blend-mode: overlay; background-size: 200px 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dark-section > * { position: relative; z-index: 1; }
.dark-section .t-display, .dark-section .t-h1, .dark-section .t-h2, .dark-section .t-h3 { color: var(--off-white); }
.dark-section .eyebrow { color: var(--brass-light); }

/* secondary/muted body text — adapts to the section's background */
.muted { color: var(--slate-mid); }
.dark-section .muted { color: rgba(248,247,244,0.82); }

/* dark-section adaptive primitives so any element works on slate */
.dark-section .t-caption { color: rgba(248,247,244,0.55); }
.dark-section .meta-brass, .dark-section .index-num { color: var(--brass-light); }
.dark-section .link-arrow { color: var(--brass-light); }
.dark-section .link-arrow:hover { color: var(--off-white); }
.dark-section .divider { background: rgba(255,255,255,0.12); }
.dark-section .card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 1px 2px rgba(0,0,0,0.18), 0 14px 32px rgba(0,0,0,0.24);
}
.dark-section .card .t-h3 { color: var(--off-white); }
.dark-section .card--interactive:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.22), 0 20px 44px rgba(0,0,0,0.30); }

/* ---------- reveal on scroll (transform + opacity only) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 320ms var(--ease-settle), transform 320ms var(--ease-settle); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- sticky CTA ---------- */
.sticky-cta-inner {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(248,247,244,0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--slate-tint);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 240ms var(--ease-settle), transform 240ms var(--ease-settle);
}
.sticky-cta-inner .btn { width: 100%; }
sticky-cta.is-visible .sticky-cta-inner { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 1025px) {
  .sticky-cta-inner {
    left: auto; right: 24px; bottom: 24px; padding: 0;
    background: none; backdrop-filter: none; border: 0;
  }
  .sticky-cta-inner .btn { width: auto; box-shadow: 0 10px 24px rgba(44,62,80,0.16), 0 28px 64px rgba(44,62,80,0.18); }
}

/* ---------- process steps (numbered timeline) ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 20px; position: relative; padding-bottom: 40px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 21px; top: 52px; bottom: 2px; width: 2px; background: var(--slate-tint); }
.step:last-child::before { display: none; }
.step-marker {
  width: 44px; height: 44px; border-radius: 50%; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--brass-tint); color: var(--slate-deep);
  font-family: var(--font-heading); font-weight: 500; font-size: 18px;
}
.step-takeaway { margin-top: 14px; padding: 14px 16px; background: var(--slate-tint); border-radius: 10px; font: var(--text-body-sm); color: var(--slate-mid); }
.step-takeaway b { color: var(--slate-deep); font-weight: 500; }

/* brass-tint note (e.g. audit-credit callout) */
.note-brass { background: var(--brass-tint); color: var(--slate-mid); border-radius: 10px; padding: 14px 16px; font: var(--text-body-sm); }
.note-brass b { color: var(--slate-deep); font-weight: 500; }

/* risk-reversal fear / answer */
.fear { font-family: var(--font-heading); font-style: italic; font-weight: 400; font-size: 20px; line-height: 1.35; color: var(--slate-deep); margin: 0 0 10px; }
@media (min-width: 1025px) { .fear { font-size: 22px; } }

/* included / feature lists (services) */
.list-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.list-check li { position: relative; padding-left: 20px; font: var(--text-body-sm); color: var(--slate-mid); }
.list-check li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; background: var(--brass); transform: rotate(45deg); }
.dark-section .list-check li { color: rgba(248,247,244,0.82); }
.dark-section .list-check li::before { background: var(--brass-light); }

/* small uppercase label */
.card-label { font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-deep); }
.dark-section .card-label { color: var(--off-white); }

/* prose blocks (content pages) */
.prose-block { max-width: 68ch; }
.prose-block > * + * { margin-top: 18px; }

/* Calendly embed frame */
.calendly-frame { background: var(--white); border: 1px solid var(--slate-tint); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(44,62,80,0.05), 0 4px 12px rgba(44,62,80,0.06), 0 12px 28px rgba(44,62,80,0.05); }

/* interactive card as a link */
.card:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.dark-section .card:focus-visible { outline-color: var(--brass-light); }

/* ---------- case study ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: var(--text-ui); color: var(--slate-light); }
.breadcrumb a { color: var(--slate-mid); text-decoration: none; transition: color 200ms var(--ease-settle); }
.breadcrumb a:hover { color: var(--brass); }
.breadcrumb a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 3px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 22px 40px; margin: 0; }
.meta-item { display: flex; flex-direction: column; gap: 5px; }
.meta-item dt { font-family: var(--font-body); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); margin: 0; }
.meta-item dd { font: var(--text-body-sm); color: var(--slate-deep); margin: 0; }

.disclaimer { font-family: var(--font-body); font-style: italic; font-size: 14px; line-height: 1.6; color: var(--slate-mid); border-left: 2px solid var(--brass-tint); padding-left: 16px; }

pre.diagram {
  margin: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: pre;
  background: var(--slate-deep); color: rgba(248,247,244,0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px; line-height: 1.55; padding: 22px; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(44,62,80,0.10), 0 12px 28px rgba(44,62,80,0.12);
}

.tech-table { width: 100%; border-collapse: collapse; }
.tech-table thead th { text-align: left; font-family: var(--font-body); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-light); padding: 0 16px 10px 0; border-bottom: 1px solid var(--slate-tint); }
.tech-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--slate-tint); font: var(--text-body-sm); vertical-align: top; }
.tech-table td:first-child { color: var(--slate-deep); font-weight: 500; width: 42%; }
.tech-table td:last-child { color: var(--slate-mid); }

/* numbered sequence (case-study solution steps) */
.list-num { list-style: none; counter-reset: li; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.list-num > li { counter-increment: li; position: relative; padding-left: 44px; }
.list-num > li::before {
  content: counter(li); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brass-tint); color: var(--slate-deep);
  font-family: var(--font-heading); font-weight: 500; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.list-num .sub { margin-top: 10px; }
.dark-section .list-num > li::before { background: rgba(212,170,106,0.22); color: var(--off-white); }

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .sticky-cta-inner { transition: none; }
  .link-arrow .arrow, .btn { transition: none; }
}
