/* Fusional Systems — shared styles.
   Layout, copy and colors come from the approved designs (designs/*.dc.html);
   most section styling stays inline in the HTML exactly as in the designs. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #FFFFFF; }
img, svg { max-width: 100%; }
.page { font-family: 'Lexend', system-ui, sans-serif; color: #0C2D48; background: #FFFFFF; }

a { color: #0369A1; }
a:hover { color: #025A8C; }

/* Keyboard focus: visible 2px outline. Ocean on light backgrounds, light sky on navy. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #0369A1; outline-offset: 2px;
}
.on-dark a:focus-visible, .on-dark button:focus-visible { outline-color: #7DD3FC; }

/* Text links get a 44px-tall hit area without changing the visual layout. */
.tap { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* Buttons from the designs (inline padding gives 50px+ height already). */
.btn { display: inline-block; }

/* Styled "Fusional" wordmark: the "s" is the logo's two front circles. */
.fus { font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.fus svg { width: .56em; height: .56em; vertical-align: baseline; margin: 0 .03em 0 .02em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero load animation (homepage) — runs once, CSS only. */
@keyframes hxFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes hxA { from { opacity: 0; transform: translate(-9px, 9px) } to { opacity: 1; transform: none } }
@keyframes hxB { from { opacity: 0; transform: translate(9px, -9px) } to { opacity: 1; transform: none } }
@keyframes hxRise { from { opacity: 0; transform: translate(-50%, 8px) } to { opacity: 1; transform: translate(-50%, 0) } }
@keyframes hxBub { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: no-preference) {
  .hx-back { animation: hxFade .8s ease-out both; }
  .hx-a { animation: hxA 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
  .hx-b { animation: hxB 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
  .hx-lens { animation: hxFade .5s ease-out 1.05s both; }
  .hx-t1 { animation: hxRise .6s ease-out 1.3s both; }
  .hx-t2 { animation: hxRise .7s ease-out 1.75s both; }
  .hx-b1 { animation: hxBub .7s ease-out 2.7s both; }
  .hx-b2 { animation: hxBub .7s ease-out 3.5s both; }
  .hx-b3 { animation: hxBub .7s ease-out 4.3s both; }
}
@media (max-width: 720px) {
  .hx-bub { display: none !important; }
  /* The Chen row reserves room for its bubble only while the bubble is shown. */
  .bub-pad { padding-right: 0 !important; }
}

/* Phone menu. Desktop nav is exactly as designed; at 720px and below (JS on)
   the links fold into a panel opened by a menu button. */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .js nav[aria-label="Main"] { padding: 18px 20px !important; flex-wrap: wrap; }
  .js nav[aria-label="Main"] img { height: 36px !important; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; margin-right: -6px;
    background: transparent; color: #FFFFFF; cursor: pointer;
    border: 1px solid rgba(195, 214, 230, .35); border-radius: 12px;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .js .nav-menu { display: none !important; }
  .js .nav-open .nav-menu {
    display: flex !important; flex-direction: column; align-items: stretch !important;
    flex-basis: 100%; gap: 0 !important; font-size: 17px !important;
    margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(195, 214, 230, .18);
  }
  .js .nav-open .nav-menu a.tap {
    display: block; margin: 0; padding: 14px 2px;
    border-bottom: 1px solid rgba(195, 214, 230, .12); color: #FFFFFF !important;
  }
  .js .nav-open .nav-menu a:not(.tap) { display: block; text-align: center; margin: 16px 0 6px; padding: 14px 20px !important; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; }
}

/* Phones: the designs only define desktop heading sizes (inline), which leave
   4–5 word lines at 375px. Scale the large ones down; desktop is unchanged. */
@media (max-width: 560px) {
  h1[style*="font-size: 52px"] { font-size: 40px !important; }
  h1[style*="font-size: 40px"],
  h2[style*="font-size: 44px"],
  h2[style*="font-size: 40px"],
  h2[style*="font-size: 38px"] { font-size: 32px !important; }
  h2[style*="font-size: 30px"] { font-size: 26px !important; }
}

/* Scroll fusion stage: never taller than the viewport, so the math in fusion.js
   (stick = min(820, innerHeight)) matches what is on screen. */
.fz-stage { height: 820px; height: min(820px, 100vh); }

/* Early access form */
.ea-status { min-height: 1.5em; }
@media (max-width: 560px) { .ea-status { min-height: 3em; } }
.cf-turnstile { min-height: 65px; }
.ea-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
