/* Integra house fonts: Work Sans (body) and Work Sans Black (headings),
   as used in Integra's document templates. */
@import url("https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,400;0,500;0,700;0,900;1,400&display=swap");

/* ===== Integra brand colours ===== */
:root {
  --il-blue: #2dafe6;        /* Integra signature blue (logo fan, cover pages) */
  --il-teal: #0f4d64;        /* Integra hyperlink / dark accent */
  --il-red: #d4001a;         /* L-plate red */
  --il-ink: #000000;
  --il-muted: #4f5964;
  --il-card-bg: #ffffff;
  --il-card-border: #e1e5ea;
  --il-tag-bg: #eef1f4;
  --il-link: var(--il-teal);
  --md-text-font: "Work Sans";
}
[data-md-color-scheme="slate"] {
  --il-ink: #ffffff;
  --il-muted: #aab4bf;
  --il-card-bg: #1b2129;
  --il-card-border: #2d3540;
  --il-tag-bg: #2a323d;
  --il-link: #6cc8f0;
}

/* Header: white with a blue rule, like Integra's documents */
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #ffffff;
  --md-primary-fg-color--light: #f3f6f9;
  --md-primary-fg-color--dark: #e6ebf0;
  --md-primary-bg-color: #000000;
  --md-primary-bg-color--light: rgba(0, 0, 0, 0.6);
}
[data-md-color-scheme="slate"][data-md-color-primary="custom"] {
  --md-primary-fg-color: #12171d;
  --md-primary-fg-color--light: #1b2129;
  --md-primary-fg-color--dark: #0b0f13;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
}
[data-md-color-accent="custom"] {
  --md-accent-fg-color: var(--il-blue);
  --md-accent-fg-color--transparent: rgba(45, 175, 230, 0.12);
}
.md-typeset { --md-typeset-a-color: var(--il-link); }
.md-header { border-bottom: 3px solid var(--il-blue); box-shadow: none; }
.md-tabs { border-bottom: 1px solid var(--il-card-border); }
.md-tabs__link--active, .md-tabs__item--active .md-tabs__link { color: var(--il-blue); }

/* Header logo: the full IntegraL mark; hide the duplicate site name */
.md-header__button.md-logo img { height: 1.7rem; width: auto; }
.md-header__topic:first-child .md-ellipsis { visibility: hidden; }
/* Dark theme: swap to the white-lettering logo (L-plate stays white) */
[data-md-color-scheme="slate"] .md-header__button.md-logo img,
[data-md-color-scheme="slate"] .md-nav__button.md-logo img {
  content: url("../assets/integral-logo-dark.svg");
}

/* Headings in Work Sans Black */
.md-typeset h1, .md-typeset h2 { font-weight: 900; color: var(--il-ink); letter-spacing: -0.01em; }
.md-typeset h3 { font-weight: 700; }

/* ===== Home page hero: echoes the blue Integra cover page ===== */
.il-hero {
  text-align: center;
  padding: 3.2rem 1.5rem 2.6rem;
  margin: -0.4rem 0 1.6rem;
  background: var(--il-blue);
  border-radius: 0.8rem;
  color: #ffffff;
}
.md-typeset h1.il-wordmark { margin: 0 auto 1.2rem; line-height: 0; }
.il-logo { width: min(34rem, 92%); height: auto; overflow: visible; }
.il-logo-fan, .il-logo-name { fill: #ffffff; }
/* Knockout outline so the letters stay crisp where they overlap the L-plate */
.il-logo-name { stroke: var(--il-blue); stroke-width: 70px; stroke-linejoin: round; paint-order: stroke; }
/* ===== Home page entrance =====
   SPEED DIAL: 1 = normal, 1.5 = slower, 0.5 = twice as fast.
   Every delay and duration below is multiplied by this number. */
:root { --il-speed: 1; }

/* Times in seconds (at speed 1):
   0.0  fan spins in
   0.4  "integra" fades up
   1.4  L-plate drops in (lands at about 2.3)
   2.8  tagline
   4.2  description
   6.6  search hint
   8.0  cards fade up, one per second */
.il-logo-fan {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: il-spin calc(1.2s * var(--il-speed)) cubic-bezier(.2, .8, .3, 1) both;
}
.il-logo-name { animation: il-fade calc(0.9s * var(--il-speed)) ease-out calc(0.4s * var(--il-speed)) both; }
.il-plate {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transform: rotate(-6deg);
  filter: drop-shadow(0 25px 30px rgba(0, 0, 0, 0.28));
  animation: il-plate-in calc(0.9s * var(--il-speed)) cubic-bezier(.2, 1.4, .4, 1) calc(1.4s * var(--il-speed)) both;
}
.md-typeset .il-slogan { animation: il-rise calc(0.8s * var(--il-speed)) ease-out calc(2.8s * var(--il-speed)) both; }
.md-typeset .il-lede { animation: il-rise calc(0.8s * var(--il-speed)) ease-out calc(4.2s * var(--il-speed)) both; }
.md-typeset .il-search-hint { animation: il-fade calc(0.8s * var(--il-speed)) ease-out calc(6.6s * var(--il-speed)) both; }
.il-hero ~ .il-cards .il-card { animation: il-rise calc(0.8s * var(--il-speed)) ease-out both; }
.il-hero ~ .il-cards .il-card:nth-child(1) { animation-delay: calc(8s * var(--il-speed)); }
.il-hero ~ .il-cards .il-card:nth-child(2) { animation-delay: calc(9s * var(--il-speed)); }
.il-hero ~ .il-cards .il-card:nth-child(3) { animation-delay: calc(10s * var(--il-speed)); }
.il-hero ~ .il-cards .il-card:nth-child(4) { animation-delay: calc(11s * var(--il-speed)); }
.il-hero ~ .il-cards .il-card:nth-child(5) { animation-delay: calc(12s * var(--il-speed)); }
.il-hero ~ .il-cards .il-card:nth-child(6) { animation-delay: calc(13s * var(--il-speed)); }

@keyframes il-spin {
  0%   { opacity: 0; transform: rotate(-270deg) scale(0.4); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes il-plate-in {
  0%   { opacity: 0; transform: translateY(-60%) rotate(-28deg); }
  100% { opacity: 1; transform: translateY(0) rotate(-6deg); }
}
@keyframes il-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes il-rise { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

.md-typeset .il-slogan {
  margin: 0 0 0.6rem;
  font-size: clamp(1.3rem, 3.2vw, 1.8rem);
  font-weight: 900;
  color: #ffffff;
}
.md-typeset .il-lede {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}
.md-typeset .il-search-hint { text-align: center; margin: 0 0 1.4rem; font-size: 0.75rem; color: var(--il-muted); }

/* ===== Section cards ===== */
.il-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.md-typeset a.il-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--il-card-bg);
  border: 1px solid var(--il-card-border);
  border-top: 4px solid var(--il-card-border);
  border-radius: 0.6rem;
  color: var(--il-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.md-typeset a.il-card.is-live { border-top-color: var(--il-blue); }
.md-typeset a.il-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  border-top-color: var(--il-blue);
  color: var(--il-ink);
}
.il-tag {
  align-self: flex-start;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  background: var(--il-tag-bg);
  color: var(--il-muted);
}
.is-live .il-tag { background: var(--il-blue); color: #ffffff; }
.il-card-title { font-size: 1.15rem; font-weight: 900; }
.il-card-text { font-size: 0.78rem; line-height: 1.5; color: var(--il-muted); flex: 1; }
.il-card-go { font-size: 0.75rem; font-weight: 700; color: var(--il-link); }

@media (prefers-reduced-motion: reduce) {
  .il-plate, .il-logo-name, .il-logo-fan, .il-slogan, .il-lede, .il-search-hint, .il-hero ~ .il-cards .il-card { animation: none !important; }
  .md-typeset a.il-card { transition: none; }
}

/* Home page: six section cards in two even rows of three on wider screens */
@media (min-width: 45em) {
  .il-hero ~ .il-cards { grid-template-columns: repeat(3, 1fr); }
}
