/* Certlyst landing page. One brand colour, the logo purple #5a116d, in a scale of shades:
   950 #14051a  900 #230a2c  800 #3a0f47  700 #5a116d (logo)  600 #73208a  500 #8e3aa6
   400 #a24fba  300 #c58fd6  200 #dcbde7  100 #efe3f4  and the logo's paper #f8f8f6.
   The logo mark is always #5a116d; on dark backgrounds it sits on a #f8f8f6 tile, like the logo files.
   Dark by default, light under prefers-color-scheme: light. Every text colour passes WCAG AA
   (ratios checked in code: dark body 17.5, muted 8.7, accent 9.0; light body 15.3, muted 6.7,
   accent 11.4; Chatiso band text 7.0 or more). */
:root {
  color-scheme: dark;
  --brand: #5a116d;
  --paper: #f8f8f6;
  --bg: #0d0710;
  --surface: #1d1124;
  --surface-2: #160c1b;
  --border: #33203d;
  --border-strong: #6d3a82;
  --text: #f4eef6;
  --muted: #bfaec6;
  --accent: #d4a6e3;
  --eyebrow: #c58fd6;
  --title: #dcb3ea;
  --title-glow: 0 0 42px rgba(162, 79, 186, 0.55);
  --chip-border: rgba(197, 143, 214, 0.28);
  --grid-line: rgba(197, 143, 214, 0.07);
  --orb-a: rgba(90, 17, 109, 0.55);
  --orb-b: rgba(142, 58, 166, 0.32);
  --orb-c: rgba(58, 15, 71, 0.7);
  --hero-mark-opacity: 0.22;
  --header-bg: rgba(13, 7, 16, 0.72);
  --card-glow: 0 18px 50px -20px rgba(142, 58, 166, 0.55);
  --shot-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.8);
  --tile-ring: rgba(244, 238, 246, 0.14);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f8f8f6;
    --surface: #ffffff;
    --surface-2: #fcfafd;
    --border: #e7e0ea;
    --border-strong: #c9a6d6;
    --text: #231f22;
    --muted: #5d5562;
    --accent: #5a116d;
    --eyebrow: #73208a;
    --title: #5a116d;
    --title-glow: 0 10px 30px rgba(90, 17, 109, 0.18);
    --chip-border: rgba(90, 17, 109, 0.16);
    --grid-line: rgba(90, 17, 109, 0.06);
    --orb-a: rgba(197, 143, 214, 0.45);
    --orb-b: rgba(220, 189, 231, 0.6);
    --orb-c: rgba(239, 227, 244, 0.9);
    --hero-mark-opacity: 0.07;
    --header-bg: rgba(248, 248, 246, 0.8);
    --card-glow: 0 18px 50px -24px rgba(90, 17, 109, 0.35);
    --shot-shadow: 0 30px 70px -30px rgba(35, 10, 44, 0.55);
    --tile-ring: rgba(90, 17, 109, 0);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* logo: the mark in the exact logo purple */
.mark { display: block; fill: var(--brand); }
.logo-tile {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--tile-ring);
}
.logo-tile .mark { width: 19px; height: 22px; }
.logo-tile.small { width: 26px; height: 26px; border-radius: 7px; }
.logo-tile.small .mark { width: 13px; height: 15px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.wordmark { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.nav-link {
  font-weight: 600; text-decoration: none; padding: 7px 14px;
  border: 1px solid var(--chip-border); border-radius: 999px;
  background: linear-gradient(135deg, rgba(142, 58, 166, 0.16), rgba(90, 17, 109, 0.05));
  transition: border-color 0.15s ease;
}
.nav-link:hover { border-color: var(--border-strong); }

/* hero: grid lines, three soft orbs in brand shades and the "C" mark */
.hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 96px 0 84px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* the glows fade out towards the cards; the mark is outside this mask */
.glow {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 35%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 75% at 50% 35%, #000 30%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.orb-a { width: 520px; height: 420px; left: 50%; top: -140px; transform: translateX(-70%); background: var(--orb-a); }
.orb-b { width: 360px; height: 320px; left: 50%; top: 40px; transform: translateX(15%); background: var(--orb-b); }
.orb-c { width: 420px; height: 260px; left: 50%; bottom: -160px; transform: translateX(-50%); background: var(--orb-c); }
/* the mark fits inside the hero (24px clear of the header and the bottom edge) */
.hero-mark {
  position: absolute; top: 24px; bottom: 24px; left: 50%; transform: translateX(-50%);
  height: calc(100% - 48px); width: auto; aspect-ratio: 314.11 / 359.73;
  max-width: calc(100% - 32px);
  fill: url(#mark-glow); opacity: var(--hero-mark-opacity);
}
/* A solid colour, not gradient text: gradient text is painted only inside its box and
   some browsers cut off the tail of the "y". */
.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 10vw, 4.75rem); font-weight: 750; line-height: 1.15; letter-spacing: -0.035em;
  color: var(--title);
  text-shadow: var(--title-glow);
}
.subtitle { margin: 12px 0 0; font-size: clamp(1.15rem, 3.4vw, 1.6rem); font-weight: 700; letter-spacing: -0.01em; }
.tagline { margin: 16px 0 0; color: var(--muted); font-size: clamp(1.02rem, 2.8vw, 1.2rem); word-spacing: 0.12em; }
/* 5. the one primary action in the hero */
.hero-button {
  display: inline-block; margin-top: 30px; padding: 13px 26px; border-radius: 12px;
  background: linear-gradient(135deg, #73208a, #5a116d);
  color: #ffffff; font-weight: 700; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 28px -12px rgba(90, 17, 109, 0.9);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.hero-button:hover { filter: brightness(1.12); transform: translateY(-1px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
#platform { scroll-margin-top: 84px; }

/* the platform */
.eyebrow {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  margin: 0 0 18px; color: var(--eyebrow);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 48px; height: 1px; }
.eyebrow::before { background: linear-gradient(90deg, transparent, var(--eyebrow)); }
.eyebrow::after { background: linear-gradient(90deg, var(--eyebrow), transparent); }

/* panel with a gradient border in brand shades */
.panel {
  border: 1px solid transparent; border-radius: 24px; padding: 12px;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(140deg, #8e3aa6, var(--border) 30%, var(--border) 70%, #5a116d) border-box;
}
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) {
  .panel { padding: 18px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 22px 24px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #a24fba, #5a116d, transparent);
  opacity: 0; transition: opacity 0.18s ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--card-glow); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.icon-tile {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, #5a116d, #8e3aa6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -8px rgba(90, 17, 109, 0.7);
}
.icon { width: 24px; height: 24px; fill: none; stroke: #ffffff; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 16px 0 6px; font-size: 1.25rem; font-weight: 650; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* Chatiso: a deep band in the logo purple, the same in both themes */
.chatiso {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
  margin: 64px 0 0; padding: 28px 22px;
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(162, 79, 186, 0.45), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(20, 5, 26, 0.75), transparent 70%),
    linear-gradient(135deg, #73208a 0%, #5a116d 45%, #230a2c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
@media (min-width: 880px) {
  .chatiso { grid-template-columns: 5fr 7fr; gap: 44px; padding: 44px; }
}
.band-mark {
  position: absolute; z-index: -1; width: 300px; height: 344px; left: -70px; bottom: -120px;
  fill: #ffffff; opacity: 0.06;
}
.chatiso-text { min-width: 0; }
.chatiso h2 { margin: 0 0 10px; color: #ffffff; font-size: clamp(1.8rem, 4.5vw, 2.3rem); font-weight: 750; letter-spacing: -0.02em; }
.chatiso p { margin: 0 0 24px; color: #ecdcf2; font-size: 1.1rem; }
.button {
  display: inline-block; padding: 12px 22px; border-radius: 12px;
  background: var(--paper); color: #5a116d; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
  transition: background-color 0.15s ease;
}
.button:hover { background: #efe3f4; }
.button:focus-visible { outline-color: #ffffff; }
.shot {
  margin: 0; min-width: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shot-shadow);
  background: #12161c;
}
.shot-bar { display: flex; gap: 6px; padding: 10px 12px; background: rgba(20, 5, 26, 0.55); }
.shot-bar span { width: 9px; height: 9px; border-radius: 50%; }
.shot-bar span:nth-child(1) { background: #c58fd6; }
.shot-bar span:nth-child(2) { background: #a24fba; }
.shot-bar span:nth-child(3) { background: #73208a; }
.shot img { display: block; width: 100%; height: auto; }
@media (prefers-color-scheme: light) {
  .shot { background: #ffffff; }
  .shot-bar { background: #f1e6f6; border-bottom: 1px solid #e3d2eb; }
}

/* footer */
.foot { margin-top: 64px; border-top: 1px solid var(--border); }
.foot-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: 0.92rem; }

@media (prefers-reduced-motion: reduce) {
  .card, .card::before, .button, .nav-link, .hero-button { transition: none; }
  .card:hover, .hero-button:hover { transform: none; }
}
