/* Motion and finishing touches carried over from the SaaSpocalypse design system
   (section 7 and section 12). Entrances run once, things answer the pointer, bars and
   numbers arrive, and nothing loops. All of it is switched off for reduced motion.
   Content is fully visible without JavaScript: the hidden start states only apply once
   motion.js has added the "js" class to the page. */
:root { --sp-ease-inout: cubic-bezier(.65, 0, .35, 1); }
::selection { background: var(--accent); color: var(--accent-ink); }
html { scroll-padding-top: 84px; }
/* Smooth jumps only where there is a mouse or trackpad; on touch screens it fights the finger. */
@media (hover: hover) and (pointer: fine) { html { scroll-behavior: smooth; } }

/* Headline arrives once (holding-site hero-in). */
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero h1, .med-head h1 { animation: hero-in .8s var(--sp-ease-out) both; }
.hero .lede, .hero .hero-search, .med-head .lede, .med-head .provenance, .med-head .tools { animation: hero-in .8s var(--sp-ease-out) .08s both; }

/* Page entrance: rise 6px over 260ms; items in a set follow at 50ms steps, capped at four. */
.js [data-reveal] { opacity: 0; transform: translateY(6px); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity 260ms var(--sp-ease-out), transform 260ms var(--sp-ease-out); transition-delay: calc(min(var(--i, 0), 4) * 50ms); }

/* Things answer the pointer. */
.btn { transition: background-color var(--sp-dur-1) var(--sp-ease-out), border-color var(--sp-dur-1) var(--sp-ease-out), transform var(--sp-dur-1) var(--sp-ease-out); }
.btn:active { transform: scale(.975); }
.btn .arrow { display: inline-block; margin-left: 14px; font-weight: 400; font-size: 18px; line-height: 1; transition: transform var(--sp-dur-2) var(--sp-ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.lift { transition: transform var(--sp-dur-2) var(--sp-ease-out), box-shadow var(--sp-dur-2) var(--sp-ease-out), border-color var(--sp-dur-2) var(--sp-ease-out); }
.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-popover); border-color: var(--line-strong); }
.med-index a strong { transition: color var(--sp-dur-1) var(--sp-ease-out), transform var(--sp-dur-2) var(--sp-ease-out); }
.med-index a:hover strong { transform: translateX(3px); }
details > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; font-weight: 300; font-size: 18px; line-height: 1; transition: transform var(--sp-dur-2) var(--sp-ease-out); }
details[open] > summary::before { transform: rotate(45deg); }

/* The top bar lifts once the page has scrolled. */
.site-head, .bar { transition: box-shadow var(--sp-dur-2) var(--sp-ease-out); }
.scrolled .site-head { box-shadow: 0 1px 2px rgb(27 26 25 / .04), 0 8px 24px rgb(27 26 25 / .08); }

/* Bars arrive: they fill from empty in 520ms when they come into view. */
.js .track i { transform: scaleX(0); transform-origin: left center; }
.js .in .track i, .js .track.in i { transform: none; transition: transform 520ms var(--sp-ease-out); transition-delay: calc(min(var(--i, 0), 8) * 40ms); }

/* Dark product console for the hero example (holding-site product console). */
.console { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: var(--sp-space-6); position: relative; width: min(100%, 400px); }
.console .phone { background: var(--surface-raised); border-color: var(--line); box-shadow: none; width: 100%; border-radius: 9px; }
.console-corner { position: absolute; left: 14px; bottom: 14px; width: 14px; height: 14px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.console .phone-top, .console .shot-note { color: var(--ink-muted); }

/* The one question the site asks: whether visits may be counted. */
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 30; width: min(420px, calc(100vw - 32px)); padding: var(--sp-space-4) var(--sp-space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--card-radius); box-shadow: var(--shadow-popover); font-size: 14px; line-height: 1.5; animation: hero-in .28s var(--sp-ease-out) both; }
.consent p { margin: 0 0 var(--sp-space-3); color: var(--ink); }
.consent div { display: flex; gap: var(--sp-space-2); }
.consent .btn { height: 40px; font-size: 13px; font-weight: 500; }
@media print { .consent { display: none; } }

/* Colour trial picker: only present after a colour has been chosen on the brand page. */
.accent-picker { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-popover); font-size: 12px; color: var(--ink-muted); }
.accent-picker button[data-set-accent] { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface-raised); outline: 1px solid var(--line-strong); background: var(--sw); cursor: pointer; padding: 0; }
.accent-picker button[aria-pressed="true"] { outline: 2px solid var(--ink); }
.accent-close { border: 0; background: none; color: var(--ink); font: 500 12px/1 var(--font-sans); cursor: pointer; padding: 6px 8px; }
@media print { .accent-picker { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .track i { opacity: 1 !important; transform: none !important; }
}
