/* ============================================================
   FONT: Inter (self-hosted variable font, SIL OFL)
   One woff2 per subset covers the whole 100-900 weight range.
   ============================================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   DESIGN TOKENS
   Change --primary and everything downstream follows.
   --secondary is DERIVED from the primary via relative color
   syntax: same hue, less saturation, a touch lighter -> "less vivid".
   ============================================================ */
:root {
  --primary:        #5423E7;                                   /* vivid indigo */
  --secondary:      hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); /* derived, less vivid */
  --bg:             #ffffff;                                    /* page background */
  --fg:             #f7f7f7;                                    /* raised surface: cards, soft sections */
  --ink:            #121217;                                    /* near-black text */
  --ink-soft:       #4a4a55;                                    /* muted body text */
  --line:           #ececf1;                                    /* hairline borders */
  --nav-h:          80px;                                        /* sticky top-nav height */

  /* Playful pastel palette lifted from the reference sections */
  --pastel-cream:   #FEF9EB;
  --pastel-mint:    #DFF8EA;
  --pastel-lilac:   #E1DAFB;
  --pastel-rose:    #FDD8E0;
  --pastel-sky:     #DBF3FE;
  --pastel-butter:  #FEF3D7;

  /* Vivid accents */
  --acc-cyan:   #00ACFF;
  --acc-magenta:#CF75FF;
  --acc-coral:  #F53D6B;
  --acc-amber:  #FFC233;
  --acc-green:  #1E874C;

  --radius:   22px;
  --radius-lg:32px;

  --bs-body-font-family: 'Inter', system-ui, sans-serif;
  --bs-body-color: var(--ink);
}
/* Static fallback for browsers without relative-color syntax */
@supports not (color: hsl(from white h s l)) {
  :root { --secondary: #7b5fe0; }
}

body { font-family: var(--bs-body-font-family); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }

/* ---- Global adjustments to Bootstrap ---- */
html { scroll-behavior: smooth; }
a { color: inherit; } /* links inherit the text color, colored links are opt-in via classes */
img { vertical-align: middle; }
code { font-size: 1em; }

/* ---- Typography scale (big, tight, rounded feel) ---- */
.display-hero   { font-size: clamp(2.6rem, 6vw, 5rem);  font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.display-big    { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 500; line-height: 1.5; letter-spacing: normal; text-align: justify; }
.display-title  { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.lead-xl        { font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.5; color: var(--ink-soft); }

/* emericio.css forces h1/h2 size and font with !important, on pages that load both stylesheets.
   Let the new type scale win whenever a display class sits on a heading. */
:is(h1, h2, h3).display-hero  { font-size: clamp(2.6rem, 6vw, 5rem) !important; font-weight: 800 !important; font-family: inherit; }
:is(h1, h2, h3).display-big   { font-size: clamp(1.8rem, 3vw, 2.3rem) !important; font-weight: 500 !important; font-family: inherit; }
:is(h1, h2, h3).display-title { font-size: clamp(2rem, 4vw, 3.25rem) !important; font-weight: 700 !important; font-family: inherit; }

/* ---- Eyebrow: tiny uppercase colored heading ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow.on-primary { color: rgba(255,255,255,.75); }
.eyebrow .num {
  font-variant-numeric: tabular-nums;
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; letter-spacing: .02em;
}

.section { padding: clamp(5rem, 10vw, 10rem) 0; }
.container, .container-xl { max-width: 1440px; }

/* ---- Section stacking ----
   Vertical spacing is INTERNAL padding (never external margin), so sections
   always abut. To make two colored sections stick together for a continuous,
   edge-to-edge flow, remove the padding on either side of the seam. ---- */
.stick-top    { padding-top: 0 !important; }     /* stick my top to the section above */
.stick-bottom { padding-bottom: 0 !important; }  /* let the next section stick to my end */
.rounded-xl  { border-radius: var(--radius); }
.rounded-2xl { border-radius: var(--radius-lg); }

/* ---- Colored section backgrounds ---- */
.bg-primary-brand   { background: var(--primary); color: #fff; }
.bg-secondary-brand { background: var(--secondary); color: #fff; }
.bg-soft            { background: var(--fg); }
.bg-deep-brand      { background-color: hsl(from var(--primary) h calc(s * 0.55) 12%); color: #fff; } /* near-black, tinted by the primary */
@supports not (color: hsl(from white h s l)) {
  .bg-deep-brand { background-color: #10231f; }
}

/* ============================================================
   SECTION COLOR THEMING
   Add .color-primary-<name> to any section (or any element): every
   descendant that uses var(--primary) / var(--secondary) re-themes.
   Each primary class also re-derives a matching secondary, so setting
   the primary alone still looks harmonious. Add .color-secondary-<name>
   to override the secondary explicitly — those rules are declared last,
   so they win when combined with a primary class.
   ============================================================ */
.color-primary-purple { --primary:#5423E7; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-orange { --primary:#FF7A1A; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-yellow { --primary:#F5A800; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-green  { --primary:#1E874C; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-blue   { --primary:#0A66FF; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-cyan   { --primary:#00ACFF; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-pink   { --primary:#F53D6B; --secondary: hsl(from var(--primary) h calc(s * 0.62) calc(l + 12)); }
.color-primary-teal   { --primary:#078F72; --secondary:#4A7A8C; } /* WatchFlower: emerald + lotus slate */

.color-secondary-purple { --secondary:#7B5FE0; }
.color-secondary-orange { --secondary:#FFB27A; }
.color-secondary-yellow { --secondary:#FFD24D; }
.color-secondary-green  { --secondary:#79C79B; }
.color-secondary-blue   { --secondary:#7FB0FF; }
.color-secondary-cyan   { --secondary:#7FD6FF; }
.color-secondary-pink   { --secondary:#F98BA6; }

/* ============================================================
   COMPONENT: pill button (rounded, springy hover)
   ============================================================ */
.btn-pill { border-radius: 999px; font-weight: 600; padding: .7rem 1.4rem; transition: transform .12s ease, box-shadow .12s ease; }
.btn-pill:hover { transform: translateY(-2px); }
.btn-brand   { background: var(--primary); color: #fff; }
.btn-brand:hover { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -8px var(--primary); }
.btn-brand-light { background: #fff; color: var(--ink); }
.btn-brand-light:hover { background: #fff; color: var(--ink); box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }

/* ============================================================
   COMPONENT: clickable numbered feature list
   (mirrors the 01 / 02 / 03 accordion-style list on the ref)
   ============================================================ */
.feature-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feature-list__item { border-bottom: 1px solid var(--line); }
.feature-list__btn {
  width: 100%; text-align: left; background: none; border: 0;
  display: grid; grid-template-columns: 3rem 1fr auto; align-items: center; gap: 1rem;
  padding: 1.4rem .5rem; cursor: pointer; transition: padding-left .2s ease, color .2s ease;
}
.feature-list__btn:hover { padding-left: 1.1rem; }
.feature-list__num { color: var(--secondary); font-weight: 600; font-variant-numeric: tabular-nums; }
.feature-list__title { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: 0em; }
.feature-list__chev { color: var(--ink-soft); transition: transform .2s ease; }
.feature-list__item.is-open .feature-list__btn { color: var(--primary); }
.feature-list__item.is-open .feature-list__chev { transform: rotate(45deg); color: var(--primary); }
.feature-list__panel { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.feature-list__panel > div { padding: 0 .5rem 1.4rem calc(3rem + 1rem); color: var(--ink-soft); max-width: 60ch; }

/* ============================================================
   COMPONENT: hoverable + clickable squares (foreground grid)
   ============================================================ */
.square-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.square-card {
  position: relative; aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.4rem; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.square-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(18,18,23,.35); border-color: transparent; color: var(--ink); }
.square-card__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--fg); color: var(--primary); font-size: 1.25rem;
}
.square-card__arrow { align-self: flex-end; opacity: 0; transform: translate(-4px, 4px); transition: all .16s ease; color: var(--primary); }
.square-card:hover .square-card__arrow { opacity: 1; transform: translate(0,0); }
.square-card__title { font-weight: 500; font-size: 1.2rem; letter-spacing: 0em; }

/* ============================================================
   COMPONENT: left/right colored split
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 340px; overflow: hidden; }
.split > div { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4rem); }
.split__left  { background: var(--primary); color: #fff; }
.split__right { background: var(--secondary); color: #fff; }
@media (max-width: 767px) { .split { grid-template-columns: 1fr; } }

/* Full-bleed split band: no section padding (so it sticks to its neighbours);
   the coloured halves carry all the internal padding. Add .full-height for a
   viewport-tall band. */
.split-band { padding: 0; }
.full-height .split { min-height: 100vh; }

/* Full-height section: viewport-tall, with its content vertically centered.
   Vertical padding is dropped so flex centering positions the content evenly. */
.section.full-height { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 0; }

/* ============================================================
   COMPONENT: 6 checkered squares
   Alternating primary / secondary tint tiles, chessboard style.
   ============================================================ */
.checker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.checker__cell { aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: .5rem; padding: clamp(1rem, 3vw, 2rem); color: var(--ink); }
/* checkerboard: cells 1,3,5 (0-indexed 0,2,4) foreground; 2,4,6 background. */
.checker__cell:nth-child(odd)  { background: var(--fg); }
.checker__cell:nth-child(even) { background: var(--bg); }
.checker__cell .k { font-size: 2rem; font-weight: 800; letter-spacing: 0em; color: var(--primary); }
@media (max-width: 575px) { .checker { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   COMPONENT: 6-square feature grid (E/1-E/6 style)
   Squares sit flush with the section background; on hover a soft,
   lightly rounded foreground tile is revealed.
   ============================================================ */
.sqgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.sqgrid__cell {
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: flex-start;
  padding: clamp(1.25rem, 2.5vw, 2.25rem); color: var(--ink);
  background: transparent; border-radius: 12px; transition: background .16s ease;
}
.sqgrid__cell:hover { background: var(--fg); }
.sqgrid__title { font-size: clamp(1.2rem, 1.8vw, 1.6rem); font-weight: 700; letter-spacing: 0em; margin: .5rem 0 .6rem; line-height: 1.15; }
.sqgrid__cell p { color: var(--ink-soft); margin: 0; max-width: 32ch; }
@media (max-width: 991px) { .sqgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .sqgrid { grid-template-columns: 1fr; } .sqgrid__cell { aspect-ratio: auto; min-height: 220px; } }

/* ---- pastel feature card (soft-bg variant) ---- */
.pastel-card { border-radius: var(--radius); padding: 1.6rem; height: 100%; border: 1px solid rgba(0,0,0,.04); }

.toc a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--primary); }

/* ---- Top nav: purple bar that auto-hides on scroll-down (JS toggles .nav-hidden) ---- */
.tpl-nav { --bs-navbar-padding-y: 0; background: var(--primary); transition: transform .3s ease; min-height: var(--nav-h); }
.tpl-nav + header { margin-top: calc(-1 * var(--nav-h)); padding-top: calc(clamp(5rem, 10vw, 10rem) + var(--nav-h)); }
.tpl-nav .navbar-brand { color: #fff; font-size: 1.66em; letter-spacing: 1px; }
.tpl-nav .toc a { color: rgba(255,255,255,.82); }
.tpl-nav .toc a:hover { color: #fff; }
.tpl-nav.nav-hidden { transform: translateY(-100%); }

/* stat row */
.stat .n { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: 0em; color: var(--primary); }

/* ============================================================
   COMPONENT: hero spec badges (meant to sit on a colored hero)
   Two interchangeable treatments, both glass-on-brand:
     .hero-badge  — modernized two-tone segmented pill (label | value)
     .hero-specbar — one unified bar of label/value groups + dividers
   ============================================================ */

/* Two-tone segmented pill: dark label segment + frosted value segment */
.hero-badge {
  display: inline-flex; align-items: stretch; vertical-align: middle;
  margin: .35rem; border-radius: 999px; overflow: hidden;
  font-size: .9rem; font-weight: 600;
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.7);
  transition: transform .12s ease, box-shadow .12s ease;
}
.hero-badge:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(0,0,0,.75); }
.hero-badge > span { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.1rem; }
.hero-badge .k {
  background: rgba(0,0,0,.28); color: rgba(255,255,255,.85);
  text-transform: uppercase; letter-spacing: .07em; font-size: .72rem; font-weight: 700;
}
.hero-badge .v { background: rgba(255,255,255,.16); color: #fff; }
.hero-badge .v i { font-size: 1.1rem; opacity: .95; }

/* Unified spec bar: one frosted pill, groups split by hairline dividers */
.hero-specbar {
  display: inline-flex; align-items: stretch; vertical-align: middle;
  border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.55);
}
.hero-specbar__grp {
  display: flex; flex-direction: column; justify-content: center; gap: .15rem;
  padding: .6rem 1.5rem; text-align: center;
}
.hero-specbar__grp + .hero-specbar__grp { border-left: 1px solid rgba(255,255,255,.22); }
.hero-specbar__grp .label { text-transform: uppercase; letter-spacing: .09em; font-size: .66rem; color: rgba(255,255,255,.7); }
.hero-specbar__grp .val { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; color: #fff; font-weight: 600; font-size: .95rem; }
.hero-specbar__grp .val i { font-size: 1.15rem; }
@media (max-width: 575px) {
  .hero-specbar { flex-direction: column; border-radius: var(--radius); }
  .hero-specbar__grp + .hero-specbar__grp { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); }
}

/* ============================================================
   UTILITY: soft light glows over a colored background.
   Declared after the bg-* classes so its background-image survives their shorthand.
   ============================================================ */
.bg-glow {
  background-image:
    radial-gradient(60% 55% at 50% -10%, rgba(255,255,255,.20), transparent 70%),
    radial-gradient(45% 45% at 100% 55%, hsl(from var(--primary) h s calc(l + 14) / .55), transparent 70%),
    radial-gradient(40% 40% at 0% 85%, hsl(from var(--secondary) h s l / .45), transparent 70%);
}

/* ============================================================
   COMPONENT: app icon tile + hero product shot
   The shot overflows the bottom of its (stick-bottom) hero by --shot-overlap;
   give the next section .after-shot so its content clears the image.
   ============================================================ */
:root { --shot-overlap: clamp(5rem, 16vw, 15rem); }

.app-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 72px; height: 72px; border-radius: 20px; overflow: hidden; background: #fff;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
/* App icon + name, the name's cap height close to the icon's height */
.app-lockup {
  display: inline-flex; align-items: center; gap: clamp(.75rem, 2vw, 1.25rem);
  font-size: clamp(2.25rem, 9vw, 6rem); font-weight: 800; line-height: 1; letter-spacing: -.03em;
}
.app-lockup .app-icon { width: 80px; height: 80px; border-radius: 22px; }
.app-lockup__name { display: block; text-box: trim-both cap alphabetic; } /* centers the caps on the icon */

/* Announcement pill above a hero headline ("New: ...") */
.hero-announce {
  display: inline-flex; align-items: center; gap: .65rem; max-width: 100%;
  padding: .35rem .9rem .35rem .35rem; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  color: #fff; font-size: .92rem; font-weight: 500; text-decoration: none;
  transition: background .15s ease, transform .12s ease;
}
.hero-announce:hover { background: rgba(255,255,255,.22); color: #fff; transform: translateY(-1px); }
.hero-announce__tag {
  flex: 0 0 auto; padding: .2rem .65rem; border-radius: 999px;
  background: #fff; color: var(--primary); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.hero-announce i { font-size: .8em; opacity: .8; }

.hero-shot { position: relative; z-index: 2; max-width: 1080px; margin: clamp(3rem, 6vw, 5rem) auto calc(-1 * var(--shot-overlap)); }
.hero-shot__main { display: block; width: 100%; height: auto; }
.hero-shot__side { position: absolute; width: 21%; height: auto; filter: drop-shadow(0 24px 32px rgba(0,0,0,.28)); }
.hero-shot__side--left  { left: -6%;  bottom: 4%; }
.hero-shot__side--right { right: -6%; bottom: 18%; }
.after-shot { padding-top: calc(clamp(5rem, 10vw, 10rem) + var(--shot-overlap)) !important; }
@media (max-width: 767px) { .hero-shot__side { display: none; } }

/* ============================================================
   COMPONENT: stat strip (a compact row of big numbers, hairline dividers)
   ============================================================ */
.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.stat-strip__item { padding: 1.75rem 1rem; text-align: center; }
.stat-strip__item + .stat-strip__item { border-left: 1px solid var(--line); }
.stat-strip__n { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: var(--primary); }
.stat-strip__l { display: block; margin-top: .35rem; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 991px) {
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-strip__item:nth-child(4) { border-left: 0; }
  .stat-strip__item:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 575px) {
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip__item:nth-child(odd)  { border-left: 0; }
  .stat-strip__item:nth-child(even) { border-left: 1px solid var(--line); }
  .stat-strip__item:nth-child(n+3)  { border-top: 1px solid var(--line); }
}

/* ============================================================
   COMPONENT: bento grid
   12-column grid of rounded tiles, sized with .span-N and .row-2.
   Tiles default to the soft surface; add any bg-* class to colour one.
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.bento__tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 300px; padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
}
:where(.bento__tile) { background: var(--fg); color: var(--ink); } /* zero specificity: any bg-* class wins */
.bento__tile .eyebrow { font-size: .8rem; }
.bento__title { font-size: clamp(1.35rem, 2.1vw, 1.85rem); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; margin: .5rem 0 .6rem; }
.bento__tile p { color: var(--ink-soft); max-width: 44ch; margin-bottom: 0; }
.bento__tile:is(.bg-primary-brand, .bg-secondary-brand, .bg-deep-brand) p { color: rgba(255,255,255,.82); }
.bento__tile a:not(.btn) { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Horizontal tile: icon on the left, text on the right */
.bento__tile--row { flex-direction: row; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); min-height: 0; }
.bento__icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 72px; height: 72px;
  border-radius: 22px; background: var(--primary); color: #fff; font-size: 2rem;
}

/* Device screenshots peeking out of the bottom edge of a tile */
.bento__peek {
  display: flex; justify-content: center; gap: 1rem;
  margin-top: auto; padding-top: 2rem; margin-bottom: calc(-1 * clamp(6rem, 12vw, 10rem));
}
.bento__peek img { width: min(46%, 230px); height: auto; filter: drop-shadow(0 20px 30px rgba(18,18,23,.18)); }
.bento__peek img + img { margin-top: 3rem; }

.bento > .span-4  { grid-column: span 4; }
.bento > .span-5  { grid-column: span 5; }
.bento > .span-6  { grid-column: span 6; }
.bento > .span-7  { grid-column: span 7; }
.bento > .span-8  { grid-column: span 8; }
.bento > .span-12 { grid-column: span 12; }
.bento > .row-2   { grid-row: span 2; }
@media (max-width: 991px) {
  .bento > [class*="span-"] { grid-column: span 6; }
  .bento > :is(.span-12, .row-2) { grid-column: span 12; grid-row: auto; }
}
@media (max-width: 767px) {
  .bento > [class*="span-"] { grid-column: 1 / -1; }
  .bento__tile--row { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   TILE DECORATIONS: small illustrations at the bottom of a bento tile
   ============================================================ */

/* ---- Notification stack: one notification, a second one peeking out behind it ---- */
.notif-stack { position: relative; isolation: isolate; margin-top: auto; padding-top: 1.75rem; }
.notif {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .9rem 1rem; border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.5);
}
.notif--back { position: relative; z-index: -1; margin: -2.4rem 1.1rem 0; opacity: .55; transform: scale(.95); }
.notif__icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.notif__icon img { width: 100%; height: 100%; object-fit: cover; }
.notif__app { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.notif__title { font-size: .98rem; font-weight: 700; }
.notif__text { font-size: .86rem; color: var(--ink-soft); }

/* ---- Meter bars: vertical gauges that grow when revealed.
        Set --v (0 to 1) on each bar, and --tag to recolour it. ---- */
.meter-bars { display: flex; align-items: flex-end; gap: clamp(.9rem, 2vw, 1.5rem); margin-top: auto; padding-top: 1.75rem; }
.meter-bar { display: flex; flex-direction: column; align-items: center; gap: .55rem; font-size: .75rem; font-weight: 600; color: var(--ink-soft); }
.meter-bar__track {
  position: relative; width: 28px; height: 150px; overflow: hidden; border-radius: 8px;
  background: var(--fg); background: color-mix(in srgb, var(--tag, var(--primary)) 22%, #fff);
}
.meter-bar__fill {
  position: absolute; inset: auto 0 0; height: calc(var(--v) * 100%);
  border-radius: 8px 8px 0 0; background: var(--tag, var(--primary)); transform-origin: bottom;
}
@media (prefers-reduced-motion: no-preference) {
  .is-revealed .meter-bar__fill { animation: meter-grow 1.1s .25s cubic-bezier(.22,.61,.36,1) both; }
  .is-revealed .meter-bar:nth-child(2) .meter-bar__fill { animation-delay: .35s; }
  .is-revealed .meter-bar:nth-child(3) .meter-bar__fill { animation-delay: .45s; }
  .is-revealed .meter-bar:nth-child(4) .meter-bar__fill { animation-delay: .55s; }
}
@keyframes meter-grow { from { transform: scaleY(0); } }

/* ---- Readout: one big value and its subtitle ---- */
.readout { margin-top: auto; padding-top: 1.5rem; line-height: 1; }
.readout__value { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.04em; }
.readout__sub { margin-top: .5rem; font-size: 1.15rem; font-weight: 600; opacity: .7; }

/* ---- Big figures: a row of large numbers over small labels, in the tile's text color ---- */
.big-figures { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: auto 0 0; padding: 1.5rem 0 0; }
.big-figures li { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.big-figures li > span { opacity: .7; }
.big-figures b { font-size: clamp(2.6rem, 4.5vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }

/* ============================================================
   COMPONENT: overlapping device stack (two screenshots, one offset)
   ============================================================ */
.device-stack { position: relative; max-width: 460px; margin-inline: auto; padding-right: 24%; }
.device-stack img { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(18,18,23,.18)); }
.device-stack img + img { position: absolute; right: 0; bottom: -6%; width: 60%; }
@media (min-width: 992px) { .sticky-lg { position: sticky; top: calc(var(--nav-h) + 1.5rem); } }

/* ============================================================
   COMPONENT: tags (small tinted pills). Set --tag to recolour one.
   ============================================================ */
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tag {
  --tag: var(--primary);
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .28rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 500; line-height: 1.2; color: var(--ink);
  background: var(--fg);
  background: color-mix(in srgb, var(--tag) 13%, #fff);
}
.tag i { color: var(--tag); font-size: .9em; }
.tag--muted { --tag: #8a8a96; color: var(--ink-soft); }
.tag--lg { padding: .45rem .95rem; font-size: .9rem; font-weight: 600; }

.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.link-arrow:hover { color: var(--primary); }
.link-arrow i { font-size: .85em; transition: transform .15s ease; }
.link-arrow:hover i { transform: translateX(3px); }

/* ============================================================
   COMPONENT: filter chips
   Wrap chips [data-filter] and items [data-cat] in one [data-filter-group];
   emericio2.js hides the items that don't match the pressed chip.
   ============================================================ */
.chip-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.05rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.chip-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.chip-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.chip-btn .count { padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--fg); color: var(--ink-soft); }
.chip-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-btn[aria-pressed="true"] .count { background: rgba(255,255,255,.22); color: #fff; }
.is-filtered-out { display: none !important; }

/* ============================================================
   COMPONENT: device catalog card
   ============================================================ */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.device-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.device-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(18,18,23,.35); border-color: transparent; }
.device-card__media {
  display: grid; place-items: center; height: 168px; padding: 1.25rem;
  background: radial-gradient(circle at 50% 60%, #fff 0, var(--fg) 72%);
}
.device-card__media { position: relative; }
.device-card__media img { width: 120px; height: 120px; object-fit: contain; }
.device-card__media img.is-icon { width: 56px; height: 56px; opacity: .75; }
/* Icon tile standing in for a missing device illustration; set --tag to tint it */
.device-card__glyph {
  display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px;
  background: var(--fg); background: color-mix(in srgb, var(--tag, var(--primary)) 14%, #fff);
  color: var(--tag, var(--primary)); font-size: 2.6rem;
}
.device-card__badge { position: absolute; top: .85rem; left: .85rem; }
.tag--new { background: var(--primary); color: #fff; font-weight: 700; }
.tag--new i { color: #fff; }
.device-card__body { display: flex; flex-direction: column; gap: .75rem; flex: 1; padding: 1.25rem 1.25rem 1.35rem; }
.device-card__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.device-card__brand { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.device-card__code {
  padding: .15rem .5rem; border-radius: 6px; background: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; color: var(--ink-soft);
}
.device-card__name { font-size: 1.15rem; font-weight: 700; line-height: 1.25; margin: 0; }
.device-card__aka { margin: -.5rem 0 0; font-size: .88rem; color: var(--ink-soft); }
.device-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .25rem; }

/* Optional fold-out note inside a card */
.device-note { font-size: .85rem; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: .65rem; }
.device-note summary { display: flex; align-items: center; gap: .45rem; list-style: none; cursor: pointer; font-weight: 600; color: var(--ink); }
.device-note summary::-webkit-details-marker { display: none; }
.device-note summary::before {
  content: '+'; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem;
  border-radius: 50%; background: var(--fg); color: var(--primary); font-weight: 700; transition: transform .2s ease;
}
.device-note[open] summary::before { transform: rotate(45deg); }
.device-note p, .device-note ul { margin: .5rem 0 0; }
.device-note ul { padding-left: 1.1rem; }

/* Dashed "your sensor here" card closing a catalog */
.device-card--cta {
  align-items: center; justify-content: center; gap: .75rem; padding: 2rem 1.5rem; text-align: center;
  background: transparent; border: 2px dashed color-mix(in srgb, var(--primary) 35%, var(--line));
}
.device-card--cta:hover { background: #fff; }

/* ============================================================
   COMPONENT: horizontal snap gallery
   Full-bleed track aligned to the container gutter; [data-scroll="prev|next"]
   buttons anywhere inside the [data-scroller] root page through it.
   ============================================================ */
.scroller__track {
  --gutter: max(1rem, calc((100% - 1440px) / 2 + .75rem));
  display: flex; gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: .25rem var(--gutter) 1.25rem; scrollbar-width: none;
}
.scroller__track::-webkit-scrollbar { display: none; }
.scroller__item {
  --h: clamp(300px, 40vw, 500px);
  --p: clamp(1rem, 2.5vw, 2rem);
  position: relative; flex: 0 0 auto; scroll-snap-align: start; margin: 0;
  display: flex; align-items: center; justify-content: center;
  height: var(--h); padding: var(--p);
  border-radius: var(--radius-lg); background: var(--tile, var(--fg));
}
.scroller__item img { display: block; height: calc(var(--h) - 2 * var(--p)); width: auto; max-width: none; }
.scroller__item figcaption {
  position: absolute; left: 1rem; bottom: 1rem; padding: .35rem .8rem; border-radius: 999px;
  background: rgba(255,255,255,.9); font-size: .8rem; font-weight: 600; color: var(--ink);
}
.scroller__nav { display: flex; gap: .5rem; }
.scroller__btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.scroller__btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }

/* ============================================================
   COMPONENT: platform download card (the whole card is the link)
   ============================================================ */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.platform-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
  padding: 1.5rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.platform-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(18,18,23,.35); border-color: transparent; color: var(--ink); }
.platform-card__icon { margin-bottom: 1.25rem; font-size: 2.4rem; color: var(--ink); transition: color .15s ease; }
.platform-card:hover .platform-card__icon { color: var(--primary); }
.platform-card__name { font-size: 1.25rem; font-weight: 700; }
.platform-card__meta { font-size: .88rem; color: var(--ink-soft); }
.platform-card__cta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; padding: .5rem 1rem;
  border-radius: 999px; background: var(--fg); font-size: .9rem; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.platform-card:hover .platform-card__cta { background: var(--primary); color: #fff; }

/* ============================================================
   COMPONENT: info card (icon bubble + short text; can be a link)
   ============================================================ */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.info-card {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
a.info-card { transition: border-color .15s ease, transform .12s ease; }
a.info-card:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-2px); }
.info-card__icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--fg); background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary); font-size: 1.1rem;
}
.info-card strong { display: block; margin-bottom: .15rem; font-weight: 700; }
.info-card p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ============================================================
   VARIANT: FAQ accordion (feature list without numbers, smaller titles)
   ============================================================ */
.feature-list--faq .feature-list__btn { grid-template-columns: 1fr auto; }
.feature-list--faq .feature-list__title { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.feature-list--faq .feature-list__panel > div { padding-left: .5rem; max-width: 72ch; }
.feature-list__panel p:last-child { margin-bottom: 0; }

/* ============================================================
   COMPONENT: ghost buttons (outlined pill, for secondary actions)
   .btn-ghost on light backgrounds, .btn-ghost-light on colored ones.
   ============================================================ */
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.75); }

/* ============================================================
   COMPONENT: section head (centered eyebrow + title + intro)
   ============================================================ */
.section-head { max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* ============================================================
   COMPONENT: compact page header, for support / privacy sub-pages
   ============================================================ */
.page-head { padding-block: clamp(3rem, 6vw, 5rem); }
.tpl-nav + .page-head { margin-top: calc(-1 * var(--nav-h)); padding-top: calc(clamp(3rem, 6vw, 5rem) + var(--nav-h)); }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1rem; padding: 0; font-size: .9rem; color: rgba(255,255,255,.7); }
.crumbs li + li::before { content: '/'; margin-right: .5rem; opacity: .6; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: #fff; }

/* Full-bleed picture band. Set the picture with style="--img: url(...)" */
.banner { height: clamp(200px, 26vw, 440px); background: var(--img) center / cover no-repeat; }

/* ============================================================
   COMPONENT: icon columns (icon bubble + title + text)
   The bubble springs and fills with the primary color on hover.
   ============================================================ */
.icon-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.icon-col h3 { margin: 1.1rem 0 .4rem; font-size: 1.2rem; font-weight: 700; }
.icon-col p { margin: 0; color: var(--ink-soft); }
.icon-bubble {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px;
  background: var(--fg); background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary); font-size: 1.4rem;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .2s ease, color .2s ease;
}
:is(.icon-col, .kit-tile):hover .icon-bubble { transform: rotate(-8deg) scale(1.08); background: var(--primary); color: #fff; }

/* ---- Kit grid: compact centered tiles, the "what you'll need" checklist ---- */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.kit-tile {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  padding: 1.5rem 1rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  text-align: center; font-weight: 600; font-size: .95rem;
}
.kit-tile small { display: block; margin-top: -.5rem; font-weight: 400; color: var(--ink-soft); }

/* ---- Check list: two-column bullet list with round check marks ---- */
.check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem 2rem; list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: flex-start; gap: .75rem; font-size: 1.05rem; }
.check-list li::before {
  content: ''; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; margin-top: .05rem; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 62% no-repeat;
}

/* ============================================================
   COMPONENT: media row (picture on one side, text on the other)
   Stack several; add .media-row--reverse to swap sides.
   Set --tile on the media to tint its background.
   ============================================================ */
.media-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.media-row + .media-row { margin-top: clamp(4rem, 8vw, 7rem); }
.media-row--reverse .media-row__media { order: 2; }
.media-row__media { padding: clamp(1rem, 3vw, 2.5rem); border-radius: var(--radius-lg); background: var(--tile, var(--fg)); }
.media-row__media > img { display: block; width: 100%; height: auto; border-radius: 12px; }
.media-row__media--icon { display: grid; place-items: center; aspect-ratio: 4 / 3; }
.media-row__media--icon > img { width: min(50%, 200px); border-radius: 0; }
.media-row__text h3 { margin: .5rem 0 .75rem; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.media-row__text p { color: var(--ink-soft); }
@media (max-width: 767px) {
  .media-row { grid-template-columns: 1fr; }
  .media-row--reverse .media-row__media { order: 0; }
}

/* ============================================================
   COMPONENT: before / after comparison slider
   Two same-size pictures; the top one is clipped at --pos. The invisible
   range input drives --pos (emericio2.js), so it works with mouse, touch
   and keyboard alike.
   ============================================================ */
.compare { --pos: 50%; position: relative; overflow: hidden; border-radius: 12px; user-select: none; }
.compare > img { display: block; width: 100%; height: auto; }
.compare > .compare__top { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__range { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 1; width: 3px; margin-left: -1.5px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); pointer-events: none;
}
.compare__handle::after {
  content: '\2039\00a0\203A'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: var(--primary); font-size: 1.3rem; font-weight: 700; line-height: 1;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.45);
}
.compare__range:focus-visible + .compare__handle::after { outline: 3px solid var(--primary); outline-offset: 2px; }
.compare__label {
  position: absolute; top: .75rem; z-index: 1; padding: .25rem .65rem; border-radius: 999px;
  background: rgba(18,18,23,.65); color: #fff; font-size: .75rem; font-weight: 600; pointer-events: none;
}
.compare__label--a { left: .75rem; }
.compare__label--b { right: .75rem; }

/* ============================================================
   COMPONENT: flow (input -> output steps joined by arrows)
   ============================================================ */
.flow { display: flex; align-items: center; gap: 1rem; }
.flow__step { flex: 1 1 0; align-self: stretch; padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-lg); background: var(--fg); }
.flow__step--out { background: var(--primary); color: #fff; }
.flow__step h3 { margin: 0 0 .35rem; font-size: 1.35rem; font-weight: 700; }
.flow__step p { margin: 0; color: var(--ink-soft); }
.flow__step--out p { color: rgba(255,255,255,.85); }
.flow__icons { display: flex; gap: .75rem; margin-bottom: 1.25rem; font-size: 1.6rem; color: var(--primary); }
.flow__step--out .flow__icons { color: #fff; }
.flow__arrow {
  flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: var(--primary); font-size: 1.2rem;
}
@media (max-width: 767px) {
  .flow { flex-direction: column; }
  .flow__step { width: 100%; }
  .flow__arrow { transform: rotate(90deg); }
}

/* ============================================================
   COMPONENT: project card (picture + text; the title link covers the card)
   Secondary links inside the card stay clickable with .project-card__alt.
   ============================================================ */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.project-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(18,18,23,.4); border-color: transparent; }
.project-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--fg); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__body { display: flex; flex-direction: column; gap: .5rem; flex: 1; padding: 1.25rem 1.4rem 1.5rem; }
.project-card__title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.project-card__link { color: var(--ink); text-decoration: none; }
.project-card__link::after { content: ''; position: absolute; inset: 0; }
.project-card__body p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.project-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .5rem; }
.project-card__alt { position: relative; z-index: 1; color: var(--ink-soft); font-size: 1.25rem; }
.project-card__alt:hover { color: var(--primary); }

/* ============================================================
   COMPONENT: click-to-load video
   Shows a local poster and a play button; the YouTube (no-cookie) player
   is only loaded once clicked (emericio2.js). Set --ratio for odd formats.
   ============================================================ */
.video-frame {
  position: relative; overflow: hidden; aspect-ratio: var(--ratio, 16 / 9);
  border-radius: var(--radius-lg); background: #121217; background: hsl(from var(--primary) h calc(s * 0.55) 12%);
}
.video-frame > img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s ease; }
.video-frame:hover > img { opacity: 1; }
.video-frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 80px; height: 80px; border: 0; border-radius: 50%;
  background: #fff; color: var(--primary); font-size: 1.6rem; padding-left: .3rem;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.video-frame__play:hover { transform: translate(-50%, -50%) scale(1.1); }
.video-frame__note {
  position: absolute; left: 1rem; bottom: 1rem; padding: .3rem .75rem; border-radius: 999px;
  background: rgba(18,18,23,.65); color: #fff; font-size: .75rem; font-weight: 500;
}

/* ============================================================
   COMPONENT: callout (tinted note with an icon). Set --c to recolour one.
   ============================================================ */
.callout {
  --c: var(--primary);
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; border-radius: 16px;
  background: var(--fg); background: color-mix(in srgb, var(--c) 9%, #fff);
  border: 1px solid var(--line); border-color: color-mix(in srgb, var(--c) 22%, #fff);
}
.callout > i { flex: 0 0 auto; margin-top: .2rem; color: var(--c); font-size: 1.15rem; }
.callout p { margin: 0; }
.callout a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.callout--info   { --c: #0A66FF; }
.callout--tip    { --c: #1E874C; }
.callout--warn   { --c: #E08A00; }
.callout--danger { --c: #F53D6B; }
.tag--warn { --tag: #E08A00; }

/* ============================================================
   COMPONENT: code block with a copy button (emericio2.js)
   Wrap comments in <span class="c"> to dim them.
   ============================================================ */
.code-block { overflow: hidden; border-radius: var(--radius); background: #16161d; color: #e9e9f1; }
.code-block__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem .6rem .55rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5);
}
.code-block__copy {
  padding: .3rem .8rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: transparent;
  color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: 0; text-transform: none;
  transition: background .15s ease, border-color .15s ease;
}
.code-block__copy:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.code-block__copy.is-done { background: var(--primary); border-color: var(--primary); }
.code-block pre { margin: 0; padding: 1.1rem 1.25rem 1.25rem; overflow-x: auto; color: inherit; font-size: .9rem; line-height: 1.65; }
.code-block code { color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-block .c { color: #85859a; }

/* ============================================================
   COMPONENT: link list (icon + label + meta, one link per row)
   ============================================================ */
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-list a {
  display: flex; align-items: center; gap: 1rem; padding: .9rem .25rem;
  border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none;
  transition: padding-left .2s ease, color .2s ease;
}
.link-list a::after { content: '\2192'; color: var(--ink-soft); transition: transform .2s ease, color .2s ease; }
.link-list a:hover { padding-left: .75rem; color: var(--primary); }
.link-list a:hover::after { transform: translateX(3px); color: var(--primary); }
.link-list__icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--fg); color: var(--primary); }
.link-list__meta { margin-left: auto; font-size: .9rem; font-weight: 400; color: var(--ink-soft); }

/* ============================================================
   COMPONENT: publication list (year + title + venue + authors)
   ============================================================ */
.pub-list { display: grid; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.pub {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem 1.5rem;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
a.pub { transition: border-color .15s ease, transform .12s ease; }
a.pub:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-2px); }
.pub__year { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--primary); }
.pub__title { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.pub__venue, .pub__authors { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.pub__authors { margin-top: .3rem; font-size: .85rem; }
@media (max-width: 575px) { .pub { grid-template-columns: 1fr; gap: .25rem; } }

/* ---- Index list: auto-numbered rows, flowing over two columns ---- */
.index-list { columns: 2 320px; column-gap: 2.5rem; list-style: none; margin: 0; padding: 0; counter-reset: idx; }
.index-list li { counter-increment: idx; break-inside: avoid; display: flex; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.index-list li::before { content: counter(idx, decimal-leading-zero); min-width: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--secondary); }
.index-list small { display: block; color: var(--ink-soft); }

/* ============================================================
   COMPONENT: action card (icon + title + text + one action at the bottom)
   ============================================================ */
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.action-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .75rem;
  padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
}
.action-card h3 { margin: .25rem 0 0; font-size: 1.35rem; font-weight: 700; }
.action-card p { margin: 0; color: var(--ink-soft); }
.action-card__foot { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .75rem; }

/* ---- Round portrait ---- */
.avatar {
  display: block; width: clamp(140px, 18vw, 220px); height: auto; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 8px #fff, 0 24px 48px -20px rgba(18,18,23,.5);
}

/* ============================================================
   COMPONENT: platform card states
   ============================================================ */
.platform-card.is-soon { background: transparent; border-style: dashed; pointer-events: none; }
.platform-card.is-soon .platform-card__icon { color: var(--ink-soft); }
.platform-card.is-soon .platform-card__cta { background: transparent; border: 1px dashed var(--line); color: var(--ink-soft); }


/* ---- Scroll reveal (Webflow-IX2-style): start hidden + shifted down, JS adds
        .is-revealed when the element enters the viewport. --reveal-delay staggers
        siblings. Elements are only hidden once JS has armed them (.reveal-ready on
        <html>), so the page stays visible with JS disabled. ---- */
:root.reveal-ready [data-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translate3d(0, 2rem, 0);
}
[data-reveal] {
  transition: opacity .6s cubic-bezier(.22,.61,.36,1),
              transform .6s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  :root.reveal-ready [data-reveal]:not(.is-revealed) { opacity: 1; transform: none; }
  [data-reveal] { transition: none; }
}
