/* clariBI homepage: periwinkle stage, giant mono type, 3D objects.
 * Loaded after site.css on index.html only. The 3D layer is
 * components/home3d.js; the scroll-driven text is components/home.js.
 */

:root {
  --h-bg: #dfe5f2;
  --h-bg-2: #ccd5ea;
  --h-ink: #181520;
  --h-ink-2: #3a3747;
  --h-muted: #6d6d76;
  --h-line: rgba(24, 21, 32, .14);
  --h-glass: rgba(255, 255, 255, .46);
  --h-glass-line: rgba(255, 255, 255, .7);
  --h-mono: 'Martian Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body.is-home, .is-home body { background: var(--h-bg) !important; }
.s-page--home { position: relative; color: var(--h-ink); padding-top: 0; }

/* Soft pastel glows drifting behind everything. */
.h-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, #e4e9f5 0%, var(--h-bg) 45%, var(--h-bg-2) 100%); }
.h-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; will-change: transform; }
.h-bg i:nth-child(1) { width: 46vw; height: 46vw; left: 48%; top: -12%; background: #f7d9cf; animation: h-drift 26s ease-in-out infinite alternate; }
.h-bg i:nth-child(2) { width: 38vw; height: 38vw; left: -8%; top: 38%; background: #f1d3e6; animation: h-drift 32s ease-in-out -8s infinite alternate-reverse; }
.h-bg i:nth-child(3) { width: 30vw; height: 30vw; left: 62%; top: 62%; background: #cfe8ef; animation: h-drift 29s ease-in-out -14s infinite alternate; }
@keyframes h-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6vw, 5vh) scale(1.08); } 100% { transform: translate(5vw, -4vh) scale(.95); } }
.h3d { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; opacity: .4; filter: saturate(.85); }
.s-page--home > section, .s-page--home > .h-wrap { position: relative; z-index: 2; }

/* Navigation sits on the stage. */
.is-home #global-navigation nav { background: rgba(223, 229, 242, .55) !important; border-bottom-color: transparent !important; }
.is-home #global-navigation nav a, .is-home #global-navigation nav button { font-family: var(--h-mono) !important; text-transform: uppercase; font-size: 12px !important; letter-spacing: .02em; }
.is-home #global-navigation a[href*="register"] { background: var(--h-ink) !important; border-color: var(--h-ink) !important; color: #fff !important; border-radius: 999px !important; }
.is-home #global-navigation a[href*="login"] { border-radius: 999px !important; background: transparent !important; border-color: var(--h-ink) !important; color: var(--h-ink) !important; }

.h-wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

/* Type ------------------------------------------------------------------ */
.h-giant { font-family: var(--h-mono) !important; font-weight: 400; text-transform: uppercase; color: var(--h-ink); letter-spacing: -0.045em; line-height: .98; margin: 0; font-size: clamp(34px, 5.4vw, 92px); }
.h-giant span { display: flex; justify-content: space-between; gap: .4em; }
.h-giant span.is-left { justify-content: flex-start; }
.h-word { font-family: var(--h-mono) !important; font-weight: 400; text-transform: uppercase; color: var(--h-ink); white-space: nowrap; line-height: .9; letter-spacing: -0.05em; font-size: clamp(64px, 15vw, 250px); margin: 0; will-change: transform; }
.h-kicker { font-family: var(--h-mono); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; color: var(--h-ink-2); }
.h-small { font-size: 14px; line-height: 1.55; color: var(--h-ink-2); }
.h-small strong { color: var(--h-ink); font-weight: 600; }
.h-title { font: 600 15px/1.3 var(--sans); color: var(--h-ink); margin: 0 0 8px; }
.h-h2 { font-family: var(--h-mono) !important; font-weight: 400; text-transform: uppercase; letter-spacing: -0.04em; line-height: 1; font-size: clamp(30px, 4.4vw, 68px); color: var(--h-ink); margin: 0; }

/* Pills ----------------------------------------------------------------- */
.h-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--h-ink); color: #fff !important; font: 500 12px/1 var(--h-mono); text-transform: uppercase; letter-spacing: .02em; padding: 13px 18px; border-radius: 999px; text-decoration: none; transition: transform .25s var(--ease), background .25s; }
.h-pill:hover { transform: translateY(-2px); background: #2c2838; }
.h-pill svg { width: 14px; height: 14px; }
.h-pill--light { background: transparent; color: var(--h-ink) !important; border: 1px solid var(--h-ink); }
.h-pill--light:hover { background: rgba(255, 255, 255, .5); }
.h-tag { display: inline-flex; align-items: center; font: 500 12px/1 var(--sans); color: var(--h-ink); border: 1px solid var(--h-ink); border-radius: 999px; padding: 5px 10px; }
.h-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.h-tags .h-small { margin-left: 4px; }

/* Glass ------------------------------------------------------------------ */
.h-glass { background: var(--h-glass); border: 1px solid var(--h-glass-line); border-radius: 22px; -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 60px -40px rgba(35, 27, 53, .45); }

/* Hero ------------------------------------------------------------------ */
.h-hero { min-height: 100vh; display: flex; align-items: center; padding: 110px 0 56px; }
.h-hero .h-wrap > div { max-width: 1000px; }
.h-hero .h-giant { font-size: clamp(40px, 7vw, 120px); }
.h-hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 28px; margin-top: 48px; }
.h-scroll { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 500 11px var(--h-mono); text-transform: uppercase; color: var(--h-ink-2); margin-top: 40px; }
.h-scroll i { width: 1px; height: 34px; background: var(--h-ink); transform-origin: top; animation: h-scroll 1.8s var(--ease) infinite; }
@keyframes h-scroll { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.h-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Empty boxes the 3D objects are fitted into (components/home3d.js).
   Nothing else is placed in them, so objects never cover text. */

/* Chapters -------------------------------------------------------------- */
.h-chapter { position: relative; padding: 16vh 0 14vh; overflow: hidden; }
.h-chapter__word { margin-bottom: 8vh; }
.h-chapter .h-word { font-size: clamp(64px, 12vw, 190px); }
.h-chapter__word { text-align: center; }
.h-chapter__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 28px; }
.h-chapter__foot > :last-child { justify-self: end; max-width: 360px; }
.h-chapter__foot .h-pill { justify-self: center; }
.h-chapter__num { font: 500 12px var(--h-mono); color: var(--h-muted); margin-bottom: 12px; display: block; }

/* Product screenshot ---------------------------------------------------- */
.h-product { padding: 16vh 0 12vh; }
.h-product__head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; margin-bottom: 56px; }
.h-stage { perspective: 1600px; }
.h-shot { padding: 12px; transform-origin: 50% 0; will-change: transform; }
.h-shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(24, 21, 32, .08); }
.h-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.h-legend > div { padding: 18px; }
.h-legend b { font: 500 12px var(--h-mono); color: var(--h-muted); display: block; margin-bottom: 8px; }

/* Logos ----------------------------------------------------------------- */
.h-logos { padding: 8vh 0; }
.h-logos .s-marquee__item { background: var(--h-glass); border-color: var(--h-glass-line); border-radius: 999px; box-shadow: none; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-weight: 500; }

/* Lists and cards ------------------------------------------------------- */
.h-section { padding: 14vh 0; }
.h-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.h-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.h-card { padding: 28px; }
.h-card .h-kicker { display: block; margin-bottom: 18px; }
.h-list { list-style: none; margin: 0; padding: 0; }
.h-list li { padding: 12px 0; border-top: 1px solid var(--h-line); font-size: 15px; line-height: 1.5; color: var(--h-ink-2); display: flex; gap: 12px; }
.h-list li:first-child { border-top: 0; }
.h-list li::before { content: '+'; font-family: var(--h-mono); color: var(--teal-700); }
.h-list--no li::before { content: '\00d7'; color: #c0392b; }
.h-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.h-cat { padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .3s var(--ease); }
.h-cat:hover { transform: translateY(-4px); }
.h-cat { min-width: 0; }
.h-cat__n { font: 400 clamp(30px, 8vw, 44px)/1 var(--h-mono); letter-spacing: -0.05em; color: var(--h-ink); overflow-wrap: anywhere; }
.h-cat__marks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.h-cat__marks .s-mark { width: 20px; height: 20px; }

/* Pricing table on glass. */
.h-price .s-table-wrap { background: var(--h-glass); border: 1px solid var(--h-glass-line); border-radius: 22px; box-shadow: none; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.h-price .s-table thead th { background: transparent; font: 500 12px var(--h-mono); text-transform: uppercase; color: var(--h-muted); }
.h-price .s-table td, .h-price .s-table th { border-color: var(--h-line); }

/* Developers. */
.h-dev { background: var(--h-ink); color: #cfd0db; border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.h-dev .h-h2 { color: #fff; }
.h-dev .h-small { color: #b8b7c6; }
.h-dev .h-pill { background: #fff; color: var(--h-ink) !important; }
.h-dev .h-pill--light { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .4); }
.h-dev .s-term { background: #0f0d15; border-color: #2a2635; box-shadow: none; }

/* Closing band. */
.h-end { padding: 18vh 0 16vh; text-align: center; }
.h-end .h-word { font-size: clamp(44px, 9vw, 150px); white-space: normal; text-wrap: balance; overflow-wrap: anywhere; }
.h-more { display: block; color: inherit; text-decoration: none; transition: transform .2s; }
.h-more:hover { transform: translateY(-3px); }
.h-more .h-title { display: block; font-size: 17px; }
.h-more .h-small { display: block; }
.h-end .h-cta-row { justify-content: center; margin-top: 36px; }

/* Resources block (rendered by refresh_homepage_resources). */
.is-home [aria-labelledby="resources-heading"] { background: transparent; }
.is-home [aria-labelledby="resources-heading"] .s-label { background: transparent; border: 1px solid var(--h-ink); color: var(--h-ink); }
.is-home [aria-labelledby="resources-heading"] .s-label::before { display: none; }
.is-home [aria-labelledby="resources-heading"] .s-h2 { font-family: var(--h-mono) !important; text-transform: uppercase; font-weight: 400; letter-spacing: -0.04em; }

/* Footer on the homepage stays dark and sits above the stage. */
.is-home #global-footer { position: relative; z-index: 2; }
.is-home .s-footer { background: var(--h-ink); }

/* Small screens --------------------------------------------------------- */
@media (max-width: 900px) {
  .h-hero { min-height: 0; padding: 96px 0 40px; }
  .h-hero__foot, .h-chapter__foot, .h-product__head, .h-grid-2, .h-grid-3, .h-dev, .h-legend { grid-template-columns: 1fr; }
  .h-grid-2--flip > :first-child { order: 2; }
  .h3d { opacity: .28; }
  .h-hero .h-giant { font-size: clamp(34px, 10vw, 64px); }
  .h-chapter { padding: 12vh 0 10vh; }
  .h-chapter__word { margin-bottom: 5vh; }
  .h-chapter__foot > :last-child, .h-chapter__foot .h-pill { justify-self: start; }
  .h-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-dev { padding: 32px 22px; }
  .h-giant span { flex-wrap: wrap; justify-content: flex-start; gap: 0 .35em; }
  .h-scroll { display: none; }
  .h-word, .h-chapter .h-word { font-size: clamp(52px, 17vw, 120px); }
}
@media (prefers-reduced-motion: reduce) {
  .h-bg i, .h-scroll i { animation: none; }
}

.is-home body::before { display: none; }
.h-end { overflow: hidden; }
