/* =========================================================
   AI + Systems page
   ========================================================= */

/* ---------- Hero ---------- */
.ais-hero {
  padding: clamp(28px, 4vw, 56px) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.ais-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 960px) { .ais-hero__grid { grid-template-columns: 1fr; } }
.ais-hero__eyebrow { margin-bottom: 24px; }
.ais-hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin-bottom: 22px;
}
.ais-hero__title em { font-style: italic; color: var(--accent); }
.ais-hero__sub {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 32px;
}
.ais-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Workflow diagram (hero right) ---------- */
.ais-flow {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: clamp(22px, 2.4vw, 32px);
}
.ais-flow__title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.ais-flow__loop {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}
.ais-flow__loop::before, .ais-flow__loop::after {
  content: ""; height: 1px; flex: 1; max-width: 120px;
  background: repeating-linear-gradient(90deg, var(--muted-soft) 0 4px, transparent 4px 8px);
}
.ais-flow__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.ais-step { text-align: center; position: relative; }
.ais-step__icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.ais-step__icon svg { width: 22px; height: 22px; }
.ais-step__name {
  font-size: 12px; font-weight: 600; color: var(--ink);
  margin-bottom: 4px; line-height: 1.2;
}
.ais-step__desc {
  font-size: 10.5px; line-height: 1.35; color: var(--muted);
}
.ais-step:not(:last-child) .ais-step__icon::after {
  content: "";
  position: absolute;
  top: 24px; right: -3px;
  width: 6px; height: 6px;
  border-top: 1.4px solid var(--muted-soft);
  border-right: 1.4px solid var(--muted-soft);
  transform: translateX(50%) rotate(45deg);
}
.ais-flow__result {
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: 13px; color: var(--ink);
}
.ais-flow__result svg { width: 16px; height: 16px; color: #2EAA63; }
@media (max-width: 520px) {
  .ais-flow__steps { grid-template-columns: 1fr 1fr; gap: 16px; }
  .ais-step:not(:last-child) .ais-step__icon::after { display: none; }
}

/* ---------- Featured exploration (DriftSense) ---------- */
.ais-feature {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
@media (max-width: 960px) { .ais-feature { grid-template-columns: 1fr; } }
.ais-feature__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  display: flex; align-items: baseline; gap: 6px;
}
.ais-feature__name .spark { color: var(--accent); font-size: 0.6em; }
.ais-feature__desc {
  font-size: 16px; line-height: 1.55; color: var(--ink-soft);
  margin-bottom: 24px; max-width: 42ch;
}
.ais-checklist { display: grid; gap: 13px; margin-bottom: 28px; padding: 0; }
.ais-checklist li {
  display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start;
  font-size: 14.5px; line-height: 1.45; color: var(--ink);
}
.ais-checklist svg { width: 20px; height: 20px; color: #5C7041; }
.ais-feature__cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--ink); padding-bottom: 3px;
  transition: gap var(--t-fast);
}
.ais-feature__cta:hover { gap: 12px; }

/* DriftSense real screen */
.ais-dash-shot {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 24px 56px -36px rgba(20,17,14,0.22);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.ais-dash-shot:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 30px 64px -34px rgba(20,17,14,0.3);
}
.ais-dash-shot img { width: 100%; height: auto; display: block; }

/* DriftSense dashboard mock (legacy) */
.ais-dash {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  display: grid;
  grid-template-columns: 124px 1fr;
  font-size: 11px;
  box-shadow: 0 24px 56px -36px rgba(20,17,14,0.22);
}
.ais-dash__side {
  background: var(--bg-alt);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.ais-dash__brand {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 12px; color: var(--ink);
  margin-bottom: 14px;
}
.ais-dash__brand i {
  width: 18px; height: 18px; border-radius: 5px; background: var(--ink);
  display: inline-block;
}
.ais-dash__nav {
  padding: 7px 9px; border-radius: 6px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.ais-dash__nav.is-on { background: var(--bg); color: var(--ink); font-weight: 600; }
.ais-dash__nav span { width: 11px; height: 11px; border-radius: 3px; background: currentColor; opacity: 0.45; }
.ais-dash__main { padding: 16px; }
.ais-dash__h {
  font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 2px;
}
.ais-dash__sub { font-size: 10px; color: var(--muted); margin-bottom: 14px; }
.ais-dash__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ais-stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.ais-stat__l { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.ais-stat__v { font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--ink); }
.ais-stat__d { font-size: 9px; color: #5C7041; margin-top: 4px; }
.ais-dash__cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.ais-dash__panel-h { font-size: 10px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.ais-theme { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; margin-bottom: 9px; }
.ais-theme__t { font-size: 9.5px; color: var(--ink); }
.ais-theme__t small { display: block; color: var(--muted); font-size: 8px; }
.ais-theme__bar { width: 64px; height: 5px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.ais-theme__bar i { display: block; height: 100%; background: #7FAA6B; border-radius: 999px; }
.ais-rec { font-size: 9px; color: var(--ink-soft); padding: 5px 0; display: flex; gap: 6px; }
.ais-rec::before { content: "›"; color: #5C7041; }
.ais-dash__insight { background: var(--bg-alt); border-radius: 8px; padding: 10px; margin-top: 4px; }
.ais-dash__insight p { font-size: 9px; color: var(--ink-soft); line-height: 1.4; }
.ais-dash__spark { display: flex; align-items: flex-end; gap: 2px; height: 24px; margin-top: 8px; }
.ais-dash__spark span { flex: 1; background: #B6C5A1; border-radius: 1px; }

/* ---------- Agent Experience Design (3 cards) ---------- */
.ais-aed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 880px) { .ais-aed { grid-template-columns: 1fr; } }
.ais-aed__card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex; flex-direction: column;
}
.ais-aed__icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); margin-bottom: 18px;
}
.ais-aed__icon svg { width: 20px; height: 20px; }
.ais-aed__title {
  font-family: var(--serif); font-weight: 400; font-size: 21px;
  line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 10px;
}
.ais-aed__desc { font-size: 14px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 22px; }
.ais-aed__demo { margin-top: auto; }

/* mini human-in-loop */
.ais-hil { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.ais-hil__node { text-align: center; flex: 1; }
.ais-hil__ic {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 8px;
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.ais-hil__ic svg { width: 16px; height: 16px; }
.ais-hil__l { font-size: 10px; color: var(--muted); line-height: 1.2; }
.ais-hil__arr { color: var(--muted-soft); font-size: 12px; }

/* confidence demo */
.ais-conf { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.ais-conf__top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ais-conf__pct { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--ink); }
.ais-conf__tag { font-size: 10px; color: #5C7041; }
.ais-conf__track { height: 6px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.ais-conf__track i { display: block; height: 100%; width: 82%; background: #7FAA6B; }
.ais-conf__factors { display: grid; gap: 5px; }
.ais-conf__factors div { font-size: 10px; color: var(--ink-soft); display: flex; gap: 6px; }
.ais-conf__factors div::before { content: "•"; color: var(--muted-soft); }

/* recovery rows */
.ais-rows { display: grid; gap: 8px; }
.ais-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-size: 12px; color: var(--ink);
}
.ais-row__act { font-size: 10px; font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ais-row.is-done .ais-row__act { color: #5C7041; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Designing with AI + toolkit ---------- */
.ais-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 960px) { .ais-split { grid-template-columns: 1fr; } }

.ais-process {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 24px;
}
@media (max-width: 640px) { .ais-process { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.ais-proc { text-align: center; position: relative; }
.ais-proc__ic {
  width: 38px; height: 38px; border-radius: 9px; margin: 0 auto 10px;
  border: 1px solid var(--line); background: var(--bg);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.ais-proc__ic svg { width: 18px; height: 18px; }
.ais-proc__n { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.ais-proc__d { font-size: 10px; line-height: 1.3; color: var(--muted); }
.ais-process-note { margin-top: 22px; font-size: 13.5px; color: var(--muted); font-style: italic; }

.ais-toolkit { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ais-tool {
  background: var(--bg); padding: 16px 18px;
  display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center;
}
.ais-tool__ic {
  width: 36px; height: 36px; border-radius: 8px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.ais-tool__ic svg { width: 18px; height: 18px; }
.ais-tool__n { font-size: 14px; font-weight: 600; color: var(--ink); }
.ais-tool__d { font-size: 12px; color: var(--muted); line-height: 1.3; }

/* ---------- Closing quote ---------- */
.ais-quote {
  display: grid; grid-template-columns: 44px 1fr; gap: 20px;
  max-width: 880px;
}
.ais-quote__mark { font-family: var(--serif); font-size: 64px; line-height: 0.6; color: #C9B8A3; }
.ais-quote__text {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(20px, 2vw, 28px); line-height: 1.4;
  letter-spacing: -0.005em; color: var(--ink);
}
.ais-quote__text em { color: var(--accent); font-style: italic; }
