/* IAM RAIN — identity v1.1
   Tokens and measurements are from the design handoff and are final.
   Brand rule: no shadows, glows, gradients, bevels or outlines. BRAND.md section 7. */

/* Fonts ----------------------------------------------------------------- */
/* IBM Plex, SIL OFL 1.1, self-hosted for sovereign posture and to avoid a
   third-party request. Latin1 subset covers the Finnish diacritics in
   Riihimaki and Rayskala. Licence ships alongside at /assets/fonts/. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-Light-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-Regular-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-Medium-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-SemiBold-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-Regular-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-Medium-Latin1.woff2') format('woff2');
}

/* Tokens ---------------------------------------------------------------- */

:root {
  --iam-ground:      #0B2E30;
  --iam-deep:        #06201F;
  --iam-white:       #FFFFFF;

  --iam-teal-100:    #DDF3F0;
  --iam-teal-200:    #9FE3DE;
  --iam-teal-300:    #63D0C9;
  --iam-teal-400:    #22B8B4;
  --iam-teal-350:    #14ACA6;
  --iam-teal-500:    #0E9C9E;
  --iam-teal-600:    #0A7B80;
  --iam-teal-700:    #076166;

  --iam-text:        rgba(255,255,255,0.92);
  --iam-text-2:      rgba(255,255,255,0.76);
  --iam-text-3:      rgba(255,255,255,0.68);
  --iam-text-muted:  rgba(255,255,255,0.55);

  --iam-hairline:    rgba(255,255,255,0.14);
  --iam-divider:     rgba(255,255,255,0.10);
  --iam-tint:        rgba(255,255,255,0.03);
  --iam-tint-teal:   rgba(34,184,180,0.06);

  --iam-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --iam-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --iam-gutter:      72px;
  --iam-gutter-sm:   24px;
  --iam-section-y:   88px;
  --iam-gap:         24px;

  --iam-radius:      2px;

  --iam-focus:       #F2C14E;
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--iam-ground);
  color: var(--iam-white);
  font-family: var(--iam-sans);
  font-weight: 300;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--iam-teal-300); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--iam-teal-200); }

:focus-visible { outline: 2px solid var(--iam-focus); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--iam-focus); color: var(--iam-ground);
  padding: .5em 1em; z-index: 100; font-weight: 500;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Type scale ------------------------------------------------------------ */

h1, h2, h3, h4 { font-weight: 300; margin: 0; }

.iam-h1 { font-size: 68px; line-height: 1.06; font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
.iam-h1 strong, .iam-h1 b { font-weight: 600; }
.iam-h2 { font-size: 44px; line-height: 1.15; font-weight: 300; letter-spacing: -0.01em; }
.iam-h3 { font-size: 38px; line-height: 1.2;  font-weight: 300; letter-spacing: -0.01em; }
.iam-h4 { font-size: 30px; line-height: 1.25; font-weight: 600; }
.iam-lead { font-size: 21px; line-height: 1.55; font-weight: 300; color: var(--iam-text-2); max-width: 60ch; }
.iam-body { font-size: 16px; line-height: 1.60; font-weight: 300; color: var(--iam-text-3); }
.iam-stat { font-size: 56px; line-height: 1; font-weight: 300; letter-spacing: -0.02em; color: var(--iam-teal-300); }

.iam-eyebrow {
  font-family: var(--iam-mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--iam-teal-300); font-weight: 400;
}
.iam-section-label {
  font-family: var(--iam-mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--iam-text-muted); font-weight: 400;
}
.iam-link-mono {
  font-family: var(--iam-mono); font-size: 13px; letter-spacing: 0.08em;
  color: var(--iam-teal-400);
}

code, pre, .mono { font-family: var(--iam-mono); }
code {
  font-size: 0.9em; background: var(--iam-tint);
  border: 1px solid var(--iam-hairline); padding: .1em .35em;
}

/* Layout ---------------------------------------------------------------- */

.iam-section { padding: var(--iam-section-y) var(--iam-gutter); }
.iam-section--alt { background: var(--iam-deep); }

/* Actions --------------------------------------------------------------- */

.iam-btn {
  display: inline-block;
  font-family: var(--iam-sans);
  font-size: 16px; font-weight: 500;
  padding: 15px 28px;
  border-radius: var(--iam-radius);
  background: var(--iam-teal-400);
  color: var(--iam-ground);
  border: 0;
  cursor: pointer;
  transition: background .15s ease;
}
.iam-btn:hover { background: var(--iam-teal-300); color: var(--iam-ground); }

.iam-btn--ghost {
  background: transparent; color: var(--iam-white);
  border: 1px solid rgba(255,255,255,0.28);
}
.iam-btn--ghost:hover { background: transparent; border-color: var(--iam-teal-300); color: var(--iam-teal-200); }

.iam-btn--sm { font-size: 15px; padding: 11px 20px; }

.iam-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Surfaces -------------------------------------------------------------- */

.iam-card {
  display: block;
  border: 1px solid var(--iam-hairline);
  background: rgba(255,255,255,0.02);
  padding: 34px 30px 38px;
  color: var(--iam-white);
  transition: border-color .15s ease, background .15s ease;
}
.iam-card:hover { border-color: var(--iam-teal-400); background: var(--iam-tint-teal); color: var(--iam-white); }

.iam-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--iam-gap); }
.iam-card__title { font-size: 26px; font-weight: 600; margin: 0 0 16px; }
.iam-card__claim { font-size: 17px; font-weight: 500; color: var(--iam-teal-300); margin: 0 0 12px; }
.iam-card .iam-body { margin: 0 0 22px; }

.iam-stage {
  border: 1px solid var(--iam-hairline);
  border-top: 3px solid var(--stage, var(--iam-teal-400));
  background: var(--iam-tint);
  padding: 26px 24px 28px;
}
.iam-stage h3 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.iam-stage p  { font-size: 15px; line-height: 1.5; color: var(--iam-text-3); margin: 0; }

.iam-rule-left { border-left: 3px solid var(--iam-teal-400); padding-left: 34px; }

/* Header ---------------------------------------------------------------- */

.iam-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: 22px var(--iam-gutter);
  border-bottom: 1px solid var(--iam-divider);
}
.iam-header nav { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.iam-header nav a { font-size: 15px; font-weight: 400; color: rgba(255,255,255,0.82); }
.iam-header nav a:hover { color: var(--iam-teal-200); }
.iam-header nav a[aria-current="page"] { color: var(--iam-teal-300); }
.iam-header nav a.iam-btn { color: var(--iam-ground); }
.iam-header nav a.iam-btn:hover { color: var(--iam-ground); }

/* Hero ------------------------------------------------------------------ */

.iam-hero {
  display: grid; grid-template-columns: 1fr 380px; gap: 72px; align-items: end;
  padding: 104px var(--iam-gutter) 88px;
}
.iam-hero .iam-eyebrow { display: block; margin: 0 0 26px; }
.iam-hero h1 { margin: 0 0 28px; max-width: 15ch; }
.iam-hero .iam-lead { margin: 0 0 40px; }
.iam-hero img { justify-self: end; }

/* Corridor -------------------------------------------------------------- */

.iam-corridor {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.iam-corridor li { position: relative; }
.iam-corridor li + li::before {
  content: "\2192"; position: absolute; left: -22px; top: 50%; transform: translateY(-50%);
  color: var(--iam-teal-400); font-size: 18px;
}

/* Stats ----------------------------------------------------------------- */

.iam-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--iam-hairline); margin: 34px 0 0;
}
.iam-stats > div { padding: 34px 28px; border-right: 1px solid var(--iam-divider); }
.iam-stats > div:first-child { padding-left: 0; }
.iam-stats > div:last-child  { padding-right: 0; border-right: 0; }
.iam-stats dt { margin: 0; }
.iam-stats dd { margin: 14px 0 0; font-size: 16px; line-height: 1.5; color: var(--iam-text-3); }

/* Split band ------------------------------------------------------------ */

.iam-split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 72px; }
.iam-split p { font-size: 22px; line-height: 1.5; font-weight: 300; margin: 0; }
.iam-split strong { font-weight: 600; color: var(--iam-teal-300); }

/* Prose ----------------------------------------------------------------- */
/* Inner pages are long-form. Constrain the measure and keep the vertical
   rhythm consistent with the sectioned homepage. */

.iam-prose { max-width: 46rem; margin: 0 auto; }
.iam-prose h1 { font-size: 52px; line-height: 1.08; font-weight: 300; letter-spacing: -0.02em; margin: 0 0 28px; text-wrap: balance; }
.iam-prose h2 {
  font-size: 30px; line-height: 1.25; font-weight: 600;
  margin: 64px 0 18px; padding-top: 34px; border-top: 1px solid var(--iam-divider);
}
.iam-prose h3 { font-size: 21px; font-weight: 600; margin: 34px 0 10px; }
.iam-prose p { font-size: 17px; line-height: 1.65; color: var(--iam-text-2); margin: 0 0 20px; max-width: 68ch; }
.iam-prose ul, .iam-prose ol { font-size: 17px; line-height: 1.65; color: var(--iam-text-2); padding-left: 1.2em; margin: 0 0 20px; }
.iam-prose li { margin-bottom: .5em; }
.iam-prose .standfirst { font-size: 21px; line-height: 1.55; color: var(--iam-text-2); max-width: 60ch; }
.iam-prose .iam-btn { margin-top: 12px; }
.iam-prose--wide { max-width: 64rem; }

/* Tables ---------------------------------------------------------------- */
/* Not covered by the design reference. Built from the same tokens: hairline
   rules, mono column heads, square corners, no fills beyond the tint. */

table { width: 100%; border-collapse: collapse; margin: 22px 0 32px; font-size: 15px; }
caption {
  text-align: left; margin-bottom: 14px;
  font-family: var(--iam-mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--iam-text-muted);
}
th, td {
  text-align: left; padding: 16px 18px;
  border-bottom: 1px solid var(--iam-divider);
  vertical-align: top; line-height: 1.5;
}
th {
  font-family: var(--iam-mono); font-size: 12px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--iam-teal-300);
  border-bottom: 1px solid var(--iam-hairline);
}
td { color: var(--iam-text-2); }
td:first-child { color: var(--iam-white); }
tbody tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-block; font-family: var(--iam-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--iam-hairline); padding: .2em .55em;
  color: var(--iam-text-muted);
}
.tag.status-live { color: var(--iam-teal-300); border-color: var(--iam-teal-400); }

/* Diagrams -------------------------------------------------------------- */

.diagram-figure {
  border: 1px solid var(--iam-hairline);
  background: var(--iam-tint);
  padding: 30px; margin: 28px 0;
}
.diagram-figure svg { width: 100%; height: auto; display: block; }
.diagram-text-equivalent { margin-top: 18px; font-size: 14px; color: var(--iam-text-3); }
.diagram-text-equivalent summary { cursor: pointer; color: var(--iam-text); font-weight: 500; }

blockquote {
  border-left: 3px solid var(--iam-teal-400);
  margin: 28px 0; padding-left: 34px;
  font-size: 21px; font-weight: 300; color: var(--iam-text);
}

/* Forms ----------------------------------------------------------------- */

form.contact-form { display: grid; gap: 22px; max-width: 34rem; }
label { display: block; font-size: 15px; font-weight: 500; margin-bottom: .5em; }
input, select, textarea {
  width: 100%; font-family: inherit; font-size: 16px; font-weight: 300;
  background: var(--iam-tint); color: var(--iam-white);
  border: 1px solid var(--iam-hairline);
  border-radius: var(--iam-radius);
  padding: 14px 16px;
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--iam-teal-400); }
textarea { min-height: 9rem; resize: vertical; }
.field-hint { color: var(--iam-text-muted); font-size: 14px; margin-top: 10px; }
.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer ---------------------------------------------------------------- */

.iam-footer { background: var(--iam-deep); padding: 64px var(--iam-gutter) 48px; }
.iam-footer__cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; }
.iam-footer h4 {
  font-family: var(--iam-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--iam-teal-300); font-weight: 400; margin: 0 0 18px;
}
.iam-footer ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 15px; color: var(--iam-text-3);
}
.iam-footer a { color: var(--iam-text-3); }
.iam-footer a:hover { color: var(--iam-teal-200); }
.iam-footer__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 56px; padding-top: 26px;
  border-top: 1px solid var(--iam-divider);
  font-size: 14px; color: rgba(255,255,255,0.5);
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1023px) {
  :root { --iam-gutter: var(--iam-gutter-sm); --iam-section-y: 56px; }

  .iam-h1 { font-size: 40px; }
  .iam-h2 { font-size: 32px; }
  .iam-h3 { font-size: 26px; }
  .iam-lead { font-size: 18px; }
  .iam-stat { font-size: 42px; }
  .iam-prose h1 { font-size: 34px; }
  .iam-prose h2 { font-size: 25px; }

  .iam-header { flex-wrap: wrap; gap: 18px; }
  .iam-header nav { gap: 18px; }

  .iam-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .iam-hero img { justify-self: start; order: -1; width: 180px; height: 180px; }

  .iam-corridor { grid-template-columns: 1fr; gap: 34px; }
  .iam-corridor li + li::before { left: 50%; top: -26px; transform: translateX(-50%) rotate(90deg); }

  .iam-cards { grid-template-columns: 1fr; }
  .iam-split { grid-template-columns: 1fr; gap: 24px; }

  .iam-stats { grid-template-columns: repeat(2, 1fr); }
  .iam-stats > div { border-right: 0; padding: 24px 0; }

  .iam-footer__cols { grid-template-columns: repeat(2, 1fr); }
  .iam-footer__bar { flex-direction: column; align-items: flex-start; }

  table { font-size: 14px; }
  th, td { padding: 12px 10px; }
}

@media (max-width: 640px) {
  .iam-stats { grid-template-columns: 1fr; }
  .table-scroll { overflow-x: auto; }
}
