/* =============================================================================
   whittled.dev · home.css
   The home page only, linked after site.css and built from its tokens: the
   hero, the two apps with their product visuals and the open source panel.
   Product visuals follow ui-spec.md; every size inside them is in
   macOS points through --pt (site.css section 11).
   ============================================================================= */


/* Hero: type only. The two apps start right under it, so their pictures show
   in the first screen. */

.home-hero { padding-block-start: clamp(3rem, 1.2rem + 7.7vw, 7.5rem); }
.home-hero__title { max-width: 13em; }
@media (min-width: 960px) {
  .home-hero__title { max-width: none; }
  .home-hero__title .l { display: block; }
}
.home-hero__lead { margin-top: var(--s-5); max-width: 32em; }
.home-hero__actions { margin-top: var(--s-6); }


/* The apps ------------------------------------------------------------------ */

.home-apps { padding-block-start: clamp(3.5rem, 2rem + 6.2vw, 6.5rem); }

.home-apps__list {
  display: grid;
  gap: var(--s-8) var(--grid-gap);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .home-apps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.app-entry { position: relative; display: flex; flex-direction: column; min-width: 0; }

.app-entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) 14px;
  margin-top: var(--s-5);
}
.app-entry__head .app-icon { --icon: 56px; margin-block: -6px; }
.app-entry__name {
  font-size: var(--fs-title);
  line-height: 1.1;
  letter-spacing: var(--tr-h2);
}
.app-entry__head .pill { margin-inline-start: 2px; }

/* The name's link covers the whole entry, picture included. */
.app-entry__name a { color: inherit; text-decoration: none; }
.app-entry__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.app-entry:hover .app-entry__name a { text-decoration: underline; text-decoration-color: var(--line-strong); }
.app-entry__foot .link { position: relative; z-index: 2; }

.app-entry__shot { transition: box-shadow 200ms var(--ease); }
.app-entry:hover .app-entry__shot { box-shadow: 0 18px 40px -24px rgba(20, 22, 28, .45); }
html[data-theme="dark"] .app-entry:hover .app-entry__shot { box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8); }

.app-entry__text {
  margin-top: var(--s-4);
  max-width: 31em;
  font-size: var(--fs-item);
  line-height: 1.5;
  color: var(--text-2);
}
.app-entry__line { color: var(--text); font-weight: 500; }

/* Facts and links sit at the bottom, so the two entries line up. */
.app-entry__foot { margin-top: auto; padding-top: var(--s-5); }
.app-entry__foot .links { margin-top: var(--s-3); }

.home-apps__more {
  margin-top: clamp(3rem, 2.4rem + 2.6vw, 4.5rem);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--text-2);
}


/* Guides ---------------------------------------------------------------------
   The open source panel's head and hairline items, on the page background:
   three topics, each a short list of links. */

.home-guides__intro > .links { margin-top: var(--s-4); }
.home-guides__grid {
  display: grid;
  gap: var(--s-7) var(--grid-gap);
  margin-top: clamp(2.5rem, 1.6rem + 3.8vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1024px) { .home-guides__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.home-guides__topic { min-width: 0; padding-top: var(--s-5); border-top: 1px solid var(--line); }
/* Each link is a 44 px tap target; the text sits where a 12 px gap would put it. */
.home-guides__list { margin-top: var(--s-1); }
.home-guides__list .link { display: inline-block; padding-block: 10px; line-height: 1.45; }


/* Open source ---------------------------------------------------------------- */

.home-os__head,
.home-guides__head { display: grid; gap: var(--s-4) var(--grid-gap); }
@media (min-width: 960px) {
  .home-os__head,
  .home-guides__head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; }
}
.home-os__head .t-lead,
.home-guides__head .t-lead { max-width: 30em; }

.home-os__grid {
  display: grid;
  gap: var(--s-7) var(--grid-gap);
  margin-top: clamp(2.5rem, 1.6rem + 3.8vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 600px) { .home-os__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .home-os__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.home-os__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.home-os__title,
.home-guides__title {
  font-size: var(--fs-item);
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: var(--fw-strong);
}
.home-os__item > p { margin-top: var(--s-2); color: var(--text-2); max-width: 36ch; }
.home-os__item > .links { margin-top: auto; padding-top: var(--s-4); }
.home-os__item > p.links { max-width: none; }
.home-os code { color: var(--text); white-space: nowrap; }
.nowrap { white-space: nowrap; }


/* Product visuals ----------------------------------------------------------------
   Inside a .shot__stage, .p places an element at --x, --y (pt) with size
   --w × --h (pt). SVG inside it fills it, its viewBox in the same points. */

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

.shot .p {
  position: absolute;
  left: calc(var(--x, 0) * var(--pt));
  top: calc(var(--y, 0) * var(--pt));
  width: calc(var(--w, 0) * var(--pt));
  height: calc(var(--h, 0) * var(--pt));
}
.shot .p > svg { display: block; width: 100%; height: 100%; overflow: visible; }

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

/* Shared paint classes for the drawings. They follow the macOS appearance,
   which follows the site's theme. */
.shot .f-content { fill: var(--mac-content); }
.shot .f-win { fill: var(--mac-window); }
.shot .f-wood { fill: var(--wood); }
.shot .f-wall { fill: var(--wall); }
.shot .s-wall { stroke: var(--wall); }
.shot .f-label { fill: var(--mac-label); }
.shot .f-label2 { fill: var(--mac-label-2); }
.shot .s-label2 { stroke: var(--mac-label-2); }
.shot .s-label3 { stroke: var(--mac-label-3); }
.shot .s-sep { stroke: var(--mac-separator); }
.shot .s-accent { stroke: var(--mac-accent); }
.shot .f-tag { fill: var(--tag); }

/* ClearShot: All-In-One over the Tide wallpaper (ui-spec.md §3.1, §3.2). */
.cs { background: var(--wall-tide); }
.cs-window {
  overflow: hidden;
  border-radius: calc(10 * var(--pt));
  background: var(--mac-content);
  box-shadow: var(--shadow-window);
}
.cs-window .t-win { font-size: 13px; font-weight: 600; }
.cs-window .t-room { font-size: 11px; font-weight: 600; }
.cs-window .t-room-s { font-size: 9.5px; font-weight: 600; }
.cs-window .t-plan { font-size: 9px; font-variant-numeric: tabular-nums; }
.cs-window .t-tb { font-size: 7px; font-weight: 600; }
.cs-window .t-tb2 { font-size: 6.5px; }

/* The overlay: one transparent box whose outer shadow dims the rest. */
.cs-sel { box-shadow: 0 0 0 calc(1200 * var(--pt)) var(--dim); }
.cs .handle circle { fill: #FFFFFF; stroke: var(--mac-accent); }

.cs-bar {
  border-radius: calc(22 * var(--pt));
  background: var(--hud-material);
  -webkit-backdrop-filter: blur(calc(24 * var(--pt))) saturate(1.6);
  backdrop-filter: blur(calc(24 * var(--pt))) saturate(1.6);
  box-shadow: var(--shadow-panel), inset 0 0 0 calc(.5 * var(--pt)) rgba(255, 255, 255, .16);
  color: #FFFFFF;
}
.cs-bar .hov { fill: var(--hud-hover); }
.cs-bar .rule { fill: rgba(255, 255, 255, .10); }
.cs-bar .fld { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .15); stroke-width: .5; }
.cs-bar text { fill: #FFFFFF; font-size: 13px; font-variant-numeric: tabular-nums; text-anchor: middle; }
.cs-bar text.x { fill: rgba(255, 255, 255, .55); }
.cs .t-tip { fill: #FFFFFF; font-size: 10px; font-weight: 500; }

/* Mantel: the top-right corner of a desktop on the Hearth wallpaper (ui-spec.md
   §2.5, §5.1, §6.1). A soft light at the top left gives the wallpaper the
   same depth as Tide. */
.mt {
  background: radial-gradient(55% 75% at 20% 8%, rgba(255, 255, 255, .34), transparent), var(--wall-hearth);
}
html[data-theme="dark"] .mt {
  background: radial-gradient(55% 75% at 20% 8%, rgba(255, 176, 110, .14), transparent), var(--wall-hearth);
}
.mt-bar { background: var(--mac-menubar); color: var(--mac-label); }
.mt-bar .t-clock { fill: currentColor; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mt-window {
  overflow: hidden;
  border-radius: calc(12 * var(--pt)) calc(12 * var(--pt)) 0 0;
  background: var(--mac-content);
  box-shadow: var(--shadow-window);
}
.mt-window .t-win { font-size: 13px; font-weight: 600; }
.mt-window .t-room { font-size: 11px; font-weight: 600; }
.mt-window .t-room-s { font-size: 9.5px; font-weight: 600; }
.mt-window .t-plan { font-size: 9px; font-variant-numeric: tabular-nums; }
.shot .f-inactive { fill: var(--mac-inactive-light); }
.mt-window .t-th { font-size: 11px; font-weight: 600; }
.mt-window .t-td { font-size: 12px; font-variant-numeric: tabular-nums; }
