/* Gemology Tools Pro by Gemlab Group — palette and type follow gemlab.io */
:root {
  --black: #000;
  --ink: #111827;
  --heading: #292b3c;
  --text: #374151;
  --muted: #6b7280;
  --white: #fff;
  --grey-50: #f3f4f6;
  --grey-300: #d1d5db;
  --blue: #3b82f6;        /* gemlab brand primary */
  --blue-strong: #2563eb; /* gemlab primary hover; used for buttons/links for contrast */
  --blue-deeper: #1d4ed8;
  --royal: #2a59c1;       /* gemlab feature band */
  --radius: 8px;
  --radius-lg: 14px;
  --wrap: 1120px;
  --gutter: 20px;
  --section-y: 96px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-strong); text-underline-offset: 3px; }
a:hover { color: var(--blue-deeper); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--grey-50);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--heading); flex-shrink: 0; }
.brand-logo { height: 50px; width: auto; }
.brand-by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.brand-by img { height: 50px; width: auto; } /* same height as .brand-logo */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--heading); text-decoration: none; font-weight: 500; font-size: 14px;
  padding: 8px 12px; border-radius: 6px; white-space: nowrap;
}
.site-nav a:hover { background: var(--grey-50); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue-strong); }
.site-nav a.btn { margin-left: 8px; color: var(--white); }
.site-nav a.btn:hover { background: var(--blue-deeper); color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--font);
  padding: 15px 26px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-primary { background: var(--blue-strong); color: var(--white); }
.btn-primary:hover { background: var(--blue-deeper); color: var(--white); }
.btn-light { background: var(--white); color: var(--blue-strong); border-color: var(--grey-300); }
.btn-light:hover { background: var(--grey-50); color: var(--blue-deeper); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #374151; color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.center .btn-row { justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-tight { padding: 64px 0; }
.bg-black { background: var(--black); color: #d1d5db; }
.bg-black h1, .bg-black h2, .bg-black h3 { color: var(--white); }
.bg-black a:not(.btn) { color: #93c5fd; }
.bg-royal { background: var(--royal); color: #e5edff; }
.bg-royal h2, .bg-royal > .wrap > h3 { color: var(--white); }
.bg-grey { background: var(--grey-50); }

.eyebrow {
  display: inline-block; margin: 0 0 14px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-strong);
}
.bg-black .eyebrow, .bg-royal .eyebrow { color: #60a5fa; }
.lead { font-size: 1.15rem; line-height: 1.65; max-width: 680px; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 96px; }
.hero .lead { color: #d1d5db; }
.hero-figure { margin: 0; }
.hero-figure img { border-radius: var(--radius-lg); width: 100%; }
.hero-figure figcaption { font-size: 12.5px; color: #9ca3af; margin-top: 10px; line-height: 1.5; text-align: center; }

.page-hero { padding: 72px 0 64px; }
.page-hero .lead { color: #d1d5db; }

/* ---------- Two-column intro (like gemlab "What is / Who is") ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.split h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }

/* ---------- Feature cards on royal band ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.card {
  background: var(--white); color: var(--text);
  border-radius: var(--radius-lg); padding: 30px 26px;
  text-align: center; box-shadow: 0 1px 2px rgba(17, 35, 55, .08);
}
.card h3 { color: var(--heading); margin-bottom: 8px; font-size: 1.05rem; }
.card p { font-size: 14.5px; line-height: 1.6; margin: 0; color: #4b5563; }
.icon {
  width: 48px; height: 48px; margin: 0 auto 18px;
  display: grid; place-items: center;
  background: var(--blue); color: var(--white); border-radius: var(--radius);
}
.icon svg { width: 24px; height: 24px; }

.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.audience > div { border-top: 3px solid var(--blue); padding-top: 18px; }
.audience h3 { margin-bottom: 6px; }
.audience p { font-size: 15px; margin: 0; }

/* ---------- Photos / media ---------- */
.photo figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.5; text-align: center; }
.photo { margin: 0; }
.photo img { border-radius: var(--radius-lg); }
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.media-row + .media-row { margin-top: 80px; }
.media-row.flip > :first-child { order: 2; }

/* ---------- Version 10 ---------- */
.platforms { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.platform {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid #262626; background: #0b0b0b; border-radius: var(--radius-lg);
  padding: 16px 22px; color: var(--white); font-weight: 600;
}
.platform svg { width: 28px; height: 28px; color: #60a5fa; }
.platform small { display: block; font-weight: 400; color: #9ca3af; font-size: 12.5px; }
.v10-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

/* ---------- Feature list (info page) ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.toc a {
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--white); border: 1px solid #333; border-radius: 999px; padding: 6px 14px;
}
.toc a:hover { background: #1a1a1a; color: var(--white); }
.module-group { padding-top: 72px; scroll-margin-top: 80px; }
.module-group:first-child { padding-top: 0; }
.module-group > h2 { margin-bottom: 8px; }
.module-group > p.lead { margin-bottom: 32px; }
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; margin: 0; }
.modules > div { padding: 20px 0; border-top: 1px solid var(--grey-300); scroll-margin-top: 90px; }
.modules dt, .modules h3 { font-weight: 600; color: var(--heading); font-size: 1.05rem; margin: 0 0 6px; }
.modules dd, .modules p { margin: 0; font-size: 15px; }
.callout {
  background: var(--grey-50); border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 28px 0 0; font-size: 15px;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Timeline (about) ---------- */
.timeline { list-style: none; padding: 0; margin: 36px 0 0; border-left: 2px solid var(--grey-300); }
.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px;
  background: var(--blue); border-radius: 3px; transform: rotate(45deg);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li.now::before { background: var(--ink); }
.timeline .year { font-weight: 700; color: var(--heading); display: block; }
.timeline p { margin: 2px 0 0; font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #9ca3af; padding: 28px 0; font-size: 14px; border-top: 1px solid #262626; }
.footer-bottom { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 13px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --section-y: 72px; }
  .split, .media-row, .v10-grid { grid-template-columns: 1fr; gap: 40px; }
  .media-row.flip > :first-child { order: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
  /* both logos side by side leave no room for the menu, so it drops to its own row */
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 0; padding-top: 10px; }
  .site-nav {
    width: calc(100% + 2 * var(--gutter)); margin: 6px calc(-1 * var(--gutter)) 0;
    padding: 6px var(--gutter) 10px; overflow-x: auto; scrollbar-width: none;
  }
  /* auto-margin spacers centre the links but collapse if the row overflows, so it still scrolls from the start */
  .site-nav::before, .site-nav::after { content: ""; margin: auto; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 8px; font-size: 13.5px; }
  .site-nav a[href="/"] { display: none; } /* the logo already links home */
}
@media (max-width: 760px) {
  :root { --section-y: 60px; --gutter: 16px; }
  .brand-logo, .brand-by img { height: 40px; }
  .hero { padding: 56px 0 64px; }
  .page-hero { padding: 52px 0 48px; }
  .cards, .audience, .modules { grid-template-columns: 1fr; }
  .modules { gap: 0; }
  .media-row + .media-row { margin-top: 56px; }
}
@media (max-width: 480px) {
  .btn-row .btn { width: 100%; }
  .brand { gap: 8px; }
  .brand-by { gap: 6px; }
  .brand-logo, .brand-by img { height: min(34px, 9vw); }
}
@media (max-width: 360px) {
  .site-nav a { padding: 6px 5px; font-size: 13px; } /* keeps the menu on one centred row */
  .site-nav a.btn { margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
