/* Kubit Solutions — site chrome shared by every page:
   the floating pill header and the closing footer.
   Loaded last so it owns .nav* and .site-footer / .sf-* everywhere.
   Albert Sans is self-hosted (fonts/albert-sans, SIL OFL 1.1). */

@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/albert-sans/albert-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/albert-sans/albert-sans-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 {
  --nav-h: 64px;
  --nav-top: 12px;
  --c-font: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --c-white: #ffffff;
  --c-ink: #09091a;
  --c-ink-2: #33333d;
  --c-ink-3: #5c5c66;
  --c-line: #e4e2dd;
  --c-line-strong: #8a8a90;
  --c-orange: #FF6F00;
  --c-orange-hover: #ff8424;
  --c-orange-press: #e86500;
  --c-orange-deep: #b84a00;
  --c-blue: #1878F1;
  --c-blue-2: #2B5BA8;
  --c-focus: #F89800;
  --c-gutter: 1rem;
}
@media (min-width: 768px) {
  :root { --c-gutter: 2rem; }
}
@media (max-width: 768px) {
  :root { --nav-h: 56px; --nav-top: 8px; }
}
html { scroll-padding-top: calc(var(--nav-top) + var(--nav-h) + 1rem); }

/* ---------- Header: floating pill ---------- */
.nav {
  position: fixed; z-index: 200;
  top: var(--nav-top); left: 50%; right: auto;
  width: min(1200px, calc(100% - 2rem)); height: var(--nav-h);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0; padding: 0 0.5rem 0 1.5rem;
  font-family: var(--c-font);
  border-radius: 999px;
  border: 1px solid rgba(9, 9, 26, 0.08);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(9, 9, 26, 0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled { background: rgba(255, 255, 255, 0.97); box-shadow: 0 10px 34px rgba(9, 9, 26, 0.12); }

.nav-logo {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  min-height: 44px; text-decoration: none; color: var(--c-ink);
}
.nav-logo:hover { color: var(--c-ink); }
.nav-logo-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  object-fit: contain; mix-blend-mode: multiply; pointer-events: none;
}
.nav-logo-text {
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
  background: linear-gradient(135deg, var(--c-blue-2) 0%, var(--c-blue) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--c-blue);
}

.nav-menu { display: flex; align-items: center; gap: 0.5rem; }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.5rem 1rem; border-radius: 8px;
  font-size: 0.9375rem; font-weight: 500; line-height: 1.2;
  color: var(--c-ink-2); background: transparent; text-decoration: none;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute; left: 1rem; right: 1rem; bottom: 4px;
  height: 2px; border-radius: 1px;
  background: var(--c-blue);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--c-ink); background: transparent; text-decoration: none; }
.nav-link:hover::after { transform: scaleX(1); background: rgba(9, 9, 26, 0.3); }
.nav-link.active::after { transform: scaleX(1); background: var(--c-blue); }
.nav-link:active { color: var(--c-orange-deep); }
/* Scroll-spy marks an in-page link (e.g. #contact); only one item shows at a time */
.nav-menu:has(.nav-link.active[href^="#"]) .nav-link.active:not([href^="#"]) { color: var(--c-ink-2); }
.nav-menu:has(.nav-link.active[href^="#"]) .nav-link.active:not([href^="#"])::after { transform: scaleX(0); }

.nav-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0.625rem 1.5rem; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 700; line-height: 1.2; text-decoration: none;
  color: var(--c-ink); background: var(--c-orange);
  transition: background-color 0.2s ease;
}
.nav-cta-btn svg { width: 14px; height: 14px; flex: none; transition: transform 0.2s ease; }
.nav-cta-btn:hover { background: var(--c-orange-hover); color: var(--c-ink); }
.nav-cta-btn:hover svg { transform: translateX(2px); }
.nav-cta-btn:active { background: var(--c-orange-press); }

.nav-toggle {
  display: none; order: 2; flex-shrink: 0;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; border-radius: 999px; cursor: pointer;
}
.nav-toggle:hover { background: #f6f5f2; }
.nav-toggle:active { background: var(--c-line); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--c-ink); transition: transform 0.2s ease, background-color 0.2s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span::after { transform: translateY(-6px) rotate(-45deg); }

.nav a:focus-visible, .nav button:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }

@media (max-width: 768px) {
  .nav { padding: 0 0.5rem 0 1rem; }
  .nav-logo-mark { width: 34px; height: 34px; }
  .nav-logo-text { font-size: 1.125rem; }
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; z-index: 300;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--c-white); border: 1px solid var(--c-line); border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(9, 9, 26, 0.08), 0 8px 10px -6px rgba(9, 9, 26, 0.04);
  }
  .nav-menu.open .nav-link { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; }
  .nav-menu.open .nav-link::after { right: auto; width: 24px; }
  .nav-menu.open .nav-cta-btn { width: 100%; margin-top: 0.5rem; min-height: 48px; font-size: 1rem; }
}
@media (max-width: 479px) {
  .nav-logo { gap: 6px; }
  .nav-logo-mark { width: 30px; height: 30px; }
  .nav-logo-text { font-size: 1.0625rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative; isolation: isolate; overflow: clip;
  padding-block: 4rem 2rem;
  border-top: 1px solid var(--c-line); background: var(--c-white);
  font-family: var(--c-font); font-size: 1rem; line-height: 1.65; color: var(--c-ink-2);
}
.site-footer h2, .site-footer p, .site-footer ul { margin: 0; }
.site-footer ul { padding: 0; list-style: none; }
.site-footer p { max-width: 65ch; }
.site-footer a:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.sf-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: calc(1200px + 2 * var(--c-gutter));
  margin-inline: auto; padding-inline: var(--c-gutter);
}

/* Decorative ribbon: its own clipped layer, behind content, lower right */
.sf-ribbon {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.sf-ribbon img {
  position: absolute; right: var(--ribbon-right, -30px); bottom: var(--ribbon-bottom, -50px);
  width: var(--ribbon-w, 260px); max-width: none; height: auto; aspect-ratio: 3 / 2;
}

/* Closing invitation */
.sf-invite {
  display: grid; gap: 1.5rem; align-items: end;
  padding-bottom: 3rem; border-bottom: 1px solid var(--c-orange);
}
.sf-title {
  font-size: clamp(2.25rem, 1.8rem + 2.25vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 800; color: var(--c-ink); max-width: 14ch; text-wrap: balance;
}
.sf-dot { color: var(--c-orange); }
.sf-actions { display: grid; justify-items: start; gap: 0.75rem; }
.sf-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  min-width: 120px; min-height: 52px; padding: 0.75rem 1.5rem;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); font-weight: 700; text-decoration: none;
  border-radius: 999px; background: var(--c-orange); color: var(--c-ink);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.sf-cta svg { width: 20px; height: 20px; flex: none; transition: transform 0.2s ease; }
.sf-cta:hover { background: var(--c-orange-hover); color: var(--c-ink); }
.sf-cta:hover svg { transform: translateX(3px); }
.sf-cta:active { background: var(--c-orange-press); transform: translateY(1px); }
.sf-email {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--c-ink);
  text-decoration: underline; text-decoration-color: var(--c-orange); text-underline-offset: 0.3em;
}
.sf-email:hover { color: var(--c-orange-deep); }
.sf-email:active { color: var(--c-ink); }

/* Brand + link groups */
.sf-grid { display: grid; gap: 2rem; padding-block: 3rem; }
.sf-brand { display: grid; align-content: start; gap: 0.5rem; }
.sf-brand p { color: var(--c-ink-2); }
.sf-logo {
  display: inline-flex; align-items: center; gap: 0.5rem; justify-self: start;
  min-height: 44px; margin-bottom: 0.5rem;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--c-ink); text-decoration: none;
}
.sf-logo img { width: 40px; height: 40px; object-fit: contain; }
.sf-logo:hover { color: var(--c-ink); }
.sf-social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.sf-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--c-line-strong); color: var(--c-ink);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.sf-social a:hover { background: var(--c-orange); border-color: var(--c-orange); color: var(--c-ink); }
.sf-social a:active { background: var(--c-orange-press); border-color: var(--c-orange-press); }
.sf-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.sf-links > :first-child { grid-column: 1 / -1; }
.sf-heading {
  margin-bottom: 0.5rem;
  font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--c-ink);
}
.sf-col ul { display: grid; }
.sf-col a {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-block: 0.25rem;
  line-height: 1.35; color: var(--c-ink-2); text-decoration: none;
}
.sf-col a:hover { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-orange); text-underline-offset: 0.3em; }
.sf-col a:active { color: var(--c-orange-deep); }

/* Legal row */
.sf-legal-row { display: grid; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); font-size: 0.875rem; }
.sf-cred { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; color: var(--c-ink); }
.sf-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; color: var(--c-ink-3); }
.sf-bottom p { color: var(--c-ink-3); }
.sf-legal { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.sf-legal a {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  color: var(--c-ink-2); text-decoration: underline; text-underline-offset: 0.3em;
}
.sf-legal a:hover { color: var(--c-ink); text-decoration-color: var(--c-orange); }
.sf-legal a:active { color: var(--c-orange-deep); }
.sf-legal a.sf-top { text-decoration: none; }
.sf-legal a.sf-top:hover { text-decoration: underline; }
.sf-top svg { flex: none; }

@media (max-width: 767px) {
  .site-footer { padding-bottom: 6rem; }
}
@media (min-width: 640px) {
  .sf-links { grid-template-columns: 1.4fr 1fr 1fr; }
  .sf-links > :first-child { grid-column: auto; }
}
@media (min-width: 768px) {
  .site-footer { padding-bottom: 7rem; --ribbon-w: 420px; --ribbon-right: -30px; --ribbon-bottom: -130px; }
  .sf-invite { grid-template-columns: 1fr auto; }
}
@media (min-width: 1024px) {
  .sf-cred { gap: 0.25rem 0; }
  .sf-cred li + li { margin-left: 1.5rem; padding-left: 1.5rem; border-left: 1px solid var(--c-line-strong); }
  .sf-actions { justify-items: end; }
  .sf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 3rem; }
}
@media (min-width: 1280px) {
  .site-footer { --ribbon-w: clamp(300px, 38vw, 650px); --ribbon-right: -20px; --ribbon-bottom: -160px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav, .nav *, .site-footer * { transition: none !important; animation: none !important; }
}
