/* =============================================================================
   whittled.dev · mantel.css
   Mantel's page only, linked after site.css: the hero layout, the dot chips in
   the copy, the Planned and Permissions lists and the product visuals
   (planning/Whittled/docs/ui-spec.md §5–6). Built from site.css tokens.
   Inside a .shot every size is calc(N * var(--pt)), one macOS point.
   ============================================================================= */


/* 1. Hero ---------------------------------------------------------------------
   Mantel's interface is a strip across the top of the screen, so the hero
   centres its text and gives the menu bar the full container width. Below
   600 px the text is left-aligned, as on every app page. */

@media (min-width: 600px) {
  .mt-hero .app-hero__text { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .mt-hero .app-icon { margin-inline: 0; }
  .mt-hero .app-hero__lead { max-width: 31em; }
  .mt-hero .app-hero__actions,
  .mt-hero .meta-list { justify-content: center; }
}
@media (min-width: 960px) {
  .mt-hero .app-hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-8); }
}

/* The closing panel's small print: version, requirements and how to verify. */
.mt-get .mt-get__fine { display: grid; gap: var(--s-2); justify-items: center; }
.mt-get .mt-get__fine .link { color: var(--text); white-space: nowrap; }


/* 2. Copy details -------------------------------------------------------------- */

/* • and •• in running text, drawn like the markers in the menu bar: 6 px
   dots, 4 px apart. The characters stay in the HTML for the Markdown mirror;
   the chip carries role="img" and a name ("one dot", "two dots"). */
.mt-dots {
  --dot: radial-gradient(circle closest-side, var(--text) 86%, transparent);
  display: inline-block;
  width: 1.75em;
  height: 1.35em;
  margin-inline: .08em;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--dot) center / 6px 6px no-repeat;
  color: transparent;
  font-size: 1em;
  line-height: 1.35;
  text-align: center;
  vertical-align: -.24em;
  user-select: none;
}
.mt-dots--two {
  width: 2.2em;
  background:
    var(--dot) calc(50% - 5px) 50% / 6px 6px no-repeat,
    var(--dot) calc(50% + 5px) 50% / 6px 6px no-repeat;
}

/* Planned and Permissions: a plain list with hairlines, like the facts beside it. */
.mt-planned { margin-top: var(--s-3); border-top: 1px solid var(--line); }
.mt-planned > li { padding-block: 12px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.mt-planned strong { font-weight: 500; color: var(--text); }


/* 3. Product visuals ------------------------------------------------------------
   Positioned pieces: .mt-abs takes --x, --y, --w and --h in points. Each piece
   is a box with its material (wallpaper, menu bar, window, panel) and an SVG
   whose viewBox is the box's own size in points, so the drawing scales with
   the column and stays crisp. */

.mt-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.mt-abs {
  position: absolute;
  left: calc(var(--x, 0) * var(--pt));
  top: calc(var(--y, 0) * var(--pt));
  width: calc(var(--w) * var(--pt));
  height: calc(var(--h) * var(--pt));
}
.mt-fill { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }

/* Hearth, Mantel's wallpaper (ui-spec 2.4): the token's amber-to-rust
   gradient, with soft folds of light and shade so it reads as a desktop
   picture rather than a flat fill. */
.mt-shot {
  --mt-folds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 620' preserveAspectRatio='none'%3E%3Cfilter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='26'/%3E%3C/filter%3E%3Cg filter='url%28%23b%29'%3E%3Cpath d='M-60 250C190 120 420 330 650 215S930 40 1060 70V-60H-60Z' fill='%23FFF6E4' fill-opacity='.42'/%3E%3Cpath d='M-60 410C170 330 360 480 590 395S900 200 1060 250V700H-60Z' fill='%23B8441A' fill-opacity='.34'/%3E%3Cpath d='M-60 560C250 500 500 620 780 545S1000 460 1060 480V700H-60Z' fill='%23862B0C' fill-opacity='.32'/%3E%3C/g%3E%3C/svg%3E");
  --mt-glow: radial-gradient(60% 80% at 84% 0%, rgba(245, 166, 35, .42), transparent 72%);
  --mt-rim: 0 0 0 0 transparent;
}
html[data-theme="dark"] .mt-shot {
  --mt-folds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 620' preserveAspectRatio='none'%3E%3Cfilter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='26'/%3E%3C/filter%3E%3Cg filter='url%28%23b%29'%3E%3Cpath d='M-60 250C190 120 420 330 650 215S930 40 1060 70V-60H-60Z' fill='%23DD7A30' fill-opacity='.26'/%3E%3Cpath d='M-60 410C170 330 360 480 590 395S900 200 1060 250V700H-60Z' fill='%23B9531C' fill-opacity='.22'/%3E%3Cpath d='M-60 560C250 500 500 620 780 545S1000 460 1060 480V700H-60Z' fill='%23000000' fill-opacity='.38'/%3E%3C/g%3E%3C/svg%3E");
  --mt-glow: radial-gradient(60% 80% at 84% 0%, rgba(232, 120, 48, .30), transparent 72%);
  --mt-rim: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.mt-wall {
  position: absolute;
  inset: 0;
  background: var(--mt-folds) center / 100% 100% no-repeat, var(--mt-glow), var(--wall-hearth);
}
/* Inside a menu bar strip, only the top of the picture shows. */
.mt-wall--top { inset: -140% 0 auto 0; height: 700%; }

.mt-menubar {
  background: var(--mac-menubar);
  -webkit-backdrop-filter: blur(calc(24 * var(--pt))) saturate(1.6);
  backdrop-filter: blur(calc(24 * var(--pt))) saturate(1.6);
}

.mt-win {
  overflow: hidden;
  border-radius: calc(12 * var(--pt));
  background: var(--mac-window);
  box-shadow:
    var(--mt-rim),
    0 0 0 calc(.5 * var(--pt)) rgba(0, 0, 0, .25),
    0 calc(10 * var(--pt)) calc(30 * var(--pt)) rgba(0, 0, 0, .20),
    0 calc(24 * var(--pt)) calc(60 * var(--pt)) rgba(0, 0, 0, .16);
}

/* Floating panels: the second bar and the Muted badge (regular material). */
.mt-panel {
  border-radius: calc(10 * var(--pt));
  background: color-mix(in srgb, var(--mac-material), var(--mac-window) 35%);
  -webkit-backdrop-filter: blur(calc(30 * var(--pt))) saturate(1.8);
  backdrop-filter: blur(calc(30 * var(--pt))) saturate(1.8);
  box-shadow:
    inset 0 0 0 calc(1 * var(--pt)) var(--mac-separator),
    0 0 0 calc(.5 * var(--pt)) rgba(0, 0, 0, .20),
    0 calc(6 * var(--pt)) calc(18 * var(--pt)) rgba(0, 0, 0, .24);
}

/* A crop of the menu bar, as a card (mantel-sections). */
.mt-strip {
  overflow: hidden;
  border-radius: calc(10 * var(--pt));
  box-shadow:
    var(--mt-rim),
    0 0 0 calc(.5 * var(--pt)) rgba(0, 0, 0, .16),
    0 calc(4 * var(--pt)) calc(14 * var(--pt)) rgba(0, 0, 0, .14);
}

.mt-pointer { filter: drop-shadow(0 calc(1 * var(--pt)) calc(1.5 * var(--pt)) rgba(0, 0, 0, .4)); }

/* Glyphs and interface words follow the macOS label colour. */
.mt-glyphs { color: var(--mac-label); fill: currentColor; font-size: 13px; }
.mt-clock { font-variant-numeric: tabular-nums; }
.mt-dot-open { fill: none; stroke: currentColor; stroke-width: 1.25; }
.mt-notch { fill: #000; }
.mt-hover { fill: var(--mac-label); fill-opacity: .12; }
.mt-labels { fill: var(--mac-label); font-size: 13px; font-weight: 600; }

.mt-lights circle { stroke: rgba(0, 0, 0, .12); stroke-width: .5; }
.mt-lights .r { fill: #FF5F57; }
.mt-lights .y { fill: #FEBC2E; }
.mt-lights .g { fill: #28C840; }
.mt-title { font-size: 13px; font-weight: 600; fill: var(--mac-label); }
.mt-tool { color: var(--mac-label-2); }

