/* ============================================================
   Fieldkeep — shared design system
   Operations intelligence for multifamily
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* ---- Tokens ---- */
:root {
  /* brand */
  --indigo:        #3050c8;
  --indigo-600:    #2842ad;
  --indigo-700:    #20368c;
  --indigo-bright: #6c8aff;
  --indigo-tint:   #eef1fb;
  --indigo-tint-2: #e2e8fa;

  /* light surfaces — exact OpsIQ Command Center light-theme tokens */
  --bg:        #ffffff;
  --bg-soft:   #f7f7f8;
  --bg-soft-2: #f4f4f5;
  --bg-soft-3: #e3e5e8;
  --text:      #1a1e23;
  --text-2:    #303540;
  --text-3:    #637989;
  --border:    rgba(15,20,30,0.08);
  --border-2:  rgba(15,20,30,0.14);

  /* dark surfaces (bands) — exact OpsIQ Command Center dark-theme tokens */
  --ink:       #0c0d11;
  --ink-2:     #111318;
  --ink-3:     #161820;
  --ink-card:  #161820;
  --d-text:    #f0f0f5;
  --d-text-2:  #c8c8d4;
  --d-text-3:  #8a8aa0;
  --d-border:  rgba(255,255,255,0.09);
  --d-border-2:rgba(255,255,255,0.14);

  /* signal colors — light-theme values / -d = dark-theme values */
  --green:   #2f8f5c;
  --green-d: #34d399;
  --amber:   #9a7832;
  --amber-d: #fbbf24;
  --red:     #b54550;
  --red-d:   #f87171;

  /* type */
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  /* spacing / radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);

  --shadow-sm: 0 1px 2px rgba(16,18,28,.06), 0 1px 3px rgba(16,18,28,.04);
  --shadow-md: 0 4px 14px rgba(16,18,28,.07), 0 2px 6px rgba(16,18,28,.05);
  --shadow-lg: 0 18px 50px rgba(16,18,28,.13), 0 6px 18px rgba(16,18,28,.07);
  --shadow-glow: 0 0 0 1px rgba(108,138,255,.18), 0 24px 70px rgba(48,80,200,.28);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Typography ---- */
.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.04;
  font-optical-sizing: auto;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.018em; line-height: 1.06; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.dark .eyebrow, .band-dark .eyebrow { color: var(--indigo-bright); }
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: currentColor;
  opacity: .55;
  display: inline-block;
}

.lede { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--text-2); }
.dark .lede, .band-dark .lede { color: var(--d-text-2); }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap-wide { max-width: 1320px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
section { position: relative; }
.band {
  padding: clamp(72px, 9vw, 132px) 0;
}
.band-soft { background: var(--bg-soft); }
.band-dark {
  background: var(--ink);
  color: var(--d-text);
}
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--d-text); }

.section-head { max-width: 720px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 50px); margin-top: 18px; }
.section-head p { margin-top: 20px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: 999px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 1px 2px rgba(32,54,140,.4), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-primary:hover { background: var(--indigo-600); box-shadow: 0 8px 24px rgba(48,80,200,.32), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-ghost {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-2);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--text-3); background: var(--bg-soft); }
.band-dark .btn-ghost, .dark .btn-ghost { color: var(--d-text); box-shadow: inset 0 0 0 1px var(--d-border-2); }
.band-dark .btn-ghost:hover, .dark .btn-ghost:hover { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

/* transparent nav over the dark immersive hero (home) */
.site-header.on-dark { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
.site-header.on-dark .brand { color: #fff; }
.site-header.on-dark .nav-links a { color: rgba(244,245,248,.72); }
.site-header.on-dark .nav-links a:hover { color: #fff; }
.site-header.on-dark .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.site-header.on-dark .nav-toggle { color: rgba(244,245,248,.9); }
.site-header.on-dark .btn-ghost:hover { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
/* past the immersive hero, frost the nav solid over the dark page (keep light text) */
.site-header.on-dark.solid { background: rgba(12,13,17,.74); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom-color: rgba(255,255,255,.09); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(16px, 3vw, 44px);
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark {
  display: inline-flex; align-items: center;
  color: var(--indigo-bright);
  filter: drop-shadow(0 1px 5px rgba(108,138,255,.45));
  flex: none;
}
.brand-mark svg { width: 28px; height: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--text-2); transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; margin: 0 -6px 0 2px; align-items: center; }
.nav-toggle svg { width: 24px; height: 24px; display: block; }
/* demo entry lives in the markup for the mobile menu only — desktop has the
   header button (hidden <=860px), so without this the menu has no demo path */
.nav-demo { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
}

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--d-text-2); padding: 72px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--d-text-3); margin-bottom: 16px; font-weight: 600; }
.footer-grid a { display: block; color: var(--d-text-2); font-size: 15px; padding: 5px 0; transition: color .15s; }
.footer-grid a:hover { color: var(--d-text); }
.footer-brand .brand { color: var(--d-text); margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; max-width: 320px; line-height: 1.6; }
.footer-bottom {
  margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--d-border);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--d-text-3);
}
.footer-bottom .org { color: var(--d-text-2); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ---- Cards ---- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,.7,.3,1), transform .7s cubic-bezier(.16,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
/* mobile: reveals land faster (flick-speed scrolling) */
@media (max-width: 760px) {
  .reveal { transition-duration: .45s; transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- Pills / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  padding: 6px 11px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text-2);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.status-dot.green { background: var(--green); box-shadow: 0 0 0 3px rgba(47,158,107,.16); }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(201,135,31,.16); }
.status-dot.red   { background: var(--red);   box-shadow: 0 0 0 3px rgba(200,69,61,.16); }

/* utility */
.mono { font-family: var(--mono); }
.indigo { color: var(--indigo); }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* mobile header menu (<=860px) */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-header .nav { position: relative; }
  .site-header.menu-open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: calc(100% + 1px); left: 0; right: 0; background: rgba(12,13,17,.97); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--d-border); border-bottom: 1px solid var(--d-border); padding: 4px var(--pad) 12px; box-shadow: 0 22px 50px rgba(0,0,0,.5); }
  .site-header.menu-open .nav-links a { padding: 14px 2px; font-size: 16px; color: var(--d-text-2); border-bottom: 1px solid var(--d-border); }
  .site-header.menu-open .nav-links a:last-child { border-bottom: 0; }
  .site-header.on-dark.menu-open .nav-links a { color: rgba(244,245,248,.82); }
  .site-header.menu-open .nav-links a.nav-demo { display: block; color: var(--indigo-bright); font-weight: 600; }
}
