/* ------------------------------------------------------------------
   Interactive landing mock — a HTML/CSS approximation of the actual
   GatherOS UI. Values mirror the real app's CSS variables and
   component recipes (see src/renderer/styles/variables.css and
   src/renderer/components/*.module.css). Hovering a featured-bucket
   card fans out the stack — same nth-child rotate/translate the real
   FeaturedBuckets uses, just rendered in plain CSS.
   ------------------------------------------------------------------ */

.hero .div-block,
.hero .div-block-4 {
  max-width: 1500px;
}

.hero .div-block-4 .brand-link {
  display: inline-block;
  padding: 0;
  margin: 0;
}

.hero .div-block-4 .brand-logo {
  display: block;
  width: 140px;
  height: 35px;
  margin: 0;
}

@media (max-width: 991px) {
  .hero .div-block-4 .brand-logo {
    width: 130px;
    height: 32px;
  }
}

.mock {
  --m-content-bg: #FAFAF9;
  --m-surface-1: #FAFAF9;
  --m-border: rgba(0, 0, 0, 0.07);
  --m-border-strong: rgba(0, 0, 0, 0.12);
  --m-text-primary: #000;
  --m-text-secondary: rgba(0, 0, 0, 0.55);
  --m-text-tertiary: rgba(0, 0, 0, 0.4);
  --m-hover-bg: #EAEAEA;
  --m-icon-muted: #c2c2c2;
  --m-text-md: 13px;
  --m-text-sm: 12px;
  --m-text-xs: 11px;
  --m-text-lg: 18px;

  flex: 0 0 auto;
  width: calc(100vw - 100px);
  min-width: 880px;
  align-self: stretch;
  display: flex;
  perspective: 1100px;
  perspective-origin: 25% 40%;
  font-family: 'Geist', 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.mock-window {
  width: 100%;
  min-width: 880px;
  background: var(--m-content-bg);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 14px 32px rgba(0, 0, 0, 0.08),
    0 32px 64px -20px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  transform:
    rotateY(-14deg)
    rotateX(8deg)
    rotateZ(-1deg);
  transform-origin: left center;
  color: var(--m-text-primary);
}

/* ── Traffic lights row ────────────────────────────────────────── */

.mock-traffic-row {
  display: flex;
  align-items: center;
  padding: 14px 16px 0;
}

.mock-traffic {
  display: flex;
  gap: 8px;
}

.mock-traffic span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mock-traffic span:nth-child(1) { background: #ff5f57; }
.mock-traffic span:nth-child(2) { background: #febc2e; }
.mock-traffic span:nth-child(3) { background: #28c840; }

/* ── Toolbar — matches Toolbar.module.css ─────────────────────── */

.mock-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 24px 14px 24px;
}

.mock-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-self: start;
}

.mock-brand {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transform: translateY(2px);
  filter:
    drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.18))
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.10))
    drop-shadow(0 6px 8px rgba(0, 0, 0, 0.05));
}

.mock-library-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--m-text-md);
  font-weight: 600;
  color: var(--m-text-primary);
  padding: 4px 6px;
  border-radius: 6px;
}

.mock-library-switcher .mock-chev {
  font-size: 9px;
  color: var(--m-text-tertiary);
  display: inline-flex;
}

.mock-search-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--m-text-secondary);
}

.mock-search-icon svg {
  width: 16px;
  height: 16px;
}

.mock-mode-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 4px;
  background: var(--m-surface-1);
  border: 1px solid var(--m-border);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  justify-self: center;
}

.mock-mode-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 140px;
  background: var(--m-text-primary);
  border-radius: 999px;
  z-index: 0;
}

.mock-mode-segment {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 46px;
  padding: 0;
  background: transparent;
  border-radius: 999px;
  font-size: var(--m-text-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--m-text-primary);
  gap: 8px;
}

.mock-mode-segment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.mock-mode-segment-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.mock-mode-segment.is-active {
  color: var(--m-surface-1);
}

.mock-mode-segment:not(.is-active) .mock-mode-segment-icon {
  display: none;
}

.mock-toolbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-self: end;
}

.mock-icon-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--m-text-secondary);
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mock-icon-btn:hover {
  background: var(--m-hover-bg);
  color: var(--m-text-primary);
}

.mock-icon-btn svg {
  width: 16px;
  height: 16px;
}

.mock-icon-divider {
  width: 0.5px;
  height: 18px;
  background: rgba(0, 0, 0, 0.05);
  margin: 0 6px;
}

.mock-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px 0 18px;
  background: var(--m-text-primary);
  border-radius: 999px;
  color: var(--m-surface-1);
  font-size: var(--m-text-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-left: 6px;
}

.mock-add svg {
  width: 16px;
  height: 16px;
}

/* ── Sub-tabs + sort row ─────────────────────────────────────── */

.mock-subtabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px 16px;
  font-size: var(--m-text-md);
}

.mock-subtab {
  color: var(--m-text-tertiary);
  padding: 6px 0;
  position: relative;
}

.mock-subtab.is-active {
  color: var(--m-text-primary);
}

.mock-subtab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--m-text-primary);
}

.mock-toolbar-sort {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mock-slider {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--m-text-tertiary);
}

.mock-slider-track {
  width: 110px;
  height: 3px;
  background: var(--m-border-strong);
  border-radius: 2px;
  position: relative;
}

.mock-slider-thumb {
  position: absolute;
  top: -5px;
  right: 0;
  width: 20px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #f3f3f5 100%);
  border: 0.5px solid rgba(0, 0, 0, 0.16);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.22);
}

.mock-sort {
  color: var(--m-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--m-border);
  background: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: var(--m-text-md);
}

.mock-sort .mock-chev {
  font-size: 9px;
  color: var(--m-text-tertiary);
}

/* ── Featured-bucket cards — match FeaturedBuckets.module.css ─ */

.mock-cards-row {
  display: flex;
  gap: 12px;
  padding: 4px 24px 20px;
  overflow: hidden;
}

.mock-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 188px;
  padding: 14px 14px 12px;
  background: var(--m-surface-1);
  border: 1px solid var(--m-border);
  border-radius: 8px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
  transform: translate3d(0, 0, 0);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.mock-card:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.08);
}

.mock-card-stack {
  position: relative;
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 600px;
}

.mock-card-stack img {
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.04);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mock-card-stack img:nth-child(1) { transform: rotate(-7deg) translate(-10px, 4px); z-index: 1; }
.mock-card-stack img:nth-child(2) { transform: rotate(-2deg) translate(-3px, 0px);  z-index: 2; }
.mock-card-stack img:nth-child(3) { transform: rotate(3deg)  translate(5px, 0px);   z-index: 3; }
.mock-card-stack img:nth-child(4) { transform: rotate(8deg)  translate(12px, 4px);  z-index: 4; }

.mock-card:hover .mock-card-stack img:nth-child(1) { transform: rotate(-16deg) translate(-30px, 8px); }
.mock-card:hover .mock-card-stack img:nth-child(2) { transform: rotate(-6deg)  translate(-12px, -2px); }
.mock-card:hover .mock-card-stack img:nth-child(3) { transform: rotate(7deg)   translate(14px, -2px); }
.mock-card:hover .mock-card-stack img:nth-child(4) { transform: rotate(18deg)  translate(32px, 8px); }

.mock-card-stack-empty {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--m-icon-muted);
}

.mock-card-stack-empty svg {
  width: 28px;
  height: 28px;
}

.mock-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mock-card-name {
  font-size: var(--m-text-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-card-count {
  font-size: var(--m-text-xs);
  color: var(--m-text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* ── Masonry grid ─────────────────────────────────────────────── */

.mock-grid {
  column-width: 220px;
  column-gap: 10px;
  padding: 0 24px 24px;
}

.mock-grid img {
  width: 100%;
  display: block;
  margin: 0 0 10px;
  border-radius: 8px;
  break-inside: avoid;
  transition: transform 220ms ease;
}

.mock-grid img:hover {
  transform: scale(1.015);
}

/* ── Page-level scroll behaviour ─────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

@media (max-width: 991px) {
  .hero {
    position: relative;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
  }
}

/* ── Mobile/tablet: hide the static PNG fallback and let the live
      mock render so you see "part of the app" on small screens too.
      .hero already has overflow-x: hidden ≤991px, so the 880px-wide
      window naturally clips at the right edge of the viewport. */

.mock-fallback {
  display: none;
}

@media (max-width: 991px) {
  /* Tighten the copy → mock gap on small screens. .div-block ships
     with a 60px row-gap that makes the column layout feel airy. */
  .hero .div-block {
    grid-row-gap: 16px;
    row-gap: 16px;
  }

  /* Hero stacks vertically — let the mock sit below the copy and
     bleed off the right edge of the viewport. */
  .mock {
    width: 100vw;
    margin-top: 0;
    margin-left: -5%;   /* offset .hero's 5% side padding so the
                            mock's left edge can hit the viewport
                            edge, matching the desktop framing */
    perspective-origin: 30% 50%;
  }

  /* Soften the 3D tilt on small screens — the heavy desktop angle
     reads as broken when the window is the dominant element below
     the copy instead of off to the side. */
  .mock-window {
    transform:
      rotateY(-10deg)
      rotateX(4deg);
  }
}

@media (max-width: 479px) {
  .mock-window {
    transform:
      rotateY(-8deg)
      rotateX(3deg);
  }
}
