/* Bossman Labs - landing page
   Design: Apple HIG foundations (semantic colour, system type, 17px body, 44px targets, light + dark, reduced motion)
   Motion: "Premium" personality - one signature easing, three durations, one entrance pattern.
   One colour means one thing: the three mark colours are ONLY the audit marks (+ added, ~ changed, ? your decision);
   blue is ONLY for actions. */

:root {
  color-scheme: light dark;

  /* colour tokens (light) */
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --text-2: #5A5A60;
  --line: #D2D2D8;
  --accent: #0A5CD6;
  --accent-hover: #0848A8;
  --on-accent: #FFFFFF;
  --add: #E98A8A;
  --change: #FFF2A8;
  --ask: #F2B16A;
  --ink: #1D1D1F;
  --header-bg: rgba(245, 245, 247, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.06), 0 18px 40px rgba(0, 0, 0, 0.10);

  /* motion tokens: signature easing + three durations */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --quick: 150ms;
  --std: 350ms;
  --slow: 700ms;

  /* type and shape */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --gap: clamp(1rem, 2.5vw, 1.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101012;
    --surface: #1C1C1E;
    --text: #F5F5F7;
    --text-2: #A8A8B0;
    --line: #3A3A3C;
    --accent: #6EA8FF;
    --accent-hover: #8FBEFF;
    --on-accent: #0B1220;
    --header-bg: rgba(16, 16, 18, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.5);
  }
}

@media (prefers-contrast: more) {
  :root { --text-2: var(--text); --line: #6E6E73; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --line: #A1A1A6; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin-top: 0; }
a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(1120px, 100% - 2 * clamp(1rem, 4vw, 2rem));
  margin-inline: auto;
}

/* ---------- header (the one translucent layer: it floats above the content) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--std) var(--ease-soft);
}
.is-scrolled .site-header { border-bottom-color: var(--line); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark {
  display: inline-grid;
  grid-template-columns: repeat(3, 7px);
  gap: 3px;
  height: 18px;
}
.mark i {
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.mark i:nth-child(1) { background: var(--add); }
.mark i:nth-child(2) { background: var(--change); }
.mark i:nth-child(3) { background: var(--ask); }

.brand-name { white-space: nowrap; }
nav { display: flex; gap: 0.1rem; }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--quick) var(--ease), background-color var(--quick) var(--ease);
}
nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
nav a[aria-current="true"] { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--text) 8%, transparent); }
@media (max-width: 26rem) {  /* small phones: a tighter header that fits one row, and wraps rather than overflows on the narrowest */
  .bar { flex-wrap: wrap; column-gap: 0.25rem; }
  .brand { gap: 0.45rem; font-size: 1rem; }
  nav a { padding: 0 0.35rem; font-size: 0.875rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--quick) var(--ease), transform var(--quick) var(--ease), border-color var(--quick) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.quiet { color: var(--accent); border-color: var(--line); background: transparent; }
.btn.quiet:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn.is-off { background: transparent; border-color: var(--line); color: var(--text-2); cursor: default; }
.btn.is-off:active { transform: none; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 8vw, 6.5rem) clamp(2rem, 6vw, 4rem);
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
}
.eyebrow { margin-bottom: 1rem; color: var(--text-2); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; }
h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.lead {
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem);
  line-height: 1.5;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

/* ---------- the settling grid (the one signature moment) ---------- */
.grid-demo { margin: 0; }
.grid-table {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}
.g-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr 0.9fr; gap: 0.25rem; }
.g-row span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.g-head span { min-height: 36px; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
@media (max-width: 30rem) {
  .g-row span { padding: 0.5rem 0.45rem; font-size: 0.8125rem; }
}

.cell {
  transition: background-color var(--slow) var(--ease-soft), color var(--slow) var(--ease-soft), box-shadow var(--slow) var(--ease-soft);
}
.cell[data-mark] {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.cell[data-mark="add"] { background: var(--add); }
.cell[data-mark="change"] { background: var(--change); }
.cell[data-mark="ask"] { background: var(--ask); }
.cell.is-clean {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px transparent;
}
.mk {
  display: inline-block;
  width: 1.1ch;
  margin-right: 0.35rem;
  font-style: normal;
  font-weight: 700;
  transition: opacity var(--std) var(--ease), transform var(--std) var(--ease);
}
.is-clean .mk { opacity: 0; transform: scale(0.6); }

.grid-demo figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.chip i { font-style: normal; font-weight: 700; }
.chip.add { background: var(--add); }
.chip.change { background: var(--change); }
.chip.ask { background: var(--ask); }
.chip.quiet-chip {
  margin: 0 0 1rem;
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
  font-weight: 500;
}
.pause {
  min-height: 44px;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color var(--quick) var(--ease), background-color var(--quick) var(--ease);
}
.pause:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.875rem, 1.4rem + 2vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.section-head p { margin: 0; color: var(--text-2); font-size: 1.1875rem; }

/* tools */
.tools { display: grid; gap: var(--gap); }
@media (min-width: 48rem) {
  .tools { grid-template-columns: repeat(2, 1fr); }
}
.tool {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--std) var(--ease), box-shadow var(--std) var(--ease);
}
@media (hover: hover) {
  .tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
.tool-visual {
  display: grid;
  place-items: center;
  height: 170px;
  padding: 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.mini { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.spark { width: 100%; max-width: 340px; height: auto; }
.spark path { fill: none; stroke-width: 3; stroke-linecap: round; }
.spark .rival { stroke: var(--text-2); opacity: 0.7; stroke-dasharray: 1 9; }   /* dotted vs solid: the lines differ by shape, not only colour */
.spark .ours { stroke: var(--accent); }
.spark .dot { fill: var(--accent); }
.spark .lbl { font: 600 13px var(--font); }
.spark .rival-lbl { fill: var(--text-2); }
.spark .ours-lbl { fill: var(--accent); }
.tool-visual > * { transition: transform var(--std) var(--ease); }
@media (hover: hover) {
  .tool:hover .tool-visual > * { transform: scale(1.03); }   /* secondary motion: the picture answers the card lifting */
}
.tool-body { flex: 1; padding: 1.5rem 1.75rem 0; }
.tool h3 { margin-bottom: 0.25rem; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.016em; }
.tool-line { margin-bottom: 0.75rem; color: var(--text-2); font-weight: 600; }
.tool-body p:last-child { margin-bottom: 0; }
.tool-foot { padding: 1.5rem 1.75rem 1.75rem; }

/* principles */
.principles { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 56rem) {
  .principles { grid-template-columns: repeat(3, 1fr); }
}
.principle { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.principle h3 { margin-bottom: 0.5rem; font-size: 1.3125rem; letter-spacing: -0.012em; }
.principle p { margin: 0; color: var(--text-2); }

/* about */
.about > div { max-width: 46rem; }
.about .lead { color: var(--text); max-width: none; }
.meta { margin: 1.5rem 0 0; color: var(--text-2); }
.meta a { display: inline-block; padding-block: 0.65rem; margin-block: -0.65rem; }  /* a 44px tap area, no layout change */

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.foot p { margin: 0; }
.muted { color: var(--text-2); }

/* ---------- entrance motion: fade + rise 20px, decelerate, 70ms stagger ---------- */
.js .reveal { opacity: 0; }
.js .reveal.in {
  opacity: 1;
  animation: rise var(--slow) var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.stagger > .reveal:nth-child(1) { --i: 0; }
.stagger > .reveal:nth-child(2) { --i: 1; }
.stagger > .reveal:nth-child(3) { --i: 2; }
.stagger > .reveal:nth-child(4) { --i: 3; }
.stagger > .reveal:nth-child(5) { --i: 4; }
.grid-demo.reveal { --i: 3; }

/* Hawkeye line draws once, when the card arrives */
.js .spark .ours { stroke-dasharray: 600; stroke-dashoffset: 600; }
.js .spark .dot { opacity: 0; }
.js .tool.in .spark .ours { animation: draw 900ms var(--ease) 250ms forwards; }
.js .tool.in .spark .dot { animation: pop var(--std) var(--ease) 1050ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); transform-origin: 320px 38px; } to { opacity: 1; transform: none; } }

/* ---------- reduced motion: everything is already in its final, readable state ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; }
  .js .spark .ours { stroke-dashoffset: 0; }
  .js .spark .dot { opacity: 1; }
  .pause { display: none; }
  .tool:hover { transform: none; }
}
