:root {
  /* Brand gradient: the logo wordmark only */
  --ir-pink: #E8409A;
  --ir-violet-light: #C77DFF;
  --ir-violet-deep: #6930C3;
  /* Links are the only other place violet appears */
  --ir-link: #C77DFF;
  /* Errors */
  --ir-ember: #FF6B35;
  /* Neutrals */
  --ir-void: #0A0810;
  --ir-text: #E4E0EC;
  --ir-text-strong: #F6F4FA;
  --ir-text-dim: #ABA5BB;
  --ir-muted: #8C85A0;
  --ir-border: #221D30;
  --ir-border-strong: #3A3448;
  --ir-surface: rgba(255, 255, 255, 0.03);
  --ir-surface-hover: rgba(255, 255, 255, 0.05);
  --font-body: 'Exo 2', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  /* x-height of each web font, measured; scales the fallback font to match while the web font loads */
  --font-body-adjust: 0.485;
  --font-mono-adjust: 0.516;
  --header-h: 72px;
  --gutter: 32px;
  color-scheme: dark;
}

html {
  scroll-padding-top: var(--header-h);
}


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

body {
  background: var(--ir-void);
  color: var(--ir-text);
  font-family: var(--font-body);
  font-size-adjust: var(--font-body-adjust);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

input, button {
  font: inherit;
  font-size-adjust: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Page transitions between Home and About (browsers without support just navigate) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: rgba(10, 8, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ir-border);
  view-transition-name: site-header;
}

.header-inner {
  max-width: 1040px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.header-mark {
  height: 36px;
  width: auto;
}

.header-wordmark,
.hero-wordmark {
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--ir-pink), var(--ir-violet-light), var(--ir-violet-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-wordmark {
  font-size: 18px;
  letter-spacing: 4px;
}

.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size-adjust: var(--font-mono-adjust);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ir-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ir-text-strong);
}

.site-nav a[aria-current="page"] {
  font-weight: 400;
}

:is(a, button, input):focus-visible {
  outline: 2px solid var(--ir-text);
  outline-offset: 3px;
}

/* Home page: the header has no bar and no brand while the hero is in view (the hero shows the brand).
   Native scroll-driven animation where supported; index.html's script toggles .at-top elsewhere. */
.site-header.at-top {
  background-color: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.at-top .header-brand {
  opacity: 0;
  visibility: hidden;
}

/* ---------------------------------------------------------------- hero (home) */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(62vh, 520px);
  padding: calc(var(--header-h) + 24px) 24px 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-mark {
  height: 168px;
  width: auto;
  margin-bottom: 28px;
}

.hero-wordmark {
  font-size: 56px;
  line-height: 1.2;
  letter-spacing: 8px;
}

.hero-subline {
  font-family: var(--font-mono);
  font-size-adjust: var(--font-mono-adjust);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ir-muted);
  margin-top: 12px;
}

.hero-subline span {
  white-space: nowrap;
}

@keyframes header-bar-in {
  from {
    background-color: transparent;
    border-bottom-color: transparent;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
}

@keyframes header-brand-in {
  from {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes hero-fade {
  to {
    opacity: 0;
  }
}

@keyframes hero-fade-shrink {
  to {
    opacity: 0;
    transform: scale(0.88);
  }
}

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .site-header.is-home {
    animation: header-bar-in auto linear both;
    animation-timeline: scroll(root);
    animation-range: 0 18vh;
  }

  .site-header.is-home .header-brand {
    animation: header-brand-in auto linear both;
    animation-timeline: scroll(root);
    animation-range: 6vh 18vh;
  }

  /* Reduced motion keeps the fade and drops the shrink */
  .hero-content {
    animation: hero-fade auto linear both;
    animation-timeline: scroll(root);
    animation-range: 0 30vh;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-content {
      animation-name: hero-fade-shrink;
    }
  }
}

/* ---------------------------------------------------------------- shared type */

.section-heading {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: 0.5px;
  color: var(--ir-text-strong);
}

.list-label {
  font-family: var(--font-mono);
  font-size-adjust: var(--font-mono-adjust);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ir-muted);
  margin-bottom: 12px;
}

.prose a {
  color: var(--ir-link);
  text-decoration: underline;
  text-decoration-color: var(--ir-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.prose a:hover {
  color: var(--ir-text-strong);
  text-decoration-color: var(--ir-muted);
}

/* ---------------------------------------------------------------- products (home) */

.products {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}

/* Takes focus from the Products link (tabindex="-1"); the focus is for keyboard order, not for show */
.products:focus {
  outline: none;
}

.products-intro {
  max-width: 600px;
  margin: 12px 0 48px;
  font-size: 18px;
  color: var(--ir-text-dim);
}

.products-group + .products-group {
  margin-top: 56px;
}

/* One row per product, separated by hairlines; the row bleeds 16px past the column so its text lines up with the headings */
.product-list {
  list-style: none;
  margin-inline: -16px;
  border-top: 1px solid var(--ir-border);
}

.product-list > li {
  border-bottom: 1px solid var(--ir-border);
}

.product-row {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  grid-template-areas: "name desc meta";
  align-items: baseline;
  gap: 6px 32px;
  padding: 22px 16px;
  color: var(--ir-text);
  text-decoration: none;
  transition: background-color 0.2s;
}

a.product-row:hover {
  background-color: var(--ir-surface-hover);
}

a.product-row:focus-visible {
  outline-offset: -2px;
}

.product-name {
  grid-area: name;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
  color: var(--ir-text-strong);
}

.product-desc {
  grid-area: desc;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ir-text-dim);
}

.product-meta {
  grid-area: meta;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size-adjust: var(--font-mono-adjust);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ir-muted);
}

.product-link {
  white-space: nowrap;
  color: var(--ir-link);
}

.product-status {
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Open source stands out with a light neutral chip and a glyph, not an accent colour */
.product-status.is-oss {
  padding: 3px 9px;
  border-radius: 4px;
  background-color: var(--ir-text);
  color: var(--ir-void);
  font-weight: 400;
}

.product-status.is-oss::before {
  content: "</> ";
  /* Decorative: empty alternative text so screen readers don't read the symbols */
  content: "</> " / "";
}

/* Tools: a denser list than the products */
.product-list.is-compact .product-row {
  padding-block: 14px;
}

.product-list.is-compact .product-name {
  font-size: 17px;
}

.product-list.is-compact .product-desc {
  font-size: 15px;
}

/* ---------------------------------------------------------------- signup (home) */

.signup-section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
}

.signup-form {
  max-width: 600px;
}

.signup-label {
  display: block;
  font-size: 19px;
  color: var(--ir-text);
  margin-bottom: 16px;
}

.signup-row {
  display: flex;
  gap: 12px;
  max-width: 460px;
}

.signup-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 300;
  color: var(--ir-text);
  background: var(--ir-surface);
  border: 1px solid var(--ir-border-strong);
  border-radius: 6px;
}

.signup-input::placeholder {
  color: var(--ir-muted);
}

.signup-btn {
  padding: 13px 26px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ir-void);
  background: var(--ir-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.signup-btn:hover {
  background: var(--ir-text-strong);
}

.signup-btn:disabled {
  cursor: progress;
  background: var(--ir-text-dim);
}

.signup-error,
.signup-status {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size-adjust: var(--font-mono-adjust);
  font-size: 14px;
}

/* The error shows only after the person leaves the field or submits (:user-invalid), and says so in words */
.signup-error {
  display: none;
  color: var(--ir-ember);
}

.signup-form:has(.signup-input:user-invalid) .signup-error {
  display: block;
}

.signup-status {
  color: var(--ir-text);
}

/* Kept in the page while empty so screen readers announce it when it changes */
.signup-status:empty {
  margin-top: 0;
}

.signup-form.is-done .signup-row,
.signup-form.is-done .signup-label {
  display: none;
}

/* ---------------------------------------------------------------- about page */

.about {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 88px) var(--gutter) 96px;
  min-height: calc(100vh - 130px);
}

.about .section-heading {
  margin-bottom: 32px;
}

.about p {
  font-size: 19px;
  margin-bottom: 26px;
}

.about p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- footer */

.footer {
  padding: 48px 24px;
  border-top: 1px solid var(--ir-border);
  text-align: center;
  font-family: var(--font-mono);
  font-size-adjust: var(--font-mono-adjust);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ir-muted);
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--ir-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-links .sep {
  margin: 0 12px;
}

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 700px) {
  .product-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name meta"
      "desc desc";
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 20px;
  }
  .header-mark {
    height: 28px;
  }
  /* The full wordmark and the nav don't fit side by side; keep the name for screen readers */
  .header-wordmark {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .site-nav ul {
    gap: 20px;
  }
  .hero {
    min-height: max(56vh, 440px);
  }
  .hero-mark {
    height: 120px;
  }
  .hero-wordmark {
    font-size: 34px;
    letter-spacing: 5px;
  }
  .hero-subline {
    font-size: 12px;
    letter-spacing: 4px;
  }
  .section-heading {
    font-size: 26px;
  }
  .products-intro,
  .signup-label,
  .about p {
    font-size: 17px;
  }
  .signup-row {
    flex-direction: column;
  }
  .about {
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 64px;
  }
}
