/*
 * Sage ecosystem hub ("/").
 *
 * Calm white Material-style index: split hero (copy + one rounded glossy
 * illustration), a grid of six outlined product cards, then the plain-language data ledger. Fonts come from a <link> in index.html (style-src allows
 * fonts.googleapis.com). The hub is light-only; color-scheme is forced.
 */
:root {
  --blue: #1638d8;
  --red: #e8322b;
  --purple: #7b3fe4;
  --yellow: #f7c62f;
  --gold: #e9c77a;
  --cream: #fbf3df;
  --green: #1fa64a;
  --ink: #202124;
  --muted: #5f6368;
  --rule: #dadce0;
  --tint: #f8f9fa;
  --primary: #0b57d0;
  --primary-hover: #0842a0;

  --display: "IBM Plex Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --latin: "Archivo", "IBM Plex Sans Thai", system-ui, sans-serif;
  --body: "IBM Plex Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --wrap: min(1240px, 100% - 2.5rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: var(--wrap); margin-inline: auto; }
#products, #data { scroll-margin-top: 5rem; } /* clear the sticky header */
a, button { touch-action: manipulation; -webkit-tap-highlight-color: rgba(11, 87, 208, .14); }
h1, h2, h3 { text-wrap: balance; }
.lede, .sub, .section-lede { text-wrap: pretty; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.bar { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--rule); backdrop-filter: saturate(160%) blur(10px); }
.bar-in { display: flex; align-items: center; gap: 1.25rem; min-height: 4rem; }
.word {
  font-family: var(--latin); font-weight: 800; font-size: 1.75rem;
  letter-spacing: -.01em; line-height: 1; text-decoration: none; display: inline-flex;
  align-items: center; min-height: 3rem;
}
.word span:nth-child(1) { color: var(--blue); }
.word span:nth-child(2) { color: var(--purple); }
.word span:nth-child(3) { color: var(--green); }
.word span:nth-child(4) { color: var(--yellow); }
.word.small { font-size: 1.35rem; }
.tagline { margin: 0; color: var(--muted); font-size: .92rem; padding-left: 1.1rem; border-left: 1px solid var(--rule); }
.bar nav { margin-left: auto; display: flex; gap: .25rem; }
.bar nav a {
  display: inline-flex; align-items: center; min-height: 3rem;
  color: var(--ink); font-weight: 500; font-size: .95rem; text-decoration: none;
  padding: .6rem .95rem; border-radius: 999px; transition: background .2s var(--ease);
}
.bar nav a:hover { background: var(--tint); }
.search {
  flex: none; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--primary); color: #fff; transition: background .2s var(--ease);
}
.search:hover { background: var(--primary-hover); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: 3.5rem; padding-block: 4.5rem 4rem;
}
.hero h1 {
  margin: 0; font-family: var(--body); font-weight: 600;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.3; letter-spacing: -.01em;
}
.hero h1 span { display: block; }
.l1 { color: var(--ink); }
.l2 { color: var(--ink); }
.lede { margin: 1.3rem 0 0; max-width: 35rem; font-size: 1.1rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }
.btn {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.5rem;
  border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; border: 0;
  text-decoration: none; white-space: nowrap; transition: background .2s var(--ease), transform .1s;
}
.btn:hover { background: var(--primary-hover); box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
.btn:active { transform: scale(.98); }
.btn.tonal { background: #fff; color: var(--primary); border: 1px solid var(--rule); }
.btn.tonal:hover { background: #f6f9fe; box-shadow: none; }
.hero-art { width: 100%; border-radius: 28px; aspect-ratio: 16 / 10; object-fit: cover; object-position: 62% 60%; }

/* ---------- Product cards ---------- */
.products { padding-block: 3.5rem 4rem; border-top: 1px solid var(--rule); }
.products-head { margin: 0 0 1.8rem; font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.3; }
.cards {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  display: flex; flex-direction: column; height: 100%;
  padding: 1rem 1rem 1.2rem; border-radius: 24px; text-decoration: none;
  background: #fff; color: var(--ink); border: 1px solid var(--rule);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
a.card:hover { border-color: transparent; box-shadow: 0 1px 3px rgba(20, 30, 70, .12), 0 8px 24px -6px rgba(20, 30, 70, .16); }
a.card:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.card img {
  order: -1; width: 100%; height: 10.5rem; object-fit: contain; padding: 1.1rem;
  border-radius: 16px; background: var(--pt); margin-bottom: 1.1rem;
}
.card h3 { margin: 0 .25rem; font-family: var(--latin); font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
.card h3 .th { font-family: var(--body); font-weight: 600; }
.card .sub { margin: .4rem .25rem 1.1rem; font-size: .93rem; line-height: 1.5; color: var(--muted); }
.foot-row { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: .5rem; margin: auto .25rem 0; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: .82rem;
  padding: .3rem .65rem; border-radius: 8px; background: var(--tint); color: var(--ink); border: 1px solid var(--rule); line-height: 1.3;
  min-width: 0; white-space: normal; overflow-wrap: anywhere;
}
.pill i { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ink); }
.pill.soon { color: var(--muted); }
.pill.soon i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.arrow {
  flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; margin-left: auto;
  background: var(--pt); color: var(--pc); transition: transform .25s var(--ease);
}
a.card:hover .arrow { transform: translateX(3px); }
.card { --pt: #f8f9fa; --pc: #5f6368; }
.card[aria-disabled="true"] { cursor: default; }
.card[aria-disabled="true"] img { opacity: .85; }

.aside { margin: 1.8rem 0 0; color: var(--muted); }
.aside a { font-weight: 600; }

/* ---------- Data ledger ---------- */
.paper { padding-block: 4rem 4.5rem; background: #fff; border-top: 1px solid var(--rule); }
.paper h2 {
  margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.25;
}
.section-lede { max-width: 48rem; color: var(--muted); margin: .8rem 0 2.2rem; font-size: 1.05rem; }
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.row {
  background: #fff; border: 1px solid var(--rule); border-radius: 24px; padding: 1.4rem 1.4rem 1.1rem;
}
.row h3 { margin: 0 0 .6rem; font-size: 1.15rem; display: flex; align-items: center; gap: .55rem; }
.row ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.row li { margin-bottom: .45rem; }
.dot { width: .85rem; height: .85rem; border-radius: 50%; flex: none; }
.dot { background: var(--muted); width: .5rem; height: .5rem; }
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1.1rem; }
.promises > div { border-radius: 24px; padding: 1.3rem 1.4rem; background: var(--tint); border: 1px solid var(--rule); }
.promises h3 { margin: 0 0 .35rem; font-size: 1.08rem; color: var(--ink); }
.promises p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { background: #fff; border-top: 1px solid var(--rule); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; padding-block: 1.3rem; }
.motto {
  margin: 0; font-family: var(--latin); font-weight: 600; font-size: .8rem; letter-spacing: .06em;
  color: var(--ink); padding-left: 1.2rem; border-left: 1px solid var(--rule);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-left: auto; }
.foot nav a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; color: var(--muted); font-size: .88rem; text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.copy { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---------- Responsive ---------- */
/* Six cards sit 3 + 3 from 640px up; iPad (640-1179px) keeps the two-column hero, scaled down. */
@media (max-width: 1179px) {
  .tagline { display: none; }
  .hero { gap: 2rem; padding-block: 3rem; }
  .hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
  .lede { font-size: 1rem; margin-top: 1rem; }
  .cta { margin-top: 1.5rem; }
  .hero-art { border-radius: 20px; }
}
@media (max-width: 900px) {
  .hero { gap: 1.5rem; padding-block: 2.5rem; }
  .btn { min-height: 2.75rem; padding: 0 1.1rem; font-size: .95rem; }
  .ledger, .promises { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .bar-in { flex-wrap: wrap; gap: .25rem .5rem; padding-block: .6rem; }
  .bar nav { order: 3; width: 100%; margin-left: -.6rem; }
  .bar nav a { padding: .55rem .6rem; }
  .search { margin-left: auto; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .hero h1 { font-size: 1.85rem; }
  .cards { grid-template-columns: 1fr; }
  .card img { height: 8.5rem; }
  .foot nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
