/*
 * AI2SEE shared site shell
 *
 * Warm technical tokens and the reusable navigation/footer/button/type layer live
 * here so the marketing pages do not develop separate visual identities.
 *
 * Article note: case-study prose remains intentionally constrained inside
 * `.root`. Those pages keep Bricolage Grotesque for reading text, DM Serif
 * Display for editorial headings, and IBM Plex Mono for data labels. The shell
 * around that content uses the site-wide families below.
 */
:root {
  --bg: #fafaf7;
  --surface: #f3f2ed;
  --surface-2: #ecebe4;
  --line: #e4e2d8;
  --line-soft: #edebe3;
  --ink: #14140f;
  --ink-2: #2b2a23;
  --muted: #6b695e;
  --muted-2: #9a9788;
  --accent: #d4541c;
  --accent-hover: #b64616;
  --accent-soft: #fbefe7;
  --panel-dark: #14140f;
  --focus-ring: #d4541c;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --space-shell: 28px;
  --shell-width: 1200px;

  --f-display: 'Instrument Serif', ui-serif, Georgia, serif;
  --f-sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Compatibility aliases for page-local components awaiting extraction. */
  --navy: var(--ink);
  --navy-mid: var(--ink-2);
  --blue: var(--accent);
  --blue-mid: var(--accent-hover);
  --blue-light: var(--accent-soft);
  --gray-50: var(--surface);
  --gray-100: var(--line-soft);
  --gray-200: var(--line);
  --gray-400: var(--muted-2);
  --gray-600: var(--muted);
  --gray-700: var(--ink-2);
  --white: var(--bg);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: var(--f-sans);
  letter-spacing: -0.022em;
}

.container,
.footer-inner {
  width: 100%;
  max-width: var(--shell-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-shell);
  padding-left: var(--space-shell);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease,
    color .18s ease, transform .18s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover { background: #000; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline:hover { background: var(--surface); border-color: var(--ink); }

:where(a[href], button, [role='button'], [tabindex]:not([tabindex='-1'])):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

nav {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  background: rgba(250, 250, 247, .88);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

nav .nav-inner {
  width: 100%;
  max-width: var(--shell-width);
  height: 64px;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-shell);
  padding-left: var(--space-shell);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.logo-mark { width: 22px; height: 22px; flex: none; color: var(--ink); }
.logo-mark .accent { fill: var(--accent); }
.logo span,
.logo .num-2 { color: inherit; }
.logo > span > span,
.logo > .num-2 { color: var(--accent); font-weight: 500; }

nav .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav .nav-links a {
  color: var(--muted);
  font-family: var(--f-sans);
  font-size: 13.5px;
  font-weight: 500;
  transition: color .15s ease;
}

nav .nav-links a:hover,
nav .nav-links a.active { color: var(--ink); }

nav .nav-cta {
  padding: 9px 16px;
  border-radius: var(--radius);
  background: var(--ink) !important;
  color: var(--bg) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

nav .nav-cta:hover { background: #000 !important; color: var(--bg) !important; }

footer {
  background: var(--panel-dark);
  color: rgba(250, 250, 247, .62);
  font-family: var(--f-sans);
  padding: 72px 0 32px;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

footer .footer-brand .logo { display: inline-flex; color: var(--bg); }
footer .footer-brand .logo .logo-mark { color: var(--bg); }
footer .footer-brand p { max-width: 320px; margin-top: 16px; font: 14px/1.7 var(--f-sans); }
footer .footer-col h4 { margin-bottom: 18px; color: var(--bg); font: 600 13px/1.3 var(--f-sans); }
footer .footer-col ul { margin: 0; padding: 0; list-style: none; }
footer .footer-col li { margin-bottom: 10px; }
footer .footer-col a { color: rgba(250, 250, 247, .62); font: 14px/1.4 var(--f-sans); transition: color .15s ease; }
footer .footer-col a:hover { color: var(--accent); }
footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(250, 250, 247, .1);
  font: 13px/1.5 var(--f-sans);
}

/* The homepage Process section consumes the same public tokens as the shell. */
.custom-workflow-section {
  --text-main: var(--ink);
  --text-muted: var(--muted);
  --step-blue: var(--accent);
  --btn-blue: var(--accent-hover);
  --bg-color: var(--bg);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
}

.custom-workflow-section .cw-card { background: var(--bg); }
.custom-workflow-section .cw-btn { border-radius: var(--radius); }

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

@media (max-width: 640px) {
  :root { --space-shell: 20px; }
  footer { padding-top: 56px; }
  footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
