/* Site chrome, after zennia.sg: white header, brand band with a curved edge and a
   glass disc, ring-marked eyebrows, a brand "next" block and a deep footer.
   Patterns are lifted from zennia/zennia-site/src/styles/site.css; colours come
   only from /app/zennia.css roles. Load after zennia.css, before page styles. */

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 768px) { .container { padding-inline: var(--space-6); } }

/* ------------------------------------------------------------------ header
   The brand (zennia, with "Deck Remote" beneath it), the top-level places (Demo deck,
   Playground, Guide). "Guide" opens the guide's
   pages as a bar that drops below the header (/app/nav.js), its links starting under
   "Guide". A top-level page is a solid pill; on a guide page, Guide gets a soft pill
   and the page is underlined in the bar. */
.sitenav { position: sticky; top: 0; z-index: 20; background: var(--surface-raised); box-shadow: 0 1px 0 var(--line); }
.sitenav-main, .sitenav-sub-inner { max-width: 1200px; margin: 0 auto; padding-inline: var(--space-4); display: flex; align-items: center; }
@media (min-width: 768px) { .sitenav-main, .sitenav-sub-inner { padding-inline: var(--space-6); } }
.sitenav-main { min-height: 72px; gap: var(--space-1); }

.zn-brand.stacked { flex-direction: column; align-items: flex-start; gap: 3px; flex: none; width: var(--brand-col, 156px); }
.zn-brand.stacked img { width: 124px; height: auto; }
/* "Deck Remote" sits under the wordmark, starting where its letters start (82 of 272 units in). */
.zn-brand.stacked span { margin-left: calc(124px * 82 / 272); padding: 0; border: 0; font: 600 12.5px/1 var(--font-sans); letter-spacing: .01em; color: var(--ink-muted); }

/* Four items now, and a phone is narrow: let the row wrap between items, but
   never inside one — a label broken over two lines reads as two links. */
.sitenav-primary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.sitenav-primary a { white-space: nowrap; }
.sitenav-primary a { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-full);
  color: var(--ink); text-decoration: none; font: 550 15px/20px var(--font-sans); transition: background var(--duration-quick) var(--ease), color var(--duration-quick) var(--ease); }
.sitenav-primary a:hover { background: var(--surface-sunken); color: var(--ink); }
.sitenav-primary a[aria-current="page"], .sitenav-primary a[aria-current="page"]:hover { background: var(--brand); color: var(--on-brand); }
.sitenav-primary a.is-section, .sitenav-primary a.is-section:hover { background: var(--brand-soft); color: var(--brand-strong); }

.sitenav { position: sticky; }
.sitenav-sub { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
.sitenav-sub[hidden] { display: none; }
.nav-guide svg { width: 16px; height: 16px; margin-left: 4px; transition: transform var(--duration-quick) var(--ease); }
.nav-guide[aria-expanded="true"] { background: var(--surface-sunken); }
.nav-guide.is-section[aria-expanded="true"] { background: var(--brand-soft); }
.nav-guide[aria-expanded="true"] svg { transform: rotate(180deg); }
.sitenav-sub-inner { min-height: 44px; gap: var(--space-5); }
.sitenav-sub-label { flex: none; font: 600 11.5px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.sitenav-sub a { position: relative; display: inline-flex; align-items: center; height: 44px; color: var(--ink-muted); text-decoration: none; font: 500 14px/20px var(--font-sans); white-space: nowrap; }
.sitenav-sub a:hover { color: var(--ink); }
.sitenav-sub a[aria-current="page"] { color: var(--brand-strong); font-weight: 650; }
.sitenav-sub a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.sitenav a:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

@media (max-width: 760px) {
  .sitenav { position: relative; }
  .sitenav-main { flex-wrap: wrap; row-gap: var(--space-2); padding-block: var(--space-3); }
  .zn-brand.stacked { width: auto; flex: 1 1 auto; }
  .sitenav-primary { order: 3; flex-basis: 100%; }
  .sitenav-primary a { height: 36px; padding: 0 var(--space-3); font-size: 14px; }
  .sitenav-sub-inner { flex-wrap: wrap; column-gap: var(--space-4); row-gap: 0; padding-block: var(--space-1); }
  .sitenav-sub-label { width: 100%; padding-top: var(--space-2); }
  .sitenav-sub a { height: 36px; }
}
@media (max-width: 380px) { .zn-brand.stacked img { width: 108px; } .zn-brand.stacked span { margin-left: calc(108px * 82 / 272); } }

/* ------------------------------------------------------------------ brand band */
.band { position: relative; overflow: clip; isolation: isolate; color: var(--ink);
  border-bottom-left-radius: 50% var(--space-7); border-bottom-right-radius: 50% var(--space-7); }
.band > .container { position: relative; z-index: 1; }
.band-brand { background-color: var(--brand); color: var(--on-brand);
  background-image:
    radial-gradient(60% 90% at 85% 30%, color-mix(in srgb, var(--glow) 32%, transparent), transparent 70%),
    radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--brand-strong) 75%, transparent), transparent 70%); }
.band-brand :focus-visible { box-shadow: 0 0 0 2px var(--brand), 0 0 0 4px var(--on-brand); }
.band-brand a { color: inherit; }
.ripples { position: absolute; pointer-events: none; z-index: 0; }
.band-ripples { width: 760px; height: 760px; right: -240px; top: -300px; color: var(--on-brand); opacity: .12; }

.page-head-wrap { display: grid; gap: var(--space-5); align-items: center; padding-block: var(--space-7) var(--space-8); }
.page-head { display: grid; justify-items: start; gap: var(--space-4); max-width: 46rem; }
.page-head h1 { margin: 0; font: 700 clamp(36px, 3vw + 24px, 56px)/1.06 var(--font-sans); letter-spacing: -.03em; text-wrap: balance; }
.page-head .lede { margin: 0; color: inherit; font-size: clamp(17px, .4vw + 15.5px, 19px); line-height: 1.6; font-weight: 500; opacity: .94; max-width: 40rem; }
.page-head .lede a { text-decoration-thickness: 1px; }
.page-head .try { margin-top: var(--space-2); }
.page-head-halo { order: -1; justify-self: start; }
.page-head-art { display: grid; place-items: center; width: 108px; aspect-ratio: 1; border-radius: var(--radius-full); background: var(--surface-raised); box-shadow: var(--shadow-md); }
.page-head-art svg { width: 76%; height: auto; display: block; }
@media (min-width: 900px) {
  .page-head-wrap.has-art { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); }
  .page-head-halo { order: 0; }
  .page-head-art { width: 248px; }
}

/* Tags: round, like every action. The glow tag is the band's one spark. */
.zn-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--radius-full);
  font: 600 13px/1 var(--font-sans); background: var(--surface-sunken); color: var(--ink); }
.zn-tag-dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; }
.zn-tag-glow { background: var(--glow); color: var(--on-glow); }
.zn-tag-brand { background: var(--brand-soft); color: var(--brand-strong); }

/* Buttons on the band */
.btn.inverse { background: var(--surface-raised); color: var(--brand-strong); border-color: var(--surface-raised); }
.btn.inverse:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-strong); }
.btn.outline-inverse { background: transparent; color: var(--on-brand); border-color: color-mix(in srgb, var(--on-brand) 70%, transparent); }
.btn.outline-inverse:hover { background: color-mix(in srgb, var(--on-brand) 14%, transparent); color: var(--on-brand); border-color: var(--on-brand); }

/* A clear lens around the disc on the band; a slow sheen drifts across its rim. */
.glass-halo { position: relative; display: grid; place-items: center; isolation: isolate;
  padding: clamp(10px, 4.5%, 22px); border-radius: var(--radius-full);
  background: linear-gradient(150deg, color-mix(in srgb, var(--on-deep) 42%, transparent) 0%, color-mix(in srgb, var(--on-deep) 10%, transparent) 42%,
    color-mix(in srgb, var(--on-deep) 4%, transparent) 60%, color-mix(in srgb, var(--on-deep) 26%, transparent) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.08); backdrop-filter: blur(16px) saturate(180%) brightness(1.08);
  box-shadow: inset 0 1.5px 1px color-mix(in srgb, var(--on-deep) 85%, transparent), inset 0 -3px 8px color-mix(in srgb, var(--ink) 22%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--on-deep) 30%, transparent), 0 24px 48px -16px color-mix(in srgb, var(--ink) 45%, transparent); }
.glass-halo::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 38% at 30% 6%, color-mix(in srgb, var(--on-deep) 70%, transparent), transparent 70%),
    radial-gradient(50% 30% at 78% 96%, color-mix(in srgb, var(--glow) 45%, transparent), transparent 70%);
  background-size: 180% 180%, 100% 100%; animation: zn-sheen 14s ease-in-out infinite alternate; }
.glass-halo::after { content: ""; position: absolute; inset: 3px; z-index: -1; border-radius: inherit; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--on-deep) 22%, transparent); }
.glass-halo > * { position: relative; z-index: 1; }
@keyframes zn-sheen { from { background-position: 0% 0%, 0 0; } to { background-position: 100% 30%, 0 0; } }

/* Illustrations: monoline, round caps, inked by role. */
.art .art-brand { stroke: var(--brand); }
.art .art-line { stroke: var(--line-strong); }
.art .art-soft { fill: var(--brand-soft); }
.art .art-fill-brand { fill: var(--brand); }
.art .art-paper { fill: var(--surface-raised); }
.art .art-glow { fill: var(--glow); }
.art .art-ink { stroke: var(--ink); }

/* ------------------------------------------------------------------ eyebrows, sections, next */
.section-eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3);
  font: 700 13px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-strong); }
/* A solid dot: an open ring in front of capitals reads as a zero ("0 STEP 1"). */
.section-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--brand); flex: none; }

/* Every other section on a full-bleed sunken band (pages without a side menu). */
.band-sunken { background: var(--surface-sunken); border-image: conic-gradient(var(--surface-sunken) 0 0) fill 0 / / 0 100vmax; }

.next-link { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-6);
  padding: var(--space-6); border-radius: var(--radius-lg); background: var(--brand); color: var(--on-brand); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--duration-calm) var(--ease), transform var(--duration-calm) var(--ease), background var(--duration-calm) var(--ease); }
.next-link:hover { background: var(--brand-strong); color: var(--on-brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.next-link:focus-visible { border-radius: var(--radius-lg); }
.next-text { display: grid; gap: var(--space-1); }
.next-eyebrow { font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.next-label { font: 650 clamp(22px, 1vw + 18px, 28px)/1.2 var(--font-sans); letter-spacing: -.015em; }
.next-arrow { flex: none; width: 28px; height: 28px; }

/* ------------------------------------------------------------------ footer */
.site-footer { position: relative; overflow: clip; isolation: isolate; margin-top: var(--space-7); padding-block: var(--space-7) var(--space-5);
  background: var(--deep); color: var(--on-deep); border-top-left-radius: 50% var(--space-7); border-top-right-radius: 50% var(--space-7); }
.site-footer > .container { position: relative; z-index: 1; }
.site-footer :focus-visible { box-shadow: 0 0 0 2px var(--deep), 0 0 0 4px var(--on-deep); }
.footer-ripples { width: 720px; height: 720px; right: -260px; bottom: -380px; color: var(--on-deep); opacity: .1; }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--space-6); } }
.footer-brand { display: grid; gap: var(--space-4); align-content: start; justify-items: start; }
.symbol-disc { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--surface-raised); }
.symbol-disc img { width: 38px; height: 38px; display: block; }
.footer-tagline { margin: 0; font: 650 clamp(24px, 1.2vw + 19px, 30px)/1.15 var(--font-sans); letter-spacing: -.02em; max-width: 14em; }
.footer-col h2 { margin: 0 0 var(--space-3); display: block; font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-col a { color: var(--on-deep); text-decoration: none; }
.footer-col a:hover { color: var(--on-deep); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-6); padding-top: var(--space-5);
  border-top: 1px solid color-mix(in srgb, var(--on-deep) 25%, transparent); font-size: 14px; line-height: 20px; opacity: .85; }
.footer-bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .glass-halo::before { animation: none; } .next-link:hover { transform: none; } }
@media (prefers-reduced-transparency: reduce) { .glass-halo { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--on-deep) 22%, transparent); } }

/* A slim footer for single-purpose pages (join, 404): the same deep ground and curved edge, one row. */
.site-footer.slim { margin-top: var(--space-6); padding-block: var(--space-5); border-top-left-radius: 50% var(--space-5); border-top-right-radius: 50% var(--space-5); }
.footer-slim { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.footer-slim-brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--on-deep); text-decoration: none; font-weight: 650; font-size: 15px; }
.footer-slim-brand .symbol-disc { width: 36px; height: 36px; }
.footer-slim-brand .symbol-disc img { width: 24px; height: 24px; }
.footer-slim-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 14px; }
.footer-slim-links a, .footer-slim-links a:hover { color: var(--on-deep); white-space: nowrap; }
@media (max-width: 560px) { .footer-slim { justify-content: center; text-align: center; } .footer-slim-links { justify-content: center; } }
@media (max-width: 760px) { html { scroll-padding-top: 20px; } }
.footer-slim-cta { display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-5); border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--on-deep) 55%, transparent); color: var(--on-deep); text-decoration: none; font: 600 14px/20px var(--font-sans);
  transition: background var(--duration-quick) var(--ease); }
.footer-slim-cta:hover { background: color-mix(in srgb, var(--on-deep) 12%, transparent); color: var(--on-deep); }
.footer-slim-cta svg { width: 16px; height: 16px; }
