@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Navy = what the generator writes. Coral = what people write. Coral is used for nothing else. */
:root {
  color-scheme: light;
  --navy: #124479;
  --navy-deep: #0d2b4f;
  --muted: #4a5f80;
  --coral: #ea5651;
  --coral-ink: #b3352f;
  --paper: #ffffff;
  --mist: #eef3f9;
  --mist-strong: #d4e0ef;
  --blush: #fdf0ef;
  --rule: #d6dee9;
  --sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy-deep);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }

h1, h2 { color: var(--navy); font-weight: 600; margin: 0; }
p { margin: 0; }

a { color: var(--navy); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 999px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
}
.brand img { display: block; height: 2.1rem; width: auto; }
.header-contact { font-size: 0.9375rem; color: var(--muted); text-decoration: none; }
.header-contact:hover { color: var(--navy); text-decoration: underline; }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 {
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.lede {
  margin-top: 1.75rem;
  max-width: 36rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--navy-deep);
}
.hero .button { margin-top: 2.25rem; }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.button-outline { background: transparent; color: var(--navy); }
.button-outline:hover { background: var(--mist); border-color: var(--navy); }

/* Demo */
.demo { padding-bottom: clamp(4rem, 9vw, 7rem); }
.panes {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.pane {
  margin: 0;
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pane figcaption { display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 1rem; }
.pane figcaption strong { font-size: 0.9375rem; color: var(--navy); }
.pane figcaption span { font-size: 0.8125rem; color: var(--muted); }

.pane-model { border: 2px solid var(--rule); }
.pane-generated { background: var(--mist); box-shadow: inset 4px 0 0 var(--navy); }
.pane-yours { background: var(--blush); box-shadow: inset 4px 0 0 var(--coral); }
.pane-yours figcaption strong { color: var(--coral-ink); }

pre {
  margin: 0;
  overflow-x: auto;
  font: 400 0.8125rem/1.65 var(--mono);
  color: var(--navy-deep);
  tab-size: 4;
}
code { font: inherit; }
.line { display: block; min-height: 1.65em; padding-inline: 0.35rem; margin-inline: -0.35rem; border-radius: 4px; }
.line.added { display: none; }
.k { color: var(--navy); font-weight: 500; }
.t { color: var(--navy); }
.a { color: var(--navy); font-weight: 500; }
.c { color: var(--muted); }
.s { color: var(--navy-deep); }
.pane-yours .k, .pane-yours .a { color: var(--coral-ink); }

.pane-status {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8125rem;
  color: var(--coral-ink);
  font-weight: 600;
  min-height: 1.6em;
}

.demo.is-regenerated .line.added {
  display: block;
  background: var(--mist-strong);
  animation: settle 2.4s ease-out 0.2s forwards;
}
.pane-model .line.added { background: var(--mist); }
@keyframes settle { to { background: transparent; } }

.demo.is-regenerated .pane-generated,
.demo.is-regenerated .pane-model { animation: pulse 0.6s ease-out; }
@keyframes pulse { from { transform: translateY(2px); } to { transform: none; } }

.demo-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.demo-controls p { max-width: 34rem; font-size: 0.9375rem; color: var(--muted); }

/* Sections */
.section, .closing, .site-footer { position: relative; }
.section::before, .closing::before, .site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--rule);
}
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section h2, .closing h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.section-intro { margin-top: 1.25rem; max-width: 40rem; }

.facts { margin: 2.5rem 0 0; display: grid; gap: 0; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 40rem);
  gap: 0.35rem 3rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}
.facts dt { font-weight: 600; color: var(--navy); }
.facts dd { margin: 0; }

/* Many languages, one generator */
.merge {
  margin-top: 2.75rem;
  display: grid;
  grid-template-columns: minmax(0, 26rem) 3.5rem minmax(0, 16rem);
  align-items: center;
}
.merge-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.merge-sources li {
  border: 2px solid var(--rule);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
}
.merge-sources a { color: var(--navy); font-weight: 600; align-self: flex-start; }
.merge-sources a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
.merge-sources a:focus-visible { border-radius: 4px; }
.merge-sources span { font-size: 0.9375rem; color: var(--muted); }
.merge-bracket {
  align-self: stretch;
  margin-block: 2.25rem;
  border: 2px solid var(--navy);
  border-left: 0;
  border-radius: 0 22px 22px 0;
  position: relative;
  margin-right: 1.25rem;
}
.merge-bracket::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 1.25rem;
  border-top: 2px solid var(--navy);
}
.merge-target {
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.merge-target strong { font-size: 1.125rem; }
.merge-target span { color: #d8e3f2; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.75rem; max-width: 46rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  column-gap: 1rem;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
}
.steps strong { color: var(--navy); display: block; }
.limits { margin-top: 2.75rem; max-width: 40rem; color: var(--muted); }

/* Closing */
.closing { padding-block: clamp(3.5rem, 8vw, 6rem); }
.closing p:not(:last-child) { margin-top: 1rem; max-width: 36rem; }
.closing .button { margin-top: 2rem; }

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer img { height: 1.4rem; width: auto; display: block; }

/* Narrow screens */
@media (max-width: 60rem) {
  .panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pane-model { grid-column: 1 / -1; }
}
@media (max-width: 42rem) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .facts > div { grid-template-columns: minmax(0, 1fr); }
  .merge { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .merge-bracket {
    margin: 0 auto;
    width: 0;
    height: 2rem;
    border: 0;
    border-left: 2px solid var(--navy);
    border-radius: 0;
  }
  .merge-bracket::after { display: none; }
  .header-contact { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo.is-regenerated .line.added { animation: none; }
  .demo.is-regenerated .pane-generated,
  .demo.is-regenerated .pane-model { animation: none; }
}
