/* ==========================================================================
   formuli.ai: one-page holding site
   Built from the Katalyst Nord platform page: same typeface, colours,
   dark hero and Ashby plot, so the two read as one family.
   ========================================================================== */

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/raleway-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/raleway-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --ink: #211186;          /* logo indigo */
  --teal: #1e9db4;         /* large type and decoration only */
  --teal-light: #8fe0ee;   /* teal on the dark hero */
  --on-dark: #e8ecff;
  --line: #dcdee6;
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #1a0e6b;
  color: #fff;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 3px; }
p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; background: #fff; color: var(--ink); padding: 12px 18px; }
.skip-link:focus { left: 12px; top: 12px; }

/* The page is one dark field: wordmark, hero, footer -----------------------*/
.stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(115deg, #1a0e6b 0%, #211186 48%, #1b6d8a 135%);
}
.stage::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(70%, 980px);
  background: url("../img/data-burst.webp") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 45%);
  mask-image: linear-gradient(to right, transparent 0, #000 45%);
  pointer-events: none;
}
.stage > * { position: relative; z-index: 1; }

.top { padding-block: clamp(22px, 3vw, 40px); }
.wordmark {
  font-weight: 800;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark span { color: var(--teal-light); }

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(28px, 5vw, 88px);
  align-items: center;
  align-content: center;
  padding-block: clamp(32px, 6vw, 96px) clamp(48px, 7vw, 110px);
}
.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 14px;
}
h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 11ch;
}
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #8fe0ee 0%, #b79cff 55%, #f08ac0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede {
  margin-top: clamp(20px, 2.4vw, 34px);
  max-width: 40ch;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--on-dark);
}
.find { margin-top: clamp(28px, 3.4vw, 48px); max-width: 48ch; color: var(--on-dark); }
.find h2 { margin: 0 0 8px; font-size: clamp(1.15rem, 1.5vw, 1.35rem); font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.find p { margin: 0 0 0.9em; text-wrap: pretty; }
.find em { color: #fff; }
.find .cite { margin-top: -0.5em; font-size: 0.88rem; color: #c9cff5; }
.find .cite cite { font-style: italic; }
.cta { margin-top: clamp(22px, 2.6vw, 34px); }

.btn {
  display: inline-block;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 34px;
  border-radius: 2px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: #e8ecff; }
.btn:active { transform: translateY(1px); }

.chart {
  margin: 0;
  background: #fff;
  border-top: 3px solid var(--teal);
  padding: clamp(10px, 1.4vw, 20px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}
.chart svg { width: 100%; height: auto; display: block; }

.foot {
  padding-bottom: clamp(22px, 3vw, 36px);
  font-size: 0.9rem;
  color: var(--on-dark);
}
.foot p { margin: 0; padding-top: clamp(22px, 3vw, 36px); border-top: 1px solid rgba(255, 255, 255, 0.16); }
.foot a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.foot a:hover { border-bottom-color: #fff; }

@media (max-width: 520px) { .br-wide { display: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  h1 { max-width: none; }
  .stage::after { opacity: 0.4; width: 100%; }
}

/* Ashby plot animation (only when JavaScript runs and motion is allowed) --*/
.ashby .wp, .ashby .endpt, .ashby .ring { transform-box: fill-box; transform-origin: center; }
.js .ashby .blob, .js .ashby .zone { opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .ashby .route { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .ashby .wp, .js .ashby .endpt, .js .ashby .ring { opacity: 0; }
.js .ashby.is-in .blob { animation: ash-in 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.js .ashby.is-in .b1 { animation-delay: 0.1s; } .js .ashby.is-in .b2 { animation-delay: 0.3s; }
.js .ashby.is-in .b3 { animation-delay: 0.5s; } .js .ashby.is-in .b4 { animation-delay: 0.7s; }
.js .ashby.is-in .b5 { animation-delay: 0.9s; }
.js .ashby.is-in .zone { animation: ash-fade 0.9s ease 1.3s forwards; }
.js .ashby.is-in .route { animation: ash-draw 2.6s ease-in-out 1.6s forwards; }
.js .ashby.is-in .w1 { animation: ash-pop 0.5s ease 2.1s forwards; }
.js .ashby.is-in .w2 { animation: ash-pop 0.5s ease 3.0s forwards; }
.js .ashby.is-in .w3 { animation: ash-pop 0.5s ease 3.6s forwards; }
.js .ashby.is-in .endpt { animation: ash-pop 0.6s ease 4.1s forwards; }
.js .ashby.is-in .ring { animation: ash-ring 2.2s ease-out 4.7s infinite; }
@keyframes ash-in { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: none; } }
@keyframes ash-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ash-draw { to { stroke-dashoffset: 0; } }
@keyframes ash-pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
@keyframes ash-ring { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.ashby .blob:hover ellipse { fill-opacity: 0.3; }

@media (max-width: 700px) {
  .ashby text { font-size: 21px; }
  .ashby .blob text { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
