/* AskIT design system
   Shared by every public page. Page-specific styles live in assets/css/<page>.css.
   Scale: 8px spacing, type 12-60px, one brand blue, neutral ink and surfaces. */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #556070;
  --faint: #8a94a6;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-sunken: #eef1f5;

  --brand: #0369a1;
  --brand-hover: #075985;
  --brand-soft: #e6f2fa;
  --brand-ink: #0c4a6e;
  --success: #15803d;
  --success-soft: #e8f6ee;
  --warning: #b45309;
  --warning-soft: #fdf3e2;
  --danger: #b91c1c;
  --danger-soft: #fdecec;

  --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;

  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-xl: 20px; --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.05);

  --container: 1160px;
  --gutter: 24px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 5.2vw, 3.75rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
::selection { background: var(--brand-soft); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-9) 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: var(--space-7); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: var(--space-3); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand);
  margin-bottom: var(--space-4);
}
.lead { font-size: 1.15rem; color: var(--muted); line-height: 1.65; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 44px; padding: 0 18px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.button-primary:hover { background: var(--brand); color: #fff; }
.button-secondary { background: var(--bg); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.button-secondary:hover { border-color: var(--ink); color: var(--ink); }
.button-ghost { background: transparent; color: var(--muted); }
.button-ghost:hover { color: var(--ink); background: var(--bg-sunken); }
.button-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: var(--radius-sm); }
.button-icon { width: 36px; padding: 0; }
.button-light { background: #fff; color: var(--ink); }
.button-light:hover { background: var(--brand-soft); color: var(--brand-ink); }
.button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Tags & status ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  background: var(--bg-sunken); color: var(--ink-2);
}
.tag svg { width: 12px; height: 12px; }
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-warning { background: var(--warning-soft); color: var(--warning); }
.tag-brand { background: var(--brand-soft); color: var(--brand-ink); }
a.tag:hover { filter: brightness(0.97); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--space-6); }
.card-link { transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.icon-tile {
  width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: var(--space-4);
}
.icon-tile svg { width: 20px; height: 20px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--ink-2); }
.checklist svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; margin-top: 4px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 0.8rem; color: var(--faint); font-weight: 400; }
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 0.95rem; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { height: auto; min-height: 132px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23556070' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15); }
.form-alert { display: none; padding: 12px 14px; border-radius: var(--radius); font-size: 0.92rem; font-weight: 500; }
.form-alert.is-success { display: block; background: var(--success-soft); color: var(--success); }
.form-alert.is-error { display: block; background: var(--danger-soft); color: var(--danger); }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.site-nav.is-scrolled { border-bottom-color: var(--line); }
.site-nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 50%; }
.nav-menu { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav-menu a:not(.button) { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav-menu a:not(.button):hover, .nav-menu a[aria-current="page"] { color: var(--ink); background: var(--bg-sunken); }
.nav-menu .button { margin-left: var(--space-2); }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); cursor: pointer; place-items: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aab4c3; padding: var(--space-8) 0 var(--space-6); font-size: 0.92rem; }
.site-footer a { color: #d5dbe5; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: var(--space-7); padding-bottom: var(--space-7); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-top .brand { color: #fff; margin-bottom: var(--space-3); }
.footer-top p { max-width: 340px; line-height: 1.6; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #7d889b; margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-5); font-size: 0.82rem; color: #7d889b; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .section { padding: var(--space-8) 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: grid; }
  .nav-menu {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: var(--space-3) var(--gutter) var(--space-4);
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .site-nav.is-open .nav-menu { display: flex; }
  .nav-menu a:not(.button) { padding: 12px; font-size: 1rem; }
  .nav-menu .button { margin: var(--space-2) 0 0; height: 44px; width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: var(--space-6); }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
}
