/* ============================================================
   Muse — marketing page
   Flat white. Black particle wordmark. Orbiting imagery.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --ink:       #0a0a0a;   /* near-black */
  --ink-soft:  #555555;
  --ink-faint: #8c8c8c;
  --line:      rgba(10, 10, 10, 0.12);
  --line-2:    rgba(10, 10, 10, 0.06);

  /* app-window chrome — exact values from the real Muse app (light) */
  --app-paper:  #f6f5f4;            /* main grid area (flush) */
  --app-bar:    #f2f0ec;            /* toolbar (light, flush across the top) */
  --app-side:   #fcfcfc;            /* sidebar (flush, full height) */
  --app-tile:   #e7e6e3;           /* grid tile placeholder (.905/.901/.892) */
  --app-ink:    #1d1d1f;           /* .primary (near-black) */
  --app-soft:   #86868b;           /* .secondary (system gray) */
  --app-line:   rgba(0, 0, 0, 0.08);
  --app-chip:   rgba(0, 0, 0, 0.08);   /* unselected pill fill (.primary 8%) */
  --app-blue:   #007aff;           /* macOS accent */
  --app-blue-bg:rgba(0, 122, 255, 0.14);

  --serif: "Instrument Serif", Georgia, serif;
  --fat:   "Bagel Fat One", system-ui, sans-serif;
  --sans:  "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* visually hidden, still read by assistive tech (no visual footprint) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

::selection { background: var(--ink); color: #fff; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }
/* Bagel Fat One has no italic — keep display headings upright */
.showcase-head h2, .showcase-head h2 em, .feature h3 { font-style: normal; }

/* ───────── Header ───────── */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 2.4vw, 34px) clamp(20px, 4vw, 56px);
}
/* logo + nav float on rounded glass cards, above the particle pixels */
.logo {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink);
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: .5px solid rgba(0,0,0,.06); border-radius: 100px;
  padding: 10px; box-shadow: 0 8px 24px -10px rgba(0,0,0,.18);
}
.logo-mark { display: grid; place-items: center; color: var(--ink);
  transition: transform .6s var(--ease); }
.logo:hover .logo-mark { transform: rotate(90deg); }
.logo-word {
  font-family: var(--fat); font-size: 27px; letter-spacing: 0.5px;
  line-height: 1;
}
.site-nav {
  display: flex; align-items: center; gap: clamp(10px, 1.4vw, 18px);
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: .5px solid rgba(0,0,0,.06); border-radius: 100px;
  padding: 7px 8px 7px 18px; box-shadow: 0 8px 24px -10px rgba(0,0,0,.18);
}
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.5px;
  color: #2b2b2b;
  /* drive states with color only (no opacity, no transform) so nothing
     shifts or re-rasterizes on hover; stable layer keeps it crisp */
  transition: background .25s, color .25s, border-color .25s;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.nav-link:hover { color: var(--ink); }
/* GitHub (non-download) turns grey on hover */
.nav-link:not(.nav-download):hover { color: #9a9a9a; }
.nav-download {
  border: 1px solid var(--ink); padding: 7px 14px; border-radius: 100px;
  color: var(--ink);
}
.nav-download:hover { background: var(--ink); color: #fff; }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  background: var(--bg);
  /* the app preview sits centered over the particle wordmark */
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* don't let the window's content widen the page */
  place-items: center;
  padding: clamp(90px, 14vh, 160px) clamp(16px, 4vw, 48px);
}

/* grain wordmark canvas — fills the hero and extends below it (the grain field
   descends past the hero and fades down, all one animated particle system) */
.muse-canvas {
  position: absolute; top: 0; left: 0; z-index: 1;
  width: 100%; height: calc(100svh + 900px);
  display: block; pointer-events: auto;
}


/* ───────── Info cards over a dot field that fades down ───────── */
/* glass info cards in a 3 × 2 grid (over the animated grain field) */
.info {
  position: relative; z-index: 5;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(40px, 7vh, 96px) clamp(16px, 4vw, 44px) 80px;   /* 80px to the MUSE footer */
}
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 1.8vw, 26px);
  align-items: stretch;
}
.info-card {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.60);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: .5px solid rgba(255,255,255,.7);
  border-radius: 18px; padding: clamp(22px, 1.7vw, 30px);
  box-shadow: 0 20px 44px -28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.65);
}
.card-num {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-faint);
}
.info-card h3 {
  font-family: var(--fat); font-weight: 400; font-style: normal;
  font-size: clamp(17px, 1.4vw, 21px); line-height: 1.18;
  margin: 8px 0 9px; color: var(--ink);
}
.info-card p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.58; }
.info-card ul {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.info-card li {
  position: relative; padding-left: 16px;
  color: var(--ink-soft); font-size: 12.5px; line-height: 1.45;
}
.info-card li::before {
  content: ""; position: absolute; left: 1px; top: 7px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint);
}

@media (max-width: 860px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

/* ───────── mac window — faithful recreation of the real Muse app ───────── */
.window {
  width: 100%; max-width: 1040px; margin: 0 auto;
  z-index: 2;   /* above the particle canvas (z-index 1) */
  border: 1px solid rgba(0,0,0,.10); border-radius: 18px; overflow: hidden;
  background: var(--app-bar);
  /* Lineform's macOS shadow: big soft drop + inner top highlight */
  box-shadow:
    0 34px 90px rgba(32,28,20,.18),
    0 10px 30px rgba(32,28,20,.10),
    0 1px 0 rgba(255,255,255,.96) inset;
  color: var(--app-ink);
  /* San Francisco (native macOS UI font), never the site's display font */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* grid: full-height sidebar (col 1) | toolbar over content (col 2 row 1) + content (row 2) */
  position: relative; height: 560px;
  display: grid;
  grid-template-columns: 240px 1fr;   /* sidebar card ≈ 220px + 10px insets */
  grid-template-rows: 54px 1fr;
}
/* toolbar — sits over the content only (right of the floating sidebar card) */
.window-bar {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
}
/* traffic lights — aligned with the toolbar icons (pill center ≈ 27px) */
.traffic { position: absolute; top: 20px; left: 20px; z-index: 5; display: flex; gap: 9px; }
.traffic i { width: 13px; height: 13px; border-radius: 50%; display: block;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); }
.traffic .r { background: #fe5f57; } .traffic .y { background: #febc2e; } .traffic .g { background: #28c840; }

/* macOS glass pill controls — translucent white capsule, soft shadow, inner highlight */
.bar-cluster {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,.66);
  border: .5px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.8) inset;
}
.bar-btn {
  display: grid; place-items: center; min-width: 32px; height: 30px;
  padding: 0 6px; border-radius: 999px; color: #5a5d5b; flex: none; cursor: pointer;
  transition: background .12s;
}
.bar-btn:hover { background: rgba(0,0,0,.06); color: #2a2c2b; }
.bar-btn svg { width: 17px; height: 17px; }
/* nudge the line icons toward macOS SF-Symbol weight */
.bar-btn svg path, .bar-btn svg rect, .bar-btn svg circle, .bar-btn svg line { stroke-width: 1.5; }

/* search — rounded glass field, centered */
.window-search {
  margin: 0 auto; display: flex; align-items: center; gap: 8px;
  width: clamp(240px, 40%, 460px); height: 34px; box-sizing: border-box;
  background: rgba(255,255,255,.66); color: var(--app-soft);
  border: .5px solid rgba(0,0,0,.06); border-radius: 999px; padding: 0 14px;
  font-size: 13.5px; cursor: text;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.8) inset;
}
.window-search svg { color: var(--app-soft); flex: none; }
.window-search .search-short { display: none; }
.window-tools { display: flex; align-items: center; gap: 2px; flex: none; }

.app-sidebar, .app-main { min-height: 0; }

/* sidebar — full-height floating rounded card that overlaps the toolbar (macOS Tahoe) */
.app-sidebar {
  grid-column: 1; grid-row: 1 / 3;
  /* floating rounded card — the app/base shows around it (measured ~10px inset) */
  margin: 10px;
  background: var(--app-side);
  border: .5px solid rgba(0,0,0,.05);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 10px 26px rgba(0,0,0,.10);
  display: flex; flex-direction: column; overflow: hidden;
  position: relative; z-index: 3;
}
/* sidebar collapse toggle — top-right, aligned with the close circles */
.side-toggle {
  position: absolute; top: 4px; right: 12px; z-index: 6;
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 6px; color: #5a5d5b; cursor: pointer;
}
.side-toggle:hover { background: rgba(0,0,0,.06); }
.side-scroll { flex: 1; overflow: hidden; padding: 52px 10px 6px; min-height: 0; }
.side-section + .side-section { margin-top: 2px; }
.side-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 6px 2px;
  font-size: 11px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--app-soft);
}
.side-collapse {
  display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(0,0,0,.08); color: var(--app-soft);
  font-size: 11px; line-height: 1;
}
.side-sort {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 2px; font-size: 11px; font-weight: 500; color: var(--app-soft);
}
.side-sort svg { color: var(--app-soft); }
.side-list { list-style: none; display: flex; flex-direction: column; gap: 1px; padding: 2px 0 8px; }
.side-item {
  display: flex; align-items: center; gap: 8px; height: 28px;
  padding: 0 6px; border-radius: 6px; color: var(--app-ink);
  cursor: pointer; transition: background .12s;
}
.si-chev { width: 10px; flex: none; display: grid; place-items: center; color: var(--app-soft); }
.si-ico  { width: 18px; flex: none; display: grid; place-items: center; color: var(--app-ink); }
.si-label { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-count { font-size: 11px; color: var(--app-soft); font-variant-numeric: tabular-nums; }
.side-item:hover { background: rgba(0,0,0,.06); }
.side-item.active, .side-item.active:hover { background: var(--app-blue-bg); }
.side-item.active .si-ico, .side-item.active .si-label { color: var(--app-blue); }
/* collection rows: label is regular weight */
.side-section:last-child .si-label { font-weight: 400; }

.side-foot { display: flex; gap: 10px; padding: 12px 16px; }
.side-pill {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 28px; border: none; border-radius: 100px; cursor: pointer;
  background: #333; color: #fff; transition: background .15s;
}
.side-pill:hover { background: #1f1f1f; }
.side-pill svg { color: #fff; }

/* image area — fills col 2 / row 2 (under the toolbar, right of the sidebar card) */
.app-main {
  grid-column: 2; grid-row: 2;
  position: relative; background: var(--app-paper);
  padding: 10px 14px 0;
  display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
.tag-row {
  display: flex; gap: 8px; flex: none; padding: 4px 0 2px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth; overscroll-behavior-x: contain;
}
.tag-row::-webkit-scrollbar { display: none; }
.tag-pill {
  flex: none; display: grid; place-items: center; height: 30px; padding: 0 14px;
  font-size: 13px; font-weight: 500; color: var(--app-soft);
  background: var(--app-chip); border-radius: 100px;
  cursor: pointer; transition: background .15s, color .15s;
}
.tag-pill:hover { background: rgba(0,0,0,.16); color: var(--app-ink); }
.tag-pill.active, .tag-pill.active:hover { background: #000; color: #fff; }

/* masonry grid — explicit columns, each independent (square corners, like the real app) */
.app-grid {
  display: flex; align-items: flex-start; gap: 8px;
}
.grid-col {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.app-grid .tile {
  overflow: hidden; position: relative; background: var(--app-tile); cursor: pointer;
  opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.app-grid.in .tile { opacity: 1; transform: none; }
/* after the first reveal (or any slider rebuild) tiles appear instantly */
.app-grid.live .tile { opacity: 1; transform: none; transition: none; }
.app-grid .tile::after {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0);
  transition: background .18s;
}
.app-grid .tile:hover::after { background: rgba(0,0,0,.10); }
.app-grid .tile img { width: 100%; display: block; }

/* zoom / density control — frosted capsule, floating bottom-right */
.zoom-ctl {
  position: absolute; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(0,0,0,.08); color: var(--app-soft);
  padding: 9px 14px; border-radius: 100px;
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.25);
}
.zoom-track { position: relative; width: 110px; height: 4px; border-radius: 3px;
  background: rgba(0,0,0,.14); cursor: pointer; }
.zoom-fill { position: absolute; left: 0; top: 0; height: 100%; width: 44%;
  border-radius: 3px; background: var(--app-blue); }
.zoom-knob { position: absolute; left: 44%; top: 50%; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.1);
  transition: transform .18s; }
.zoom-track:hover .zoom-knob { transform: translate(-50%, -50%) scale(1.15); }

/* features */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px);
}
.feature { border-top: 1px solid var(--line); padding-top: 22px; }
.feature h3 { font-family: var(--fat); font-weight: 400; font-size: clamp(20px,2vw,26px);
  margin: 14px 0 10px; color: var(--ink); }
.feature p { color: var(--ink-soft); font-size: 14px; line-height: 1.65; }

/* footer — just the static MUSE grain wordmark at 90% width */
.site-footer {
  padding: 0 0 clamp(36px, 6vh, 80px);
  display: flex; justify-content: center;
}
.foot-mark {
  display: block; width: 90%; aspect-ratio: 561 / 157;   /* tightened MUSE wordmark */
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* fake-link toast */
.fake-toast {
  position: fixed; z-index: 100; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-family: var(--mono); font-size: 12.5px;
  padding: 11px 20px; border-radius: 100px; pointer-events: none;
  opacity: 0; transition: opacity .35s, transform .35s var(--ease);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.35);
}
.fake-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────── Responsive ───────── */
@media (max-width: 760px) {
  /* header buttons keep their full labels on mobile (no collapse), just compact */
  .site-header { padding: 10px 10px; gap: 8px; }
  .logo { padding: 7px; }
  .logo-mark svg { width: 26px; height: 26px; }
  .site-nav { gap: 6px; padding: 5px 6px 5px 11px; }
  .nav-link { font-size: 11px; gap: 5px; letter-spacing: 0; }
  .nav-link svg { width: 13px; height: 13px; }
  .nav-download { padding: 5px 9px; }
  .nav-download svg { width: 12px; height: 12px; }
}

/* phone: app window is just the image grid — no sidebar, trimmed toolbar */
@media (max-width: 720px) {
  /* pin the window to the viewport so its content can't widen the page */
  .window { grid-template-columns: 1fr; height: 70svh;
    width: calc(100vw - 24px); max-width: calc(100vw - 24px); }
  .app-sidebar { display: none; }
  .window-bar { grid-column: 1; padding: 0 12px 0 88px; gap: 7px; }  /* clear + space past the close circles */
  .app-main { grid-column: 1; }
  .traffic { top: 18px; left: 16px; }
  /* keep only the close circles · search · view toggle; drop the sort/filter/down
     group (it crowded the circles), the tag/stack group, and the » */
  .window-bar .bar-cluster:nth-of-type(1),
  .window-bar .bar-cluster:nth-of-type(2),
  .window-bar .bar-cluster:nth-of-type(4) { display: none; }
  .window-search { flex: 1; width: auto; min-width: 0; }
  .window-search .search-full { display: none; }
  .window-search .search-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
