:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --ink: #15171c;
  --muted: #5b6470;
  --line: #e3e6ea;
  --accent: #3a4ee8;
  --accent-ink: #ffffff;
  --radius: 12px;
  --maxw: 920px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- header ---- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav a { color: var(--muted); margin-left: 22px; font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 560px) {
  .nav a { margin-left: 14px; font-size: 14px; }
  .brand { font-size: 15px; }
}

/* ---- nav dropdown ---- */
.nav-drop { position: relative; display: inline-block; margin-left: 22px; }
.nav-drop-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
  font-family: var(--font);
  line-height: inherit;
  cursor: pointer;
}
.nav-drop-btn:hover { color: var(--ink); }
.nav-drop-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 30;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop.open .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu { display: block; }
.nav .nav-drop-menu a { display: block; margin-left: 0; padding: 7px 16px; font-size: 14px; }
.nav .nav-drop-menu a:hover { background: var(--bg-alt); color: var(--ink); }
@media (max-width: 560px) { .nav-drop { margin-left: 14px; } .nav-drop-btn { font-size: 14px; } }

/* ---- identity card (dashboard home) ---- */
.identity { padding: 56px 0 28px; }
.identity h1 {
  font-size: 2.4rem;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  line-height: 1.1;
}
.identity .role-line {
  font-size: 1.12rem;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 22px;
  max-width: 42rem;
}
.identity .lede {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 42rem;
  font-size: 1.02rem;
}
.identity .meta-line { font-size: 14px; color: var(--muted); margin: 0; }
.identity .meta-line a { color: var(--muted); }
.identity .meta-line a:hover { color: var(--ink); }

/* ---- KPI strip ---- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 0 0 24px;
  border-top: 0;
  max-width: 560px;
}
.kpi {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.kpi strong {
  display: block;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.kpi span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
@media (max-width: 680px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---- hero ---- */
.hero { padding: 72px 0 44px; }
.hero h1 {
  font-size: 2.6rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.hero .lede { font-size: 1.18rem; color: var(--muted); max-width: 40rem; margin: 0; }
.kicker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}
@media (max-width: 560px) { .hero h1 { font-size: 2rem; } }

/* ---- buttons ---- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--bg);
}
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.07); }

/* ---- sections ---- */
section { padding: 44px 0; border-top: 1px solid var(--line); }
section h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
section .sub { color: var(--muted); margin: 0 0 26px; }
.muted { color: var(--muted); }

/* ---- pull quote ---- */
.quote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-size: 1.12rem;
  color: var(--ink);
}

/* ---- cards ---- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .cards { grid-template-columns: 1fr; } }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }

/* ---- clickable cards + snapshot thumbs ---- */
.card { position: relative; }
.card-thumb {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #fff;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
/* stretched link: makes the whole card the click target of .links a.stretch.
   The link itself must NOT be positioned so its ::after anchors to .card. */
.card .links a { position: relative; z-index: 1; }
.card .links a.stretch { position: static; }
.card .links a.stretch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.card .tags { margin: 12px 0 16px; }
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  margin: 0 6px 6px 0;
}
.card .links a { font-size: 14px; margin-right: 16px; }

/* ---- value blocks / lists ---- */
.blocks { display: grid; gap: 16px; }
.block { padding: 16px 18px; background: var(--bg-alt); border-radius: var(--radius); }
.block strong { display: block; margin-bottom: 2px; }
dl.spec { margin: 0; }
dl.spec div { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
dl.spec dt { flex: 0 0 180px; color: var(--muted); font-size: 15px; }
dl.spec dd { margin: 0; }
@media (max-width: 560px) { dl.spec div { flex-direction: column; gap: 2px; } dl.spec dt { flex-basis: auto; } }

/* ---- diagram ---- */
.diagram { width: 100%; height: auto; margin: 8px 0 4px; }
.diagram-caption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---- screenshots gallery ---- */
.shots { display: grid; gap: 32px; margin-top: 18px; }
.shot { margin: 0; }
.shot a { display: block; position: relative; }
.shot img,
.shot video {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
/* Anchor-wrapped images become Apple-style thumbnails that crop from the top
   and expand on click. Videos and bare images are unaffected. */
.shot a img {
  max-height: 480px;
  object-fit: cover;
  object-position: top;
  cursor: zoom-in;
  transition: filter 0.15s, border-color 0.15s;
}
.shot a:hover img { border-color: var(--ink); filter: brightness(0.97); }
.shot a::after {
  content: "⤢ Click to expand";
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: #fff;
  background: rgba(21, 23, 28, 0.72);
  padding: 4px 9px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.shot a:hover::after { opacity: 1; }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.shot figcaption strong { color: var(--ink); font-weight: 600; }

/* ---- video walkthroughs grid ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 18px;
}
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }
.video-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.video-title {
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.video-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.55;
  flex: 1;
}
.video-play {
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}
.video-play:hover { border-color: var(--ink); }
.video-play:hover .play-overlay { transform: translate(-50%, -50%) scale(1.08); background: rgba(0, 0, 0, 0.85); }
.video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
/* Image thumbnail variant — same card layout as videos, but click opens
   the full image in the lightbox instead of a video. */
.shot-thumb {
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}
.shot-thumb:hover { border-color: var(--ink); }
.shot-thumb:hover .zoom-overlay { transform: translate(-50%, -50%) scale(1.08); background: rgba(0, 0, 0, 0.85); }
/* contain variant: show the whole image letterboxed (portrait phone shots) */
.shot-thumb.contain img { object-fit: contain; background: #0b0d12; }
.card .shot-thumb { margin-top: 16px; position: relative; z-index: 1; }
.shot-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  pointer-events: none;
}
.zoom-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 24px;
  line-height: 56px;
  text-align: center;
  pointer-events: none;
  transition: transform 0.18s, background 0.18s;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 22px;
  line-height: 56px;
  text-align: center;
  padding-left: 4px;
  pointer-events: none;
  transition: transform 0.18s, background 0.18s;
}

/* ---- lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
  padding: 24px;
  overflow: auto;
}
.lightbox img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  background: #000;
}
.lightbox video {
  max-width: 100%;
  max-height: calc(100vh - 64px);
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
  background: #000;
}
.lightbox-close {
  position: fixed;
  top: 14px;
  right: 18px;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}
.lightbox-close:hover { color: var(--accent); }
body.lightbox-open { overflow: hidden; }

/* ---- footer ---- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

.note {
  background: #fff8e6;
  border: 1px solid #f0e2b8;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #6b5b1f;
  margin: 18px 0;
}
