/* ==========================================================
   Base + shared components
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

/* visually hidden, still read by screen readers (used site-wide) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Icon ---------- */
.i { width: 16px; height: 16px; flex: none; }   /* Akar Icons: 24px grid, 2px rounded stroke set in the sprite */
.i-sm { width: 13px; height: 13px; }
.i-lg { width: 20px; height: 20px; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0;
}
.h1 { font-size: clamp(38px, 5.6vw, 76px); }
.h2 { font-size: clamp(30px, 3.4vw, 46px); }
.muted-line { color: #7F879B; } /* ≥3:1 on --bg for large display text */
.lead { font-size: 17px; line-height: 1.55; color: var(--text-muted); margin: 0; }

/* ---------- Inline feature chip (in headlines / sublines) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px 0 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-800);
  vertical-align: middle;
}
.chip .i { color: var(--ink-800); }   /* one ink colour: icons label, they don't decorate */

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-dark {
  background: var(--ink-950);
  color: var(--white);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 4px 12px rgba(11,16,32,.2);
}
.btn-dark:hover { background: var(--ink-800); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink-900);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--ink-50); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; color: var(--ink-950); }
.logo-mark { width: 28px; height: 28px; }

/* ---------- HomeBase mark: glowing hexagon house, alive like a pilot light ---------- */
.hb-logo { width: 34px; height: 34px; flex: none; overflow: visible; border-radius: 10px; box-shadow: 0 4px 14px -4px rgba(47,107,255,.55); }
.hb-halo { animation: hbBreathe 3.6s ease-in-out infinite; transform-origin: 32px 32px; }
.hb-sweep { animation: hbSweep 5.5s cubic-bezier(.5,0,.3,1) infinite; }
.hb-door { animation: hbDoor 4.8s ease-in-out infinite; }
.hb-roof { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.logo:hover .hb-roof { transform: translateY(-1.6px); }
.logo:hover .hb-halo { animation-duration: 1.4s; }
@keyframes hbBreathe { 0%, 100% { opacity: .55; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes hbSweep { 0%, 55% { transform: translateX(0); } 100% { transform: translateX(110px); } }
@keyframes hbDoor { 0%, 100% { opacity: .35; } 42% { opacity: .9; } 46% { opacity: .55; } 50% { opacity: .95; } 70% { opacity: .6; } }

/* ---------- Nav (floating pill, fixed) ---------- */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 50; pointer-events: none; }
.site-head .nav, .site-head .nav-menu { pointer-events: auto; }
.nav-wrap { position: relative; padding-top: 20px; transition: padding-top .3s ease; }
.site-head.is-scrolled .nav-wrap { padding-top: 12px; }
.site-head.is-scrolled .nav { background: rgba(255,255,255,.9); box-shadow: var(--shadow-md); }
html { scroll-padding-top: 100px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* phone menu: drops down under the pill */
.nav-menu {
  margin-top: 8px;
  padding: 8px;
  display: grid; gap: 2px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: menuIn .22s ease both;
}
.nav-menu[hidden] { display: none; }
.nav-menu > a { padding: 12px 14px; border-radius: var(--r-sm); font-size: 16px; font-weight: 500; color: var(--ink-900); }
.nav-menu > a:hover { background: var(--ink-50); }
.nav-menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 6px 6px; margin-top: 6px; border-top: 1px solid var(--ink-100); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.nav-burger span { transition: background-color .2s; }
.nav-burger span::before, .nav-burger span::after { transition: transform .25s ease, top .25s ease; }
.nav-burger[aria-expanded="true"] span { background: transparent; }
.nav-burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.nav-burger:focus-visible, .nav a:focus-visible, .nav-menu a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 900px) { .nav-menu { display: none !important; } }
.nav {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 12px 0 20px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 32px; margin-inline: auto; font-size: 15px; color: var(--ink-600); }
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--ink-950); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-login { font-size: 15px; color: var(--ink-600); padding: 0 14px; }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); align-items: center; justify-content: center; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 18px; height: 1.6px; background: var(--ink-900); border-radius: 2px; position: relative; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; }
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }

@media (max-width: 899px) {
  .nav { height: 56px; padding: 0 6px 0 14px; }
  .nav-links, .nav-login { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-burger { display: inline-flex; }
}

/* ---------- Ribbon layer ---------- */
.ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.ribbon g.r-body { filter: drop-shadow(0 18px 28px rgba(20, 50, 140, .16)); }

/* page-long ribbon: sits under every section's content, above the page background */
body { position: relative; }
.page-ribbon { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; }
body > section, body > footer { position: relative; z-index: 1; }

/* ---------- Avatars (initials, no photos needed) ---------- */
.av {
  --s: 24px;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: calc(var(--s) * .4);
  font-weight: 600;
  color: var(--white);
  flex: none;
  box-shadow: 0 0 0 2px var(--white);
}
.av-1 { background: linear-gradient(135deg, #FFB86B, #F0506E); }
.av-2 { background: linear-gradient(135deg, #6D83FF, #2034C2); }
.av-3 { background: linear-gradient(135deg, #2CC9B4, #0C8F80); }
.av-4 { background: linear-gradient(135deg, #B9A4FF, #6B4EE6); }
.av-5 { background: linear-gradient(135deg, #4A5268, #121829); }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -6px; }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--r-pill); font-size: 11px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-teal { background: var(--teal-50); color: #08715F; }
.pill-amber { background: var(--amber-50); color: var(--amber-600); }
.pill-cobalt { background: var(--cobalt-50); color: var(--cobalt-600); }
.pill-ink { background: var(--ink-100); color: var(--ink-600); }
.pill.no-dot::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* photo avatars: the initials stay in the markup as a fallback and for
   screen readers, the photo covers them */
.av.ph { background-color: var(--ink-200); background-position: center; background-size: cover; background-repeat: no-repeat; color: transparent; }

/* ---------- Small buttons and file tiles inside product mockups ---------- */
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  background: var(--white); color: var(--ink-900);
  border: 1px solid var(--ink-150); box-shadow: var(--shadow-xs);
}
.mini-btn .i { width: 14px; height: 14px; }
.mini-btn.dark { background: var(--ink-950); color: #fff; border-color: var(--ink-950); }
.mini-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 2px 6px rgba(47,107,255,.3); }
.ftype {
  position: relative; flex: none;
  width: 30px; height: 36px; border-radius: 5px;
  display: grid; align-items: end; justify-items: center; padding-bottom: 5px;
  font-size: 8.5px; font-weight: 700; letter-spacing: .02em; color: #fff;
}
.ftype::before { /* folded corner */
  content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 9px;
  background: linear-gradient(225deg, var(--bg) 50%, rgba(255,255,255,.55) 50%);
  border-bottom-left-radius: 3px;
}
.ft-fig { background: linear-gradient(160deg, #8B7BFF, #5B45E0); }
.ft-pdf { background: linear-gradient(160deg, #FF7B8E, #E23A57); }
.ft-xls { background: linear-gradient(160deg, #2CC9B4, #0C8F80); }
