/* iast.ai — design system
   Dark by design. One typeface, one accent, an 8px rhythm. Each size below is the only size of its kind. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Surfaces, from the page floor upward */
  --bg: #101318;
  --surface: #151a21;
  --raised: #1b212b;
  --line: #262d38;
  --line-strong: #343d4b;

  /* Text */
  --text: #e8ecf2;
  --text-2: #b5bdca;
  --muted: #8a94a6;

  /* One accent, used for the mark, the verified state, and focus */
  --accent: #4fd1a1;
  --accent-dim: rgba(79, 209, 161, 0.14);

  /* The open state of a finding. Used once. */
  --open: #f08a8a;
  --open-dim: rgba(240, 138, 138, 0.14);

  /* Type: five sizes, three weights */
  --font: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --t-1: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  --t-2: 1.5rem;
  --t-3: 1.125rem;
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-caption: 0.8125rem;

  /* Layout */
  --container: 70rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(4rem, 9vw, 7rem);
  --radius: 6px;
  --radius-lg: 12px;
  --nav-h: 4rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  max-width: 9em;
  font-size: var(--t-1);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--t-2);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--t-3);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Buttons: one height, one radius, one weight */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
}

.button:hover {
  background: #fff;
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo svg {
  width: 1.5rem;
  height: 1.5rem;
}

.logo b {
  font-weight: 600;
}

.logo span {
  color: var(--muted);
}

.header nav a {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.header nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding-block: var(--section);
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--text-2);
}

.status::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-dim);
}

.hero .lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--text);
}

.hero .lede-detail {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text-2);
}

.hero strong {
  font-weight: 500;
  color: var(--text);
}

.byline {
  margin-top: 1.75rem;
  font-size: var(--t-small);
  color: var(--text-2);
}

/* LinkedIn keeps its own blue, at icon size only */
.li {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: #0a66c2;
}

.li-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.button .li {
  color: #0a66c2;
}

/* The finding: the one visual on the page, composed like a finding record */
.finding {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 60px -36px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.finding > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
  font-size: var(--t-caption);
  color: var(--muted);
}

.finding > header strong {
  font-weight: 500;
  color: var(--text);
}

.finding .title {
  padding: 1.25rem 1.25rem 1rem;
}

.finding .title h3 {
  font-size: 1.25rem;
}

.finding .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: var(--t-caption);
  font-weight: 600;
  line-height: 1.4;
  color: var(--chip-fg);
  background: var(--chip-bg);
}

.chip::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}

.chip-open {
  --chip-fg: var(--open);
  --chip-bg: var(--open-dim);
}

.chip-ok {
  --chip-fg: var(--accent);
  --chip-bg: var(--accent-dim);
}

.finding .where {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.finding .where p {
  display: contents;
}

.finding .where code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
}

.finding .where .label {
  grid-column: 1;
  margin: 0;
  width: 3.5rem;
}

.finding .where code {
  grid-column: 2;
}

.finding .where .method {
  color: var(--muted);
}

.finding .where .arrow {
  grid-column: 1;
  padding-left: 0.1rem;
  font-size: var(--t-caption);
  line-height: 1;
  color: var(--muted);
}

.finding .detail {
  padding: 0.5rem 1.25rem 0.75rem;
}

.finding .detail > div {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--line);
}

.finding .detail > div:last-child {
  border-bottom: 0;
}

.finding .label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--muted);
}

.finding .detail p {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--text-2);
}

.finding .detail p b {
  font-weight: 500;
  color: var(--text);
}

/* Sections */
.section {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
}

.section h2 {
  max-width: 36rem;
}

.section .lead {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--text-2);
}

.section .lead-2 {
  margin-top: 0.5rem;
}

/* Second sentence on its own line where the measure allows it; flowing text on narrow screens. */
@media (min-width: 40rem) {
  .lead-2 .line {
    display: block;
  }
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 3rem;
  margin-top: 3rem;
  list-style: none;
  padding: 0;
}

.steps li {
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  transition: border-color 200ms var(--ease);
}

.steps li:hover {
  border-top-color: var(--text);
}

.steps p {
  margin-top: 0.5rem;
  max-width: 36rem;
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--text-2);
}

.facts {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem 2rem;
  margin-top: 3rem;
  max-width: 50rem;
}

.facts dt {
  font-weight: 500;
}

.facts dd {
  color: var(--text-2);
  font-size: var(--t-small);
  line-height: 1.55;
  text-wrap: pretty;
}

.facts dd b {
  font-weight: 500;
  color: var(--text);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.contact p {
  max-width: 28rem;
  font-size: var(--t-small);
  color: var(--text-2);
}

/* Footer */
.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--t-caption);
  color: var(--muted);
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.footer a:hover {
  color: var(--text);
}

/* Motion: one entrance for the finding, a slow pulse on the status dot. Nothing else moves on its own. */
@media (prefers-reduced-motion: no-preference) {
  .finding {
    animation: rise 600ms var(--ease) both;
  }

  .finding .title,
  .finding .where,
  .finding .detail > div {
    animation: rise 500ms var(--ease) both;
  }

  .finding .title { animation-delay: 150ms; }
  .finding .where { animation-delay: 250ms; }
  .finding .detail > div:nth-child(1) { animation-delay: 350ms; }
  .finding .detail > div:nth-child(2) { animation-delay: 450ms; }
  .finding .detail > div:nth-child(3) { animation-delay: 550ms; }
  .finding .detail > div:nth-child(4) { animation-delay: 650ms; }

  .status::before {
    animation: pulse 3s ease-in-out infinite;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-dim); }
  50% { box-shadow: 0 0 0 5px var(--accent-dim); }
}

@media (max-width: 56rem) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .finding {
    max-width: 38rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 0.25rem 0;
  }

  .facts dd {
    margin-bottom: 1rem;
  }
}

@media (max-width: 30rem) {
  .finding > header {
    flex-direction: column;
    gap: 0.125rem;
  }
}
