/* Tack pages: brand colour plus the CSS mocks of the app and its widgets. Loaded after site.css. */
body.app-tack {
  --accent: #5b59f2;
  --accent-ink: #ffffff;
  --accent-soft: #ecebfe;
}
@media (prefers-color-scheme: dark) {
  body.app-tack {
    --accent: #9b9afc;
    --accent-ink: #14133a;
    --accent-soft: #24234d;
  }
}

/* Widget mocks */
.widgets { display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; justify-content: center; margin: 8px 0; }
.wdg { border-radius: 22px; padding: 14px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.3; }
.wdg.small { width: 150px; height: 150px; background: linear-gradient(135deg, #5b59f2, #8c54f5); color: #fff; display: flex; flex-direction: column; }
.wdg.small .plus { width: 50px; height: 50px; border-radius: 50%; background: #fff; color: #5b59f2; display: grid; place-items: center; font-size: 30px; font-weight: 600; }
.wdg.small b { margin-top: auto; font-size: 15px; }
.wdg.small span { opacity: .85; font-size: 11px; }
.wdg.medium { width: 320px; max-width: 100%; height: 150px; background: #fff; color: #111; }
.wdg .wh { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #f59e0b; margin-bottom: 8px; }
.wdg .wh i { width: 20px; height: 20px; border-radius: 50%; background: #f59e0b; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.wdg .wh em { margin-left: auto; color: #6b7280; font-style: normal; font-weight: 600; }
.wdg .wh u { width: 22px; height: 22px; border-radius: 50%; background: #5b59f2; color: #fff; display: grid; place-items: center; text-decoration: none; font-weight: 700; }
.wdg .t { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.wdg .t s { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid; flex: none; margin-top: 1px; text-decoration: none; }
.wdg .t small { display: block; color: #6b7280; font-size: 10px; }
.wdg .t small.late { color: #ef4444; }
.b-blue { border-color: #2f7cf6; } .b-purple { border-color: #a855f7; } .b-green { border-color: #22c55e; }
.wdg-cap { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 0; }

/* Feature grid in two columns (eight cards) */
.features.two { grid-template-columns: repeat(2, 1fr); }

/* Coming soon in two columns (four cards) */
.roadmap.two { grid-template-columns: repeat(2, 1fr); }

/* Ways to add a task */
.ways { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }

/* Typing shortcuts demo */
.typing { display: grid; gap: 14px; }
.typing .field-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 1.15rem; overflow-wrap: anywhere; }
.typing .field-mock mark { background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 0 4px; font-weight: 600; }
.typing .result { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 5px 12px; font-size: .9rem; font-weight: 600; color: #fff; }
.chip.proj { background: #f59e0b; } .chip.due { background: #ef4444; } .chip.flag { background: #f97316; }
.shortcut-table td:first-child { white-space: nowrap; }

@media (max-width: 820px) {
  .ways, .features.two, .roadmap.two { grid-template-columns: 1fr; }
}

/* Screenshot showcase in the hero (markup written by bin/tack-screens.py, motion by showcase.js).
   Without JavaScript the first screenshot shows. */
.showcase { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.device-float { perspective: 1400px; animation: tk-float 7s ease-in-out infinite; }
.device {
  --rx: 0deg; --ry: 0deg;
  position: relative; width: 300px; max-width: 72vw; padding: 11px; border-radius: 50px;
  background: linear-gradient(150deg, #34343c, #0c0c10 38%, #1b1b21);
  box-shadow: inset 0 0 0 1.5px #44444e, 0 40px 80px -24px rgba(45, 40, 140, .45), 0 18px 36px -18px rgba(0, 0, 0, .45);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .3s ease-out;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.slides {
  list-style: none; margin: 0; padding: 0; position: relative; aspect-ratio: 1179 / 2556;
  border-radius: 39px; overflow: hidden; background: #000; transform: translateZ(0);
}
.slide {
  position: absolute; inset: 0; opacity: 0; transform: translateY(6%) scale(.96);
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.slide.is-active { opacity: 1; transform: none; z-index: 1; }
.slide.is-leaving { opacity: 0; transform: translateY(-3%) scale(1.04); }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.island { position: absolute; z-index: 2; top: 2.7%; left: 50%; width: 26.5%; aspect-ratio: 126 / 37; transform: translateX(-50%); background: #000; border-radius: 999px; }
.showcase-caption { min-height: 1.5em; text-align: center; font-weight: 650; font-size: 1.05rem; }
.showcase-caption.swap { animation: tk-caption .5s ease both; }
.showcase-dots { display: none; gap: 2px; }
.showcase.ready .showcase-dots { display: flex; }
.showcase-dots .dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.showcase-dots .dot::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--muted); opacity: .4; transition: width .3s ease, opacity .3s ease, background-color .3s ease; }
.showcase-dots .dot[aria-current="true"]::after { width: 22px; opacity: 1; background: var(--accent); }
.showcase-dots .dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-radius: 8px; }
@keyframes tk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tk-caption { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-color-scheme: dark) {
  .device { box-shadow: inset 0 0 0 1.5px #55555f, 0 40px 90px -30px rgba(155, 154, 252, .35), 0 18px 36px -18px rgba(0, 0, 0, .6); }
}
@media (prefers-reduced-motion: reduce) {
  .device-float, .showcase-caption.swap { animation: none; }
  .device { transition: none; transform: none; }
  .slide, .slide.is-leaving { transform: none; transition: opacity .25s ease; }
}
@media (max-width: 820px) { .device { width: 260px; } }

/* "A closer look": every screenshot side by side, swipeable */
.gallery-strip {
  list-style: none; margin: 18px 0 0; padding: 4px 2px 18px; display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.gallery-strip li { flex: 0 0 210px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; }
.gallery-strip img { display: block; width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.gallery-strip span { text-align: center; color: var(--muted); font-size: .92rem; font-weight: 600; }
@media (max-width: 820px) { .gallery-strip li { flex-basis: 62%; } }
