/* BossAttend — Design Tokens */
:root {
  /* Brand */
  --orange: #ED7421;
  --orange-bright: #FF8730;
  --orange-deep: #C85A0F;
  --orange-soft: #FFEBD9;
  --orange-glow: rgba(237, 116, 33, 0.18);

  /* Navy / Ink */
  --navy: #0F1729;
  --navy-deep: #070C18;
  --navy-700: #1E2742;
  --navy-500: #2D3A5C;

  /* Neutrals */
  --cream: #FAF6F1;
  --paper: #FFFCF8;
  --line: #E8E2D8;
  --line-strong: #D5CCBC;
  --text: #0F1729;
  --text-muted: #4A5468;
  --text-soft: #6B7689;

  /* Dark surface (for hybrid sections) */
  --dark-bg: #080B10;
  --dark-surface: #0F1420;
  --dark-surface-2: #161C2E;
  --dark-text: #EEF0F5;
  --dark-text-muted: #A8B0C2;
  --green-accent: #00E584;
  --amber: #FFB547;

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Scale */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 41, 0.04), 0 1px 2px rgba(15, 23, 41, 0.06);
  --shadow: 0 8px 24px rgba(15, 23, 41, 0.06), 0 2px 6px rgba(15, 23, 41, 0.04);
  --shadow-lg: 0 24px 64px rgba(15, 23, 41, 0.10), 0 8px 16px rgba(15, 23, 41, 0.06);
  --shadow-orange: 0 12px 32px rgba(237, 116, 33, 0.25);

  --container: 1240px;
  --container-narrow: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

/* Sections */
section { padding: clamp(40px, 5.5vw, 72px) 0; }
section.tight { padding: clamp(28px, 4vw, 48px) 0; }

/* Eyebrow / kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-deep);
  padding: 6px 12px;
  background: var(--orange-soft);
  border-radius: 999px;
}
.kicker.dark { background: rgba(0, 229, 132, 0.12); color: var(--green-accent); }
.kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); animation: pulse 2.4s ease-in-out infinite;
}
.kicker.dark .dot { background: var(--green-accent); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.85); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; transition: all 180ms ease;
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--orange); color: white; box-shadow: var(--shadow-orange); }
.btn-primary:hover { background: var(--orange-bright); transform: translateY(-1px); box-shadow: 0 16px 36px rgba(237,116,33,0.32); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); background: var(--cream); }
.btn-dark { background: var(--navy); color: white; }
.btn-dark:hover { background: var(--navy-700); }
.btn-lg { padding: 18px 30px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* Cards */
.card {
  background: white; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all 240ms ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 252, 248, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  gap: 24px;
}
.site-header .brand { display: flex; align-items: center; gap: 10px; }
.site-header .brand img { height: 30px; width: auto; }
.site-header .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--navy); letter-spacing: -0.02em; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); transition: all 180ms;
}
.site-header nav a:hover, .site-header nav a.active { color: var(--navy); background: var(--cream); }
.site-header .actions { display: flex; gap: 10px; align-items: center; }
.menu-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px; transition: background 180ms;
  align-items: center; justify-content: center;
}
.menu-toggle:hover { background: var(--cream); }
.menu-toggle .bars { display: block; width: 22px; height: 16px; position: relative; }
.menu-toggle .bars::before,
.menu-toggle .bars::after,
.menu-toggle .bars span {
  content: ''; position: absolute; left: 0; right: 0; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform 280ms cubic-bezier(.4,0,.2,1), opacity 200ms, top 280ms;
}
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars span { top: 7px; }
.menu-toggle .bars::after { top: 14px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 7px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars::after { top: 7px; transform: rotate(-45deg); }

/* Body-level mobile drawer — escapes the header's stacking context */
.mobile-drawer {
  display: none;
  position: fixed; top: var(--header-h, 64px); left: 0; right: 0;
  max-height: calc(100vh - var(--header-h, 64px));
  background: var(--paper);
  padding: 24px 20px 40px; gap: 4px;
  flex-direction: column; align-items: stretch;
  border-top: 1px solid var(--line);
  box-shadow: 0 24px 48px -12px rgba(15, 32, 56, 0.18);
  transform: translateY(-12px); opacity: 0; pointer-events: none; visibility: hidden;
  transition: transform 280ms cubic-bezier(.4,0,.2,1), opacity 220ms, visibility 0s linear 220ms;
  z-index: 9998; overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateY(0); opacity: 1; pointer-events: auto; visibility: visible;
  transition: transform 280ms cubic-bezier(.4,0,.2,1), opacity 220ms, visibility 0s linear 0s;
}
.mobile-drawer a {
  padding: 14px 18px; font-size: 17px; font-weight: 500;
  border-radius: 12px; min-height: 44px; display: flex; align-items: center;
  color: var(--text-muted); text-decoration: none;
  transition: background 180ms, color 180ms;
}
.mobile-drawer a:hover { background: var(--cream); color: var(--navy); }
.mobile-drawer a.active { background: var(--orange-soft); color: var(--orange-deep); }
.mobile-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(15, 32, 56, 0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms;
  z-index: 9997;
}
.mobile-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .site-header nav { display: none; }
  .site-header .actions .btn-ghost { display: none; }
  .site-header .actions .btn-primary { display: none; }
  .site-header .inner { gap: 12px; }
  .site-header .brand-name { font-size: 17px; }
  .mobile-drawer { display: flex; }
  .mobile-backdrop { display: block; }
  body.menu-open { overflow: hidden; }
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--dark-text-muted);
  padding: 80px 0 40px;
}
.site-footer .grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
}
.site-footer h5 { color: white; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; font-family: var(--font-mono); font-weight: 500; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--dark-text-muted); font-size: 14px; transition: color 180ms; }
.site-footer a:hover { color: white; }
.site-footer .brand-block img { height: 36px; margin-bottom: 16px; }
.site-footer .brand-block p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.site-footer .legal {
  max-width: var(--container); margin: 56px auto 0; padding: 24px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 13px;
}
@media (max-width: 800px) {
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
}

/* Utility */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); line-height: 1.6; max-width: 64ch; }
.mono { font-family: var(--font-mono); }
.grad-orange { background: linear-gradient(135deg, var(--orange) 0%, var(--orange-bright) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Noise texture overlay (used sparingly) */
.noise {
  position: relative;
}

/* ===== Reveal-on-scroll animations ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(.4,0,.2,1), transform 700ms cubic-bezier(.4,0,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1 !important; transform: none !important; transition: none !important; }
  .menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bars span,
  .mobile-drawer, .mobile-backdrop { transition: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ===== Mobile mockup tweaks (preserve design, scale gracefully) ===== */
@media (max-width: 700px) {
  /* Kanban becomes horizontal scroll on mobile to preserve the funnel concept */
  .kanban { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .kanban::-webkit-scrollbar { height: 6px; }
  .kanban::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
  .kanban-col { min-width: 220px; scroll-snap-align: start; }

  /* Phone mockup compact */
  .phone { transform: scale(0.92); transform-origin: top center; }

  /* Comparison table */
  .compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Larger tap targets */
  .btn-sm { min-height: 40px; }
  .btn, .btn-lg { min-height: 48px; }
}

@media (max-width: 460px) {
  .hero h1, h1 { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; }
  h2 { font-size: clamp(1.5rem, 6.5vw, 2rem) !important; }
  .container, .container-narrow { padding-left: 20px; padding-right: 20px; }
}
.noise::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
