/* ── The dashboard under the hero (templates/showcase.html): the regular home page's own stage, from shared/home.css.
   Only what this page lacks is here: the tilt switch (the site keys it off .ui-js) and the browser bar's icons. ── */
.shot { position: relative; }
.shot .hm-stage { margin-top: clamp(2.25rem, 4.5vw, 3.75rem); }
/* It sits in the hero, between the buttons and the partners. The space the hero left above the partners belongs to
   the picture now; the partners follow its note. */
.preview-hero { --hero-partners-gap: 3rem; }
@media (min-width: 1024px) {
  .preview-hero { --hero-partners-gap: clamp(7rem, 15vh, 13rem); }
}
.preview-hero .shot + .hero-partners { margin-top: clamp(3rem, 5vw, 4.5rem); }
/* The grid and wash keep the height the hero had without the picture (templates/showcase.html measures it). */
.preview-hero:has(.shot)::before,
.preview-hero:has(.shot) .hero-grid {
  inset: 0 0 auto;
  height: calc(var(--hero-copy-end, 34rem) + var(--hero-partners-gap) + var(--hero-partners-height, 4.5rem) + 1.5rem);
}
.shot .hm-stage[data-tilting] .hm-stage__tilt {
  transform: rotateX(calc((1 - var(--hm-flat, 0)) * 16deg)) scale(calc(.94 + var(--hm-flat, 0) * .06));
  will-change: transform;
}
.shot :is(.hm-safari__nav, .hm-safari__tools, .hm-safari__url) svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.shot :is(.hm-safari__nav, .hm-safari__tools) svg { width: 1rem; height: 1rem; }
.shot .hm-safari__url svg { width: .8rem; height: .8rem; color: var(--ui-faint); }
.shot .hm-stage__note { font-family: Inter, system-ui, sans-serif; }
@media (max-width: 760px) {
  .shot .hm-stage[data-tilting] .hm-stage__tilt { transform: none; }
}

/* ── Every feature (templates/features.html): one card. All the names on the left, the picked one on the right. ── */
.feat {
  --feat-pad: clamp(1.25rem, 2.1vw, 1.85rem);
  --feat-ease: cubic-bezier(.22, .8, .24, 1);
  --store-gutter: max(clamp(1.25rem, 4vw, 4rem), calc((100% - 76rem) / 2));   /* the same column as the card above it */
  box-sizing: border-box;
  padding: clamp(4.5rem, 7.5vw, 7rem) var(--store-gutter) clamp(4.5rem, 7.5vw, 7rem);
  color: var(--ui-fg);
  font-family: Inter, system-ui, sans-serif;
  scroll-margin-top: 1rem;
}
.feat-head { display: grid; justify-items: center; gap: .8rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); text-align: center; }
.feat-head h2 { margin: 0; font-family: inherit; font-weight: 690; letter-spacing: -.055em; text-wrap: balance; }
.feat-head p { margin: 0; color: var(--ui-muted); font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.5; }
.feat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.feat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27.5rem);
  overflow: hidden;
  border: 1px solid var(--ui-border);
  border-radius: 1.25rem;
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow);
}

/* ── The names ── */
.feat-index { display: grid; align-content: start; gap: 1.5rem; min-width: 0; padding: var(--feat-pad); }
.feat-filter { display: inline-flex; justify-self: start; gap: .2rem; max-width: 100%; padding: .25rem; border: 1px solid var(--ui-border); border-radius: 100px; background: var(--ui-subtle); }
.feat-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2rem;
  padding: 0 .9rem;
  border: 1px solid transparent;
  border-radius: inherit;
  background: none;
  color: var(--ui-muted);
  font: 560 .85rem/1 Inter, system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.feat-filter button span { color: var(--ui-faint); font-weight: 450; font-variant-numeric: tabular-nums; }
.feat-filter button:hover { color: var(--ui-fg); }
.feat-filter button[aria-pressed="true"] { border-color: var(--ui-border); background: var(--ui-panel); color: var(--ui-fg); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.feat-filter button:focus-visible, .feat-item:focus-visible, .feat-group__title button:focus-visible, .feat-view__close:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: 2px; }

/* Six groups in three columns; the group names line up across each row. */
.feat-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem clamp(1.25rem, 2.2vw, 2rem); }
.feat-group { min-width: 0; }
.feat-group__title { margin: 0 0 .3rem; font: inherit; letter-spacing: inherit; }
.feat-group__title button {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ui-muted);
  font: 500 .8125rem/1.5 Inter, system-ui, sans-serif;
  text-align: start;
  pointer-events: none;
}
.feat-group__title small { display: none; }
.feat-group__fold { display: grid; grid-template-rows: 1fr; }
.feat-group__items { display: grid; min-height: 0; margin: 0; padding: 0; list-style: none; }
.feat-item {
  display: block;
  box-sizing: border-box;
  width: calc(100% + 1.2rem);
  margin-inline: -.6rem;
  padding: .28rem .6rem;
  overflow: hidden;
  border: 0;
  border-radius: .5rem;
  background: none;
  color: var(--ui-fg-2);
  font: 500 .9rem/1.4 Inter, system-ui, sans-serif;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, opacity .25s ease;
}
.feat-item:hover { background: var(--ui-hover); color: var(--ui-fg); }
.feat-item[aria-current="true"] { background: color-mix(in srgb, var(--ui-primary) 13%, transparent); color: var(--ui-fg); }
.feat-item[data-dim] { opacity: .32; }

/* ── The picked one ── */
.feat-pane { display: grid; min-width: 0; border-inline-start: 1px solid var(--ui-border); }
.feat-view { position: relative; display: flex; flex-direction: column; min-width: 0; }
.feat-view__stage.hm-plan__stage { flex: 1 1 auto; height: auto; min-height: 14rem; padding: 0; border: 0; border-bottom: 1px solid var(--ui-border); }
/* The site's own way of showing a screen: a window that starts inside the stage and runs off its right and bottom
   edges, so the screen is big enough to read. */
.feat-view__win.hm-plan__win {
  position: absolute;
  inset: clamp(1.25rem, 2vw, 1.75rem) auto 0 clamp(1.25rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  width: 125%;
  margin: 0;
  border-radius: .65rem 0 0;
}
.feat-view__win .hm-plan__bar { flex: none; }
.feat-view__win picture { display: block; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--ui-bg); }
.feat-view__win img { display: block; width: 100%; height: auto; }
.feat-view__body { display: grid; gap: .55rem; padding: 1.3rem var(--feat-pad) 1.5rem; }
.feat-view__body h3 { margin: 0; font-size: 1.375rem; font-weight: 650; line-height: 1.15; letter-spacing: -.045em; }
.feat-view__body p { min-height: calc(3 * 1.55em); margin: 0; color: var(--ui-muted); font-size: .95rem; line-height: 1.55; }
.feat-view__plans {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.1rem;
  margin: .45rem 0 0;
  padding: .95rem 0 0;
  border-top: 1px solid var(--ui-border);
  list-style: none;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
}
.feat-view__plans li { display: inline-flex; align-items: center; gap: .35rem; color: var(--ui-fg-2); transition: color .2s ease; }
.feat-view__plans li[hidden] { display: none; }
.feat-view__plans svg { flex: none; width: .95rem; height: .95rem; fill: none; stroke: var(--ui-primary); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feat-view__plans .no, .feat-view__plans li[data-off] .yes { display: none; }
.feat-view__plans li[data-off] { color: var(--ui-faint); }
.feat-view__plans li[data-off] .no { display: block; stroke: currentColor; }
/* Its own line under the three: "Selected stores", "Opt-in", "Account beta". */
.feat-view__plans .feat-view__note { flex-basis: 100%; color: var(--ui-muted); font-weight: 450; }
.feat-view__close { display: none; }

/* On a phone the picked one opens as a sheet from the bottom. */
.feat-sheet {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: 88svh;
  margin: auto 0 0;
  padding: 0;
  overflow: auto;
  border: 0;
  border-top: 1px solid var(--ui-border);
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--ui-panel);
  color: var(--ui-fg);
  font-family: Inter, system-ui, sans-serif;
}
.feat-sheet::backdrop { background: rgb(5 8 19 / .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.feat-sheet .feat-view__stage.hm-plan__stage { flex: none; height: clamp(12rem, 52vw, 17rem); min-height: 0; }
.feat-sheet .feat-view__body { padding: 1.2rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.feat-sheet .feat-view__body p { min-height: 0; }
.feat-sheet .feat-view__close {
  position: absolute;
  top: .65rem;
  right: .65rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 50%;
  background: rgb(10 10 13 / .7);
  color: #fff;
  cursor: pointer;
}
.feat-view__close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .feat-sheet[open] { animation: feat-sheet-in .38s var(--feat-ease, cubic-bezier(.22, .8, .24, 1)); }
  .feat-sheet[open]::backdrop { animation: feat-fade-in .3s ease; }
}
@keyframes feat-sheet-in { from { transform: translateY(100%); } }
@keyframes feat-fade-in { from { opacity: 0; } }

/* Two columns of names, a narrower view. */
@media (max-width: 1140px) {
  .feat-card { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); }
  .feat-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* A phone: the groups fold, the filter spans the card, and a tap opens the sheet. */
@media (max-width: 760px) {
  .feat-card { grid-template-columns: minmax(0, 1fr); }
  .feat-pane { display: none; }
  .feat-index { gap: 1rem; padding: 1rem 1.1rem .35rem; }
  .feat-filter { display: flex; justify-self: stretch; }
  .feat-filter button { flex: 1 1 0; min-height: 2.5rem; padding: 0 .3rem; font-size: .8rem; gap: .3rem; }
  .feat-groups { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .feat-group { border-top: 1px solid var(--ui-border); }
  .feat-group__title { margin: 0; }
  .feat-group__title button { justify-content: space-between; min-height: 3.25rem; color: var(--ui-fg); font-size: 1rem; font-weight: 600; letter-spacing: -.02em; cursor: pointer; pointer-events: auto; }
  .feat-group__title small { display: inline-flex; align-items: center; gap: .65rem; color: var(--ui-muted); font-size: .85rem; font-weight: 450; font-variant-numeric: tabular-nums; }
  .feat-group__title small::after { content: "+"; width: .7rem; font-size: 1.1rem; line-height: 1; text-align: center; }
  .feat-group[data-open] .feat-group__title small::after { content: "−"; }
  .feat[data-ready] .feat-group__fold { grid-template-rows: 0fr; transition: grid-template-rows .4s var(--feat-ease); }
  .feat[data-ready] .feat-group__items { overflow: hidden; visibility: hidden; transition: visibility 0s linear .4s; }
  .feat[data-ready] .feat-group[data-open] .feat-group__fold { grid-template-rows: 1fr; }
  .feat[data-ready] .feat-group[data-open] .feat-group__items { visibility: visible; transition: visibility 0s; }
  .feat-group__items { padding-bottom: 0; }
  .feat-group[data-open] .feat-group__items li:last-child { margin-bottom: .6rem; }
  /* Plain rows on a phone: nothing is picked until a tap opens the sheet, so no highlight to clip at the card's edge. */
  .feat-item { width: 100%; margin-inline: 0; padding: .6rem 0; font-size: .95rem; white-space: normal; }
  .feat-item:hover, .feat-item[aria-current="true"] { background: none; }
}
@media (prefers-reduced-motion: reduce) {
  .feat-item, .feat-filter button, .feat-group__fold, .feat-view__plans li { transition: none; }
}
