@font-face {
  font-family: "IBM Plex Sans";
  src: url("ibm-plex-sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, sans-serif;

  /* Official Synment & 13 product colours (from brand-palette.json) */
  --c-synment: #14151A;
  --c-syntories: #D4142E;
  --c-synphone: #EA580C;
  --c-synflicks: #9E1A6E;
  --c-synshot: #0FA3A3;
  --c-syntoon: #E23D7B;
  --c-synclass: #1F63D6;
  --c-trybytest: #0E9F4F;
  --c-mathedos: #0284C7;
  --c-mathedos-proof: #1E3A5F;
  --c-create: #7C4DFF;
  --c-space: #3A2A8C;

  /* Dark flagship palette (default) */
  --paper: #0E0F14;
  --paper-2: #14151A;
  --surface: #171921;
  --surface-2: #1E212C;
  --surface-hover: #222633;
  --ink: #F5F6FA;
  --ink-2: #C2C7D4;
  --muted: #8B92A5;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --bar-bg: rgba(14, 15, 20, 0.78);
  --card-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.78);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --pad: clamp(18px, 4.5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
  scroll-padding-top: 84px;
}

html[data-theme="light"] {
  --paper: #FFFFFF;
  --paper-2: #F7F8FB;
  --surface: #F5F6FA;
  --surface-2: #EBEEF5;
  --surface-hover: #E5E9F2;
  --ink: #14151A;
  --ink-2: #3A3F4D;
  --muted: #5C6375;
  --line: rgba(20, 21, 26, 0.09);
  --line-strong: rgba(20, 21, 26, 0.18);
  --bar-bg: rgba(255, 255, 255, 0.84);
  --card-shadow: 0 24px 60px -26px rgba(20, 21, 26, 0.16);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color-scheme: light;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, strong, b, .primary, .group-title {
  font-family: var(--font-display);
}

h1, h2, h3, h4, figure, p {
  margin: 0;
}

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

a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

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

button, summary {
  cursor: pointer;
  color: inherit;
  font: inherit;
}

button {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 0 14px;
  min-height: 44px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

button:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}

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

.skip-link {
  position: absolute;
  inset: 10px auto auto 10px;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Global Apple/Adobe-grade sticky navigation bar (centered nav) */
.bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  margin-inline: calc(-1 * var(--pad));
  padding-inline: var(--pad);
  background: var(--bar-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  flex-shrink: 0;
}

.brand img {
  width: 112px;
  height: auto;
}

.day, .night {
  display: block;
}

.day,
html[data-theme="light"] .night {
  display: none;
}

html[data-theme="light"] .day {
  display: block;
}

.night {
  mix-blend-mode: lighten;
}

html[data-theme="light"] .day {
  mix-blend-mode: multiply;
}

.bar > nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.bar > nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.bar > nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.bar > nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
  font-weight: 600;
}

.tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

.tools a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.tools a:hover {
  color: var(--ink);
  background: var(--surface);
}

.tools button {
  min-height: 34px;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.bar details {
  display: none;
}

/* Flagship buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary,
.secondary,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  width: fit-content;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.22s var(--ease), background-color 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease), box-shadow 0.22s var(--ease), opacity 0.22s var(--ease);
}

.primary {
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  padding: 0 26px;
  font-size: 15px;
}

.primary:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.ghost-btn {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 24px;
  font-size: 15px;
}

.ghost-btn:hover {
  background: var(--surface-2);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.secondary {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
}

.secondary:hover {
  text-decoration-color: var(--ink);
}

/* Scroll reveal animation (progressive enhancement: visible if JS off) */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
}

.js-ready [data-reveal="visible"] {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Generic sections */
.section {
  border-top: 1px solid var(--line);
  padding: clamp(64px, 7.5vw, 112px) 0;
}

.section h2,
.standard h2 {
  font-size: clamp(32px, 3.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.group {
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-height: 44px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--inner-highlight);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), background-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.025em;
}

.group-title::after {
  content: "↗";
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85em;
  color: var(--muted);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.group:hover .group-title::after {
  transform: translate(2px, -2px);
  color: var(--ink);
}

.group small {
  display: block;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 8px;
}

.group-icon {
  width: 40px;
  height: 40px;
  display: block;
  margin-bottom: 22px;
}

.strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.strip h2 {
  max-width: 18ch;
}

.standard {
  padding: clamp(44px, 6vw, 84px) 0;
  min-height: 70vh;
}

.standard h1 {
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.standard > p,
.prose {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-2);
  max-width: 58ch;
}

.date {
  font-size: 14px;
  color: var(--muted);
}

/* Global Enterprise Footer (supports both simple & multi-column corporate footer) */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  display: flex;
  gap: 12px 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

footer strong {
  margin-right: auto;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.015em;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.18s var(--ease);
}

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

footer.site-footer {
  display: block;
  padding: clamp(48px, 6vw, 80px) 0 clamp(36px, 4vw, 52px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.footer-brand img {
  width: 112px;
  height: auto;
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-col h3 {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.footer-col a {
  min-height: 34px;
  font-size: 14px;
  color: var(--muted);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

/* Responsive navigation (<= 1040px) */
@media (max-width: 1040px) {
  .bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding-block: 10px;
    min-height: 62px;
  }
  .bar > nav {
    display: none;
  }
  .brand {
    margin-right: auto;
  }
  .brand img {
    width: 100px;
  }
  .tools {
    margin-left: auto;
    gap: 6px;
  }
  .tools a {
    padding: 0 8px;
    font-size: 13px;
  }
  .tools button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12.5px;
  }
  .bar details {
    display: block;
    order: 3;
  }
  .bar summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
  }
  .bar summary::-webkit-details-marker {
    display: none;
  }
  .bar details[open] {
    width: 100%;
  }
  .bar details[open] summary {
    margin-left: auto;
    display: flex;
    width: fit-content;
    margin-bottom: 10px;
  }
  .mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 0 8px;
    border-top: 1px solid var(--line);
  }
  .mobile-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 500;
  }
  .mobile-links a[aria-current="page"],
  .mobile-links a:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  :root {
    --pad: 16px;
  }
  .brand img {
    width: 82px;
  }
  .bar {
    gap: 4px 6px;
  }
  .tools {
    gap: 4px;
  }
  .tools a {
    padding: 0 5px;
    font-size: 12px;
  }
  .tools button {
    padding: 0 9px;
    font-size: 12px;
    min-height: 36px;
  }
  .bar summary {
    padding: 0 9px;
    font-size: 12px;
    min-height: 36px;
  }
}
