/* ==========================================================================
   TestCodeSleep: site theme based on the book "How AI Works"
   Colours: the book cover (navy, teal, yellow, coral, blue, purple) and the
   book's coloured boxes. Fonts: the book's TeX Gyre fonts (URW Gothic style
   titles, Palatino style text, Helvetica style labels), self-hosted.
   ========================================================================== */

@font-face { font-family: 'TCS Adventor'; src: url('../fonts/tgadventor-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TCS Adventor'; src: url('../fonts/tgadventor-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TCS Pagella'; src: url('../fonts/tgpagella-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TCS Pagella'; src: url('../fonts/tgpagella-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'TCS Pagella'; src: url('../fonts/tgpagella-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TCS Heros'; src: url('../fonts/tgheros-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TCS Heros'; src: url('../fonts/tgheros-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* book cover */
  --navy-950: #070e25;
  --navy-900: #0a1330;
  --navy-800: #0f1f42;
  --navy-700: #132c54;
  --navy-600: #1b3a6b;
  --navy-500: #24497f;
  --navy-line: #2d5186;
  --teal: #30c3b6;
  --teal-light: #8dd6d5;
  --teal-ink: #0b7d74;          /* teal for text on light backgrounds (AA) */
  --yellow: #fdc93c;
  --coral: #fc6b49;
  --blue: #50a6dc;
  --purple: #b089e8;
  /* book boxes */
  --amber: #f2a93b;
  --eqblue: #5fb0e6;
  --slate: #a3b1c9;
  --green: #4cc38a;
  --red: #ff6f61;
  /* paper pages */
  --paper: #fbfaf6;
  --paper-2: #f1f3f8;
  --card: #ffffff;
  --ink: #0a1330;
  --ink-2: #2b3652;
  --ink-3: #56627d;
  --rule: #dde3ee;
  /* text on navy */
  --fg: #f2f5fa;
  --fg-2: #c9d3e6;
  --fg-3: #9fb0c8;

  --font-display: 'TCS Adventor', 'Avant Garde', 'Century Gothic', 'URW Gothic', 'Futura', sans-serif;
  --font-serif: 'TCS Pagella', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --font-sans: 'TCS Heros', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 14px 40px rgba(10, 19, 48, .10);
  --shadow-lg: 0 24px 60px rgba(10, 19, 48, .18);
  --header-h: 84px;

  --bs-body-font-family: var(--font-serif);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.68;
  --bs-body-color: var(--ink-2);
  --bs-body-bg: var(--paper);
  --bs-link-color: var(--teal-ink);
  --bs-link-color-rgb: 11, 125, 116;
  --bs-link-hover-color: var(--ink);
  --bs-link-hover-color-rgb: 10, 19, 48;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.14;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.12rem; }
p { margin: 0 0 1.1em; }
a { color: var(--teal-ink); text-decoration-thickness: .08em; text-underline-offset: .18em; transition: color .2s; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
::selection { background: var(--yellow); color: var(--navy-900); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 1000; background: var(--yellow); color: var(--navy-900); padding: 10px 16px; border-radius: 8px; font-family: var(--font-sans); font-weight: 700; }
.skip-link:focus { left: 10px; }
.container { max-width: 1240px; }
.lead { font-size: 1.24rem; line-height: 1.6; color: var(--ink-2); }
em, i { font-style: italic; }
strong, b { font-weight: 700; }

/* small caps label like the book cover's "THE ALGORITHMS & THE MATHEMATICS" */
.label {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin-bottom: 14px;
}
.label .num { color: var(--ink-3); margin-right: .7em; }
/* the yellow bar under the cover title */
.bar { display: block; width: 96px; height: 6px; background: var(--yellow); border: 0; margin: 18px 0 28px; }
.text-center .bar, .bar.center { margin-left: auto; margin-right: auto; }

/* ---------- section backgrounds ---------- */
.section { position: relative; padding: 112px 0; overflow: hidden; }
.section.paper { background: var(--paper); }
.section.paper-2 { background: var(--paper-2); }
.section.dark {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--fg-2);
}
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5 { color: #fff; }
.dark .label { color: var(--teal-light); }
.dark .label .num { color: var(--fg-3); }
.dark .lead { color: var(--fg-2); }
.dark a:not(.tbtn) { color: var(--teal-light); }
.dark a:not(.tbtn):hover { color: #fff; }
.section-head { max-width: 780px; margin-bottom: 56px; }
.section-head.text-center { margin-left: auto; margin-right: auto; }
.section-head h2 { margin-bottom: 0; }
.section-head .lead { margin-top: 0; }

/* faint equations in the background, like the cover */
.eq-faint { position: absolute; pointer-events: none; user-select: none; opacity: .09; height: auto; z-index: 0; }
.paper .eq-faint, .paper-2 .eq-faint { filter: invert(1); opacity: .06; }
.section > .container { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.tbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-sans); font-weight: 700; font-size: .98rem; letter-spacing: .01em;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; line-height: 1.1; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tbtn:hover { transform: translateY(-2px); text-decoration: none; }
.tbtn i { font-size: 1.05em; }
.tbtn-primary { background: var(--yellow); color: var(--navy-900); }
.tbtn-primary:hover { color: var(--navy-900); box-shadow: 0 12px 28px rgba(253, 201, 60, .35); }
.tbtn-teal { background: var(--teal); color: var(--navy-900); }
.tbtn-teal:hover { color: var(--navy-900); box-shadow: 0 12px 28px rgba(48, 195, 182, .35); }
.tbtn-ink { background: var(--ink); color: #fff; }
.tbtn-ink:hover { color: #fff; box-shadow: 0 12px 28px rgba(10, 19, 48, .3); }
.tbtn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.tbtn-outline:hover { background: var(--ink); color: #fff; }
.dark .tbtn-outline, .hero .tbtn-outline, .cta-band .tbtn-outline, .faq-card .tbtn-outline, .book-box.cta .tbtn-outline { border-color: rgba(255, 255, 255, .4); color: #fff; }
.dark .tbtn-outline:hover, .hero .tbtn-outline:hover, .cta-band .tbtn-outline:hover, .faq-card .tbtn-outline:hover, .book-box.cta .tbtn-outline:hover { background: #fff; color: var(--navy-900); border-color: #fff; }
.tbtn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: var(--header-h); display: flex; align-items: center;
  transition: background-color .3s ease, box-shadow .3s ease, height .3s ease;
}
.site-header.scrolled, .site-header.solid {
  background: rgba(10, 19, 48, .94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.site-header.scrolled { --header-h: 70px; }
.site-header .container { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.015em; color: #fff; line-height: 1; }
.brand-name .c { color: var(--teal); }
.brand:hover .brand-name { color: #fff; }

.nav-main ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-main a, .nav-main button.dd-toggle {
  font-family: var(--font-sans); font-weight: 700; font-size: .92rem;
  color: var(--fg-2); text-decoration: none; padding: 10px 12px; border-radius: 10px;
  background: none; border: 0; display: inline-flex; align-items: center; gap: 6px; position: relative;
}
.nav-main a:hover, .nav-main button.dd-toggle:hover, .nav-main a.active { color: #fff; }
.nav-main > ul > li > a.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 3px; background: var(--yellow); border-radius: 2px;
}
.nav-main .dropdown { position: relative; }
.nav-main .dd-menu {
  position: absolute; top: calc(100% + 8px); left: -10px; min-width: 300px;
  background: var(--navy-800); border: 1px solid var(--navy-line); border-radius: 16px;
  padding: 10px; display: block; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s ease;
}
.nav-main .dd-menu .dd-head {
  font-family: var(--font-sans); font-weight: 700; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal-light); padding: 10px 12px 4px;
}
.nav-main .dd-menu a { display: flex; width: 100%; padding: 8px 12px; font-weight: 400; font-size: .92rem; }
.nav-main .dd-menu a:hover { background: rgba(255, 255, 255, .06); }
.nav-main .dropdown:hover .dd-menu, .nav-main .dropdown:focus-within .dd-menu, .nav-main .dropdown.open .dd-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-toggle {
  display: none; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; padding: 4px 6px; margin-left: 6px;
}
.header-cta { margin-left: 8px; }

@media (max-width: 1199.98px) {
  .nav-toggle { display: inline-flex; }
  .nav-main {
    position: fixed; inset: 0; background: var(--navy-950); z-index: 999;
    display: flex; align-items: flex-start; justify-content: center; padding: 96px 24px 40px;
    overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .25s ease;
  }
  body.nav-open .nav-main { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .nav-main ul { flex-direction: column; align-items: stretch; width: 100%; max-width: 460px; gap: 4px; }
  .nav-main a, .nav-main button.dd-toggle { font-size: 1.15rem; padding: 14px 16px; width: 100%; justify-content: space-between; }
  .nav-main > ul > li > a.active::after { display: none; }
  .nav-main .dd-menu {
    position: static; opacity: 1; visibility: visible; transform: none; display: none;
    box-shadow: none; margin: 4px 0 8px; background: rgba(255, 255, 255, .03);
  }
  .nav-main .dropdown.open .dd-menu { display: block; }
  .nav-main .dropdown:hover .dd-menu { opacity: 1; }
  .nav-close { position: absolute; top: 18px; right: 20px; }
  .header-cta { display: none; }
}
@media (min-width: 1200px) { .nav-close { display: none; } }
@media (max-width: 575.98px) { .brand-name { font-size: 1.25rem; } .brand img { width: 38px; height: 38px; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--fg-2);
  padding: calc(var(--header-h) + 70px) 0 90px;
  min-height: min(100vh, 980px); display: flex; align-items: center;
  background:
    radial-gradient(1200px 600px at 78% 40%, rgba(48, 195, 182, .10), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(176, 137, 232, .08), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
}
.hero h1 { color: #fff; margin-bottom: 0; }
.hero h1 .hl { color: var(--teal); }
.hero .lead { font-size: 1.24rem; color: var(--fg-2); max-width: 580px; margin-bottom: 34px; }
.hero .tagline { font-family: var(--font-serif); font-style: italic; color: #fff; font-size: 1.5rem; margin: -6px 0 18px; }
.hero-figure { position: relative; margin: 0; }
.hero-canvas-wrap {
  position: relative; aspect-ratio: 1000 / 760; border-radius: var(--radius-lg);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .035), transparent);
}
.hero-canvas-wrap canvas, .hero-canvas-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-canvas-wrap.live img { display: none; }
.hero-figure figcaption {
  font-family: var(--font-serif); font-style: italic; color: var(--fg-3); font-size: .98rem;
  border-top: 1px solid rgba(141, 214, 213, .25); padding-top: 12px; margin-top: 6px; max-width: 520px;
}
.hero-figure figcaption b { font-style: normal; font-family: var(--font-sans); font-size: .74rem; letter-spacing: .16em; color: var(--teal-light); text-transform: uppercase; margin-right: .6em; }
.stats { display: flex; flex-wrap: wrap; gap: 18px 40px; margin-top: 42px; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.6rem; color: #fff; line-height: 1; letter-spacing: -0.02em; }
.stat > span { display: block; margin-top: 6px; font-family: var(--font-sans); font-weight: 700; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-light); }
.paper .stat b, .paper-2 .stat b { color: var(--ink); }
.paper .stat > span, .paper-2 .stat > span { color: var(--teal-ink); }
.paper .cta-band .stat b { color: #fff; }
.paper .cta-band .stat > span { color: var(--teal-light); }

/* highlights strip under the hero */
.strip { background: var(--navy-950); border-top: 1px solid rgba(255, 255, 255, .06); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.strip .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip a {
  display: flex; align-items: center; gap: 14px; padding: 22px 20px; text-decoration: none; color: var(--fg-2);
  border-right: 1px solid rgba(255, 255, 255, .06); transition: background-color .2s;
}
.strip a:first-child { border-left: 1px solid rgba(255, 255, 255, .06); }
.strip a:hover { background: rgba(255, 255, 255, .03); color: #fff; }
.strip .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.strip b { display: block; font-family: var(--font-display); color: #fff; font-size: 1.02rem; }
.strip small { display: block; font-family: var(--font-sans); font-size: .8rem; color: var(--fg-3); }
@media (max-width: 991.98px) { .strip .container { grid-template-columns: repeat(2, 1fr); } .strip a { border-bottom: 1px solid rgba(255, 255, 255, .06); } }
@media (max-width: 575.98px) { .strip .container { grid-template-columns: 1fr; padding: 0; } .strip a { border-left: 0 !important; border-right: 0; } }

/* ---------- cards & features ---------- */
.figure-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--navy-800); }
.figure-card img { display: block; width: 100%; }
.badge-float {
  position: absolute; right: 22px; bottom: -22px; background: var(--yellow); color: var(--navy-900);
  border-radius: 18px; padding: 16px 22px; box-shadow: var(--shadow-lg); text-align: left;
}
.badge-float b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.badge-float span { font-family: var(--font-sans); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 28px; margin: 30px 0 34px; }
@media (max-width: 575.98px) { .features-grid { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.3rem; color: var(--navy-900); background: var(--teal);
}
.feature h4 { margin: 2px 0 4px; font-size: 1.05rem; }
.feature p { margin: 0; font-size: .98rem; color: var(--ink-3); line-height: 1.55; }
.dark .feature p { color: var(--fg-3); }

.ico-coral { background: var(--coral) !important; }
.ico-yellow { background: var(--yellow) !important; }
.ico-blue { background: var(--blue) !important; }
.ico-purple { background: var(--purple) !important; }
.ico-green { background: var(--green) !important; }
.ico-teal { background: var(--teal) !important; }

/* service cards: like the book's boxes, a coloured bar on the left */
.svc-card {
  position: relative; height: 100%; background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 30px 28px 26px 32px; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.svc-card::before { content: ''; position: absolute; left: 0; top: 22px; bottom: 22px; width: 5px; border-radius: 0 4px 4px 0; background: var(--accent, var(--teal)); }
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc-card .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: var(--navy-900); background: var(--accent, var(--teal)); margin-bottom: 20px; }
.svc-card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.svc-card p { color: var(--ink-3); font-size: 1rem; line-height: 1.6; }
.svc-card ul { list-style: none; padding: 0; margin: 4px 0 22px; }
.svc-card li { display: flex; gap: 10px; align-items: baseline; font-family: var(--font-sans); font-size: .92rem; color: var(--ink-2); padding: 4px 0; }
.svc-card li i { color: var(--teal-ink); }
.svc-card .more { margin-top: auto; font-family: var(--font-sans); font-weight: 700; font-size: .92rem; color: var(--ink); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.svc-card .more i { transition: transform .2s; }
.svc-card:hover .more i { transform: translateX(4px); }
.svc-card .more::after { content: ''; position: absolute; inset: 0; }   /* whole card clickable */
.accent-teal { --accent: var(--teal); } .accent-yellow { --accent: var(--yellow); } .accent-coral { --accent: var(--coral); }
.accent-blue { --accent: var(--blue); } .accent-purple { --accent: var(--purple); } .accent-green { --accent: var(--green); }
.accent-amber { --accent: var(--amber); } .accent-red { --accent: var(--red); } .accent-slate { --accent: var(--slate); }

/* ---------- process (numbered steps like the book's algorithm boxes) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; position: relative; }
.steps::before { content: ''; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(var(--teal), var(--purple)); opacity: .4; }
.steps li { position: relative; display: flex; gap: 22px; padding: 14px 0; }
.steps .n {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--navy-900);
  background: #fff; border: 2px solid var(--teal); box-shadow: 0 0 0 6px var(--paper-2); z-index: 1;
}
.steps li:nth-child(2) .n { border-color: var(--blue); } .steps li:nth-child(3) .n { border-color: var(--purple); }
.steps li:nth-child(4) .n { border-color: var(--coral); } .steps li:nth-child(5) .n { border-color: var(--yellow); }
.steps h3 { font-size: 1.18rem; margin: 6px 0 4px; }
.steps p { margin: 0; color: var(--ink-3); font-size: 1rem; }

/* ---------- AI section ---------- */
.tech-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-item {
  font-family: var(--font-sans); font-weight: 700; font-size: .88rem; padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--rule); color: var(--ink-2);
}
.tech-panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 34px; }
.tech-panel h3 { font-size: 1.2rem; }

/* ---------- the book ---------- */
.book { background:
    radial-gradient(900px 520px at 85% 30%, rgba(253, 201, 60, .07), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%); }
.book-title { font-size: clamp(2.8rem, 6vw, 4.8rem); text-transform: uppercase; letter-spacing: -0.02em; line-height: .98; margin-bottom: 0; }
.book-sub { font-family: var(--font-serif); font-style: italic; color: #fff; font-size: 1.45rem; line-height: 1.35; margin-bottom: 22px; }
.book-cover-wrap { position: relative; perspective: 1400px; max-width: 380px; margin: 0 auto; }
.book-cover {
  display: block; width: 100%; border-radius: 4px 10px 10px 4px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  transform: rotateY(-14deg) rotateX(3deg); transform-origin: left center; transition: transform .5s ease;
}
.book-cover-wrap:hover .book-cover { transform: rotateY(-4deg) rotateX(1deg); }
.book-cover-wrap .ribbon {
  position: absolute; top: 18px; right: -12px; background: var(--yellow); color: var(--navy-900);
  font-family: var(--font-sans); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 6px; box-shadow: var(--shadow);
}
.book-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 18px 34px; margin: 26px 0 32px; justify-content: start; }
@media (max-width: 575.98px) { .book-facts { grid-template-columns: repeat(2, auto); } }
.book-facts b { display: block; font-family: var(--font-display); color: #fff; font-size: 2.1rem; line-height: 1; }
.book-facts span { display: block; margin-top: 6px; font-family: var(--font-sans); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-light); }

/* the book's coloured boxes */
.anatomy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 70px; }
@media (max-width: 991.98px) { .anatomy { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .anatomy { grid-template-columns: 1fr; } }
.bbox {
  position: relative; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px; padding: 20px 20px 18px 24px; overflow: hidden;
}
.bbox::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent, var(--teal)); }
.bbox .k { font-family: var(--font-sans); font-weight: 700; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent, var(--teal)); }
.bbox h4 { color: #fff; font-size: 1.05rem; margin: 6px 0 6px; }
.bbox p { margin: 0; font-size: .95rem; color: var(--fg-3); line-height: 1.5; }
.bbox.intro { background: transparent; border: 0; padding-left: 0; }
.bbox.intro::before { display: none; }
.bbox.intro h4 { font-size: 1.35rem; }
.parts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.parts span { font-family: var(--font-sans); font-size: .82rem; color: var(--fg-2); padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; }
.parts span b { color: var(--yellow); margin-right: 6px; }

/* ---------- videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
@media (max-width: 1199.98px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
.vcard { position: relative; display: block; text-decoration: none; color: inherit; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.vcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: inherit; }
.vcard .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--navy-800); }
.vcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard .play { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: var(--navy-900); display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); opacity: 0; transform: scale(.8); transition: all .2s; }
.vcard:hover .play { opacity: 1; transform: scale(1); }
.vcard .meta { padding: 12px 14px 14px; }
.vcard .ep { font-family: var(--font-sans); font-weight: 700; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-ink); }
.vcard h3 { font-size: 1rem; margin: 4px 0 4px; }
.vcard small { font-family: var(--font-sans); color: var(--ink-3); font-size: .78rem; }

/* ---------- products ---------- */
.product { height: 100%; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product .pimg { background: var(--navy-800); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.product .pimg img { width: 100%; height: 100%; object-fit: cover; }
.product .pimg.cover { background: linear-gradient(180deg, var(--navy-900), var(--navy-700)); }
.product .pimg.cover img { width: auto; height: 86%; object-fit: contain; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); border-radius: 3px; }
.product .pbody { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.product .kind { font-family: var(--font-sans); font-weight: 700; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal-ink); }
.product h3 { font-size: 1.45rem; margin: 6px 0 6px; }
.product .tag { font-family: var(--font-serif); font-style: italic; color: var(--ink-2); font-size: 1.08rem; margin-bottom: 14px; }
.product ul { list-style: none; padding: 0; margin: 0 0 22px; }
.product li { display: flex; gap: 10px; align-items: baseline; font-size: .98rem; color: var(--ink-3); padding: 3px 0; }
.product li i { color: var(--teal-ink); }
.product .btn-row { margin-top: auto; }

/* ---------- consultation band ---------- */
.cta-band { position: relative; border-radius: 28px; padding: 56px; overflow: hidden;
  background: radial-gradient(700px 380px at 90% 10%, rgba(253, 201, 60, .14), transparent 60%), linear-gradient(135deg, var(--navy-800), var(--navy-600));
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band .label { color: var(--teal-light); }
.cta-band p { color: var(--fg-2); font-size: 1.12rem; }
@media (max-width: 575.98px) { .cta-band { padding: 34px 24px; } }

/* ---------- why us ---------- */
.stats-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); margin-top: 22px; }
.stats-card div { background: var(--card); padding: 20px 22px; }
.stats-card b { display: block; font-family: var(--font-display); font-size: 2.1rem; color: var(--ink); line-height: 1; }
.stats-card div > span { font-family: var(--font-sans); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); }

/* ---------- bookshelf ---------- */
.shelf-wrap { position: relative; }
.shelf {
  display: flex; align-items: flex-end; gap: 10px; padding: 0 14px; min-height: 340px;
  border-bottom: 16px solid #2a4a7c; box-shadow: 0 22px 30px -20px rgba(0, 0, 0, .7);
}
.spine {
  position: relative; flex: none; width: var(--w, 90px); height: var(--h, 300px);
  background: var(--sbg, var(--teal)); color: var(--sfg, var(--navy-900)); text-decoration: none;
  border-radius: 6px 6px 2px 2px; transition: transform .25s ease;
  box-shadow: inset -7px 0 0 rgba(0, 0, 0, .12), inset 7px 0 0 rgba(255, 255, 255, .14);
}
.dark a.spine, .dark a.spine:hover { color: var(--sfg, var(--navy-900)); }
.spine:hover { transform: translateY(-16px); }
.spine .t {
  position: absolute; left: 50%; top: calc((var(--h, 300px) - 44px) / 2); width: calc(var(--h, 300px) - 74px);
  transform: translate(-50%, -50%) rotate(-90deg); text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.12;
}
.spine .a {
  position: absolute; left: 0; right: 0; bottom: 12px; text-align: center;
  font-family: var(--font-sans); font-weight: 700; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75;
}
.spine.navy { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset -7px 0 0 rgba(0, 0, 0, .2); }
.spine.navy::before { content: ''; position: absolute; left: 50%; top: 16px; width: 26px; height: 5px; background: var(--yellow); transform: translateX(-50%); }
.shelf .face-out { flex: none; height: 340px; margin-left: auto; border-radius: 3px 8px 8px 3px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.shelf .face-out img { height: 100%; width: auto; display: block; border-radius: 3px 8px 8px 3px; }
@media (max-width: 991.98px) { .shelf .face-out { display: none; } }
@media (max-width: 767.98px) {
  .shelf { flex-direction: column; align-items: stretch; min-height: 0; border-bottom: 0; box-shadow: none; padding: 0; }
  .spine { width: auto; height: auto; padding: 16px 18px 16px 24px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .spine:hover { transform: translateX(6px); }
  .spine .t, .spine .a { position: static; transform: none; width: auto; text-align: left; }
  .spine.navy::before { display: none; }
}

/* ---------- FAQ ---------- */
.faq-list details { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--paper-2); color: var(--ink);
  display: grid; place-items: center; font-family: var(--font-sans); font-size: 1.2rem; line-height: 1; transition: transform .2s, background .2s;
}
.faq-list details[open] summary::after { content: '\2212'; background: var(--yellow); }
.faq-list details[open] { border-color: transparent; box-shadow: var(--shadow); }
.faq-list details > div { padding: 0 24px 20px; color: var(--ink-3); }
.faq-list details > div p { margin: 0; }
.faq-card { background: var(--ink); color: var(--fg-2); border-radius: var(--radius-lg); padding: 34px; position: sticky; top: 110px; }
.faq-card i.big { font-size: 2.4rem; color: var(--yellow); }
.faq-card h3 { color: #fff; margin-top: 12px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
@media (max-width: 767.98px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 24px; }
.contact-item i { font-size: 1.5rem; color: var(--yellow); }
.contact-item h4 { margin: 10px 0 6px; font-size: 1rem; font-family: var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-light) !important; }
.contact-item p { margin: 0; color: #fff; }
.contact-item a { color: #fff !important; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: var(--fg-3); padding: 70px 0 34px; font-size: .98rem; }
.site-footer h5 { font-family: var(--font-sans); font-weight: 700; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-light); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--fg-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .quote { font-family: var(--font-serif); font-style: italic; color: var(--fg-2); font-size: 1.05rem; border-left: 3px solid var(--yellow); padding-left: 14px; margin-top: 18px; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 46px; padding-top: 22px; font-family: var(--font-sans); font-size: .82rem; color: var(--fg-3); }
.site-footer .legal p { margin: 0 0 4px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #fff; font-size: 1.1rem; }
.social a:hover { background: var(--yellow); color: var(--navy-900); text-decoration: none; }

.scroll-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 46px; height: 46px; border-radius: 50%;
  background: var(--yellow); color: var(--navy-900); display: grid; place-items: center; font-size: 1.6rem;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s; text-decoration: none;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { color: var(--navy-900); }

/* ---------- inner pages (services) ---------- */
.page-title {
  position: relative; overflow: hidden; color: var(--fg-2);
  padding: calc(var(--header-h) + 64px) 0 0;
  background:
    radial-gradient(900px 400px at 85% 20%, rgba(48, 195, 182, .12), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-700));
}
.page-title .heading { padding-bottom: 56px; }
.page-title h1 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.page-title h1::after { content: ''; display: block; width: 96px; height: 6px; background: var(--yellow); margin: 22px auto 0; }
.page-title p { color: var(--fg-2); font-size: 1.16rem; margin-top: 22px !important; }
.page-title .breadcrumbs { background: rgba(0, 0, 0, .18); border-top: 1px solid rgba(255, 255, 255, .06); padding: 14px 0; }
.page-title .breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; font-family: var(--font-sans); font-size: .9rem; }
.page-title .breadcrumbs li + li::before { content: '/'; color: var(--fg-3); margin-right: 8px; }
.page-title .breadcrumbs a { color: var(--teal-light); text-decoration: none; }
.page-title .breadcrumbs .current { color: #fff; }

.service-details { padding: 80px 0 100px; background: var(--paper); }
.service-details .services-list {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px; margin-bottom: 28px;
}
.service-details .services-list a {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 10px;
  font-family: var(--font-sans); font-weight: 700; font-size: .95rem; color: var(--ink-2); text-decoration: none;
}
.service-details .services-list a::after { content: '\2192'; color: var(--ink-3); transition: transform .2s; }
.service-details .services-list a:hover, .service-details .services-list a.active { background: var(--paper-2); color: var(--ink); }
.service-details .services-list a.active { box-shadow: inset 4px 0 0 var(--yellow); }
.service-details .services-list a:hover::after { transform: translateX(3px); }
.service-details .col-lg-4 > h4 { margin-top: 8px; }
.service-details .col-lg-4 > p { color: var(--ink-3); }
.service-details .services-img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); margin-bottom: 36px; background: var(--navy-800); }
.service-details h3 { font-size: 1.8rem; margin-bottom: 14px; }
.service-details h4 { font-size: 1.3rem; margin-top: 34px; padding-top: 4px; }
.service-details ul { list-style: none; padding: 0; margin: 18px 0 8px; }
.service-details ul li { display: flex; gap: 12px; align-items: baseline; padding: 10px 16px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; }
.service-details ul li i { color: var(--teal-ink); font-size: 1.05rem; }
.service-details p { font-size: 1.06rem; }

/* book box used on inner pages */
.book-box { position: relative; margin-top: 48px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 28px 30px 28px 36px; box-shadow: var(--shadow); }
.book-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); background: var(--accent, var(--purple)); }
.book-box .k { font-family: var(--font-sans); font-weight: 700; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.book-box h4 { margin: 8px 0 10px !important; padding: 0 !important; }
.book-box .chapters { list-style: none; padding: 0; margin: 12px 0 18px !important; }
.book-box .chapters li { background: var(--paper-2) !important; border: 0 !important; font-family: var(--font-sans); font-size: .95rem; }
.book-box .chapters li b { font-family: var(--font-display); color: var(--ink); margin-right: 6px; }
.book-box .chapters li span.p { margin-left: auto; color: var(--ink-3); font-size: .85rem; white-space: nowrap; }
.book-box.cta { --accent: var(--yellow); background: var(--ink); border-color: transparent; color: var(--fg-2); }
.book-box.cta h4 { color: #fff; }
.book-box.cta .k { color: var(--teal-light); }
.book-box .q { font-family: var(--font-serif); font-style: italic; color: #fff; font-size: 1.2rem; }

/* ---------- error pages ---------- */
.error-page { min-height: 100vh; display: flex; align-items: center; padding: calc(var(--header-h) + 40px) 0 60px; }
.error-page .big { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 11rem); color: #fff; line-height: .9; letter-spacing: -0.04em; }

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js [data-reveal="2"] { transition-delay: .1s; } .js [data-reveal="3"] { transition-delay: .2s; } .js [data-reveal="4"] { transition-delay: .3s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .scroll-top, .strip, .hero-canvas-wrap canvas { display: none !important; }
  .section { padding: 30px 0; }
}
