/* Spolu — product-page sections.
   Loaded by the pages in site/ after /styles.css; the blog does not load it.
   Every visual here is decorative and aria-hidden: the words that matter are
   in the HTML around it, so a crawler or a screen reader loses nothing. */

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 120px);
  /* Clip sideways only: the 3D scene may overhang the gutter, but the glow
     must run up under the header rather than end in a hard line. */
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.hero-copy > * + * {
  margin-top: 26px;
}

.hero h1 .h1-sub {
  display: block;
  margin-top: 22px;
  max-width: 20em;
  color: var(--text-secondary);
  font-size: var(--fs-lead);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.hero .lead {
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust svg {
  color: var(--success-fg);
}

/* ------------------------------------------------------- the 3D stage */

.stage {
  position: relative;
  height: clamp(480px, 52vw, 640px);
  perspective: 1400px;
  --px: 0;
  --py: 0;
}

.scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(10deg - var(--py) * 8deg)) rotateY(calc(-20deg + var(--px) * 14deg));
  transition: transform 0.9s var(--ease-out);
}

/* Two glass spheres overlapping like the shared-o glyph — the logo, in 3D. */
.orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(240px, 26vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform-style: preserve-3d;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85), transparent 22%),
    radial-gradient(circle at 70% 78%, rgba(0, 0, 0, 0.12), transparent 45%),
    radial-gradient(circle at 45% 45%, var(--brand-primary-tint), var(--brand-primary) 140%);
  box-shadow:
    inset -18px -24px 50px rgba(43, 37, 99, 0.35),
    inset 10px 12px 30px rgba(255, 255, 255, 0.4),
    0 50px 80px -30px rgba(43, 37, 99, 0.45);
  opacity: 0.9;
}

.orb-a {
  transform: translate(-92%, -50%) translateZ(-180px);
  animation: orbit-a 14s ease-in-out infinite;
}

.orb-b {
  transform: translate(-8%, -50%) translateZ(-180px);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.6), transparent 22%),
    radial-gradient(circle at 50% 50%, var(--brand-primary-hover), var(--brand-primary) 70%);
  mix-blend-mode: multiply;
  animation: orbit-b 14s ease-in-out infinite;
}

:root[data-theme='dark'] .orb-b {
  mix-blend-mode: screen;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .orb-b {
    mix-blend-mode: screen;
  }
}

/* The spheres drift apart and back together — the logo's idea, in motion. */
@keyframes orbit-a {
  50% {
    transform: translate(-104%, -54%) translateZ(-150px);
  }
}

@keyframes orbit-b {
  50% {
    transform: translate(4%, -46%) translateZ(-210px);
  }
}

/* The phone. Real HTML, so it is crisp at any size and in both themes. */
.phone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(250px, 23vw, 300px);
  aspect-ratio: 9 / 19;
  transform: translate(-50%, -50%) translateZ(40px);
  transform-style: preserve-3d;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(145deg, #2b2838, #121118 60%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    inset 0 0 0 9px #0c0b10,
    var(--shadow-float),
    -30px 40px 60px -20px rgba(43, 37, 99, 0.35);
  animation: float 7s ease-in-out infinite;
}

/* Side thickness: a slab behind the face, offset in Z. */
.phone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #0b0a0f;
  transform: translateZ(-14px);
}

/* Glass glare across the screen. */
.phone::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 36px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, transparent 32%, transparent 70%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%) translateZ(40px) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateZ(40px) translateY(-14px);
  }
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.35;
  padding: 34px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.screen::before {
  /* the camera punch-hole */
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  border-radius: 50%;
  background: #0c0b10;
}

/* The screen's contents mirror the app's Group screen (SCR-02) — same
   strings, same tokens, same order: context bar, debt banner, budgets,
   recent expenses, tab bar. Sizes are the app's dp values scaled to ~0.62,
   the ratio of this phone's width to a 412dp device. */
.ctx-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gchip {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.gchip.on {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--text-on-primary);
}

.gchip.add {
  background: var(--brand-primary-tint);
  border-color: transparent;
  color: var(--brand-primary);
}

.sync-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--success-fg);
  box-shadow: 0 0 0 3px var(--success-bg);
}

.screen .av.me {
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border-color: transparent;
}

.debt-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border-radius: 12px;
  background: var(--brand-primary);
  color: var(--text-on-primary);
  box-shadow: 0 8px 18px -8px var(--glow);
}

.debt-banner .av {
  border-color: var(--brand-primary);
}

.debt-banner .txt b {
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.debt-banner .settle {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--text-on-primary);
  color: var(--brand-primary);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.app-card {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-card);
}

.app-card .sec {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 9px;
}

.app-card .sec b {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-card .sec span {
  color: var(--brand-primary);
  font-weight: 600;
}

.members {
  display: flex;
  justify-content: space-between;
  padding: 3px 4px 1px;
}

.members > span {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 8px;
  font-weight: 500;
}

.brow {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 9.5px;
  font-weight: 500;
}

.brow .bar {
  height: 5px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.brow .bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: var(--c);
  transform-origin: left;
  animation: fill 2.4s var(--ease-out) both 0.6s;
}

@keyframes fill {
  from {
    transform: scaleX(0);
  }
}

.badge {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.warn {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.lrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.lrow + .lrow {
  border-top: 1px solid var(--border-hairline);
}

.lrow .what {
  flex: 1;
  min-width: 0;
}

.lrow .what b {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
}

.lrow .what b i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c);
}

.lrow .what small {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lrow .amt {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.app-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  margin: auto -12px -12px;
  padding: 7px 6px 12px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-hairline);
  color: var(--text-tabbar-idle, var(--text-faint));
  font-size: 7px;
  font-weight: 500;
  text-align: center;
}

.app-tabs span {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.app-tabs svg {
  width: 14px;
  height: 14px;
}

.app-tabs .on {
  color: var(--brand-primary);
  font-weight: 600;
}

.app-tabs .fab {
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -14px auto 0;
  border-radius: 10px;
  background: var(--brand-primary);
  color: var(--text-on-primary);
  font-size: 18px;
  font-weight: 400;
  box-shadow: 0 6px 14px -4px var(--glow);
}

/* Floating cards around the phone, each on its own Z plane. */
.float {
  position: absolute;
  padding: 12px 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-card) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--border-soft) 60%, transparent);
  box-shadow: var(--shadow-float);
  font-size: 12.5px;
  color: var(--text-primary);
  animation: bob 6s ease-in-out infinite;
}

.float-receipt {
  bottom: 12%;
  left: -2%;
  width: 196px;
  transform: translateZ(150px);
  animation-delay: -1s;
}

.float-owed {
  top: 38%;
  left: -3%;
  transform: translateZ(190px);
  animation-delay: -3s;
}

.float-settled {
  bottom: 24%;
  right: -4%;
  transform: translateZ(110px);
  animation-delay: -2s;
}

/* The app's snackbar: inverse surface, action in the accent. */
.float.snack {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--inverse-surface);
  border-color: transparent;
  color: var(--text-on-inverse);
  font-size: 12px;
}

.float.snack b {
  color: var(--accent-on-inverse, #b7aee8);
  font-weight: 600;
}

.float .hint {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.receipt-line .p {
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@keyframes bob {
  50% {
    translate: 0 -10px;
  }
}

.float .t {
  display: block;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.float .big {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.float .ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success-text);
  font-weight: 600;
}

.receipt-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  font-size: 11.5px;
}

.receipt-line + .receipt-line {
  border-top: 1px dashed var(--border-strong);
}

.receipt-line span:first-child {
  flex: 1;
}

.avs {
  display: inline-flex;
}

.av {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sw, var(--sw-violet));
  color: var(--sw-ink);
  font-size: 9.5px;
  font-weight: 700;
  border: 2px solid var(--bg-card);
}

.avs .av + .av {
  margin-left: -6px;
}

.av-a {
  --sw: var(--sw-violet);
}
.av-t {
  --sw: var(--sw-teal);
}
.av-m {
  --sw: var(--sw-amber);
}
.av-j {
  --sw: var(--sw-rose);
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .stage {
    height: 560px;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .stage {
    height: 500px;
  }
  .scene {
    transform: rotateX(calc(8deg - var(--py) * 6deg)) rotateY(calc(-10deg + var(--px) * 10deg));
  }
  .float-receipt {
    left: 3%;
    bottom: 6%;
    width: 160px;
  }
  .float-owed,
  .float-settled {
    display: none;
  }
}

/* ------------------------------------------------------ marquee of uses */

.marquee {
  overflow: hidden;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee ul {
  display: flex;
  gap: 14px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 40s linear infinite;
}

.marquee:hover ul {
  animation-play-state: paused;
}

.marquee li {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--neu-surface);
  box-shadow: var(--neu-raised-sm);
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(calc(-50% - 7px));
  }
}

/* ----------------------------------------------------------- audiences */

.audiences {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.audience {
  padding: 28px 24px;
}

.audience .glyph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 18px;
  box-shadow: var(--neu-pressed);
  color: var(--brand-primary);
}

.audience h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.audience p {
  color: var(--text-secondary);
  font-size: 0.975rem;
}

@media (max-width: 960px) {
  .audiences {
    grid-template-columns: 1fr 1fr;
  }
}

/* On a phone the four audiences become a swipeable row rather than four
   full-width cards stacked down the page. The row scrolls inside itself, so
   the page still never scrolls sideways. */
@media (max-width: 600px) {
  .audiences {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 8px var(--gutter) 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .audiences::-webkit-scrollbar {
    display: none;
  }
  .audience {
    scroll-snap-align: start;
  }
}

/* ---------------------------------------------------------------- bento */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  padding: clamp(24px, 3vw, 34px);
  overflow: hidden;
}

.tile h3 {
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.tile p {
  max-width: 34ch;
  color: var(--text-secondary);
}

.tile .viz {
  margin-top: auto;
  padding-top: 18px;
}

.span-4 {
  grid-column: span 4;
}
.span-3 {
  grid-column: span 3;
}
.span-2 {
  grid-column: span 2;
}

.tile-dark {
  border-radius: var(--radius);
  background: var(--inverse-surface);
  box-shadow: var(--shadow-float);
  color: var(--text-on-inverse);
}

.tile-dark h3 {
  color: var(--text-on-inverse);
}

.tile-dark p {
  color: color-mix(in srgb, var(--text-on-inverse) 78%, transparent);
}

.tile-dark .kicker {
  color: var(--accent-on-inverse);
}

@media (max-width: 960px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .span-4,
  .span-3 {
    grid-column: span 2;
  }
  .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .span-4,
  .span-3,
  .span-2 {
    grid-column: auto;
  }
}

/* Receipt viz: line items whose assignee chips switch on in turn. */
.scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

@media (max-width: 600px) {
  .scan {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

.paper {
  position: relative;
  padding: 16px 18px 20px;
  border-radius: 14px 14px 4px 4px;
  background: var(--bg-card);
  box-shadow: var(--neu-raised-sm);
  font-size: 0.9rem;
}

.paper::after {
  /* torn edge */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background:
    linear-gradient(-45deg, transparent 6px, var(--bg-card) 0) 0 0 / 12px 8px repeat-x,
    linear-gradient(45deg, transparent 6px, var(--bg-card) 0) 0 0 / 12px 8px repeat-x;
}

.paper .line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.paper .line + .line {
  border-top: 1px dashed var(--border-strong);
}

.paper .line .price {
  font-weight: 600;
}

.paper .line .avs .av {
  width: 24px;
  height: 24px;
  font-size: 10.5px;
  animation: assign 8s var(--ease-out) infinite;
}

.paper .line:nth-child(1) .av {
  animation-delay: 0.4s;
}
.paper .line:nth-child(2) .av {
  animation-delay: 1.2s;
}
.paper .line:nth-child(3) .av {
  animation-delay: 2s;
}
.paper .line:nth-child(4) .av {
  animation-delay: 2.8s;
}

@keyframes assign {
  0%,
  6% {
    opacity: 0.25;
    filter: grayscale(1);
    transform: scale(0.85);
  }
  12%,
  88% {
    opacity: 1;
    filter: none;
    transform: scale(1);
  }
  100% {
    opacity: 0.25;
    filter: grayscale(1);
  }
}

.paper .total {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 2px solid var(--text-primary);
  font-weight: 700;
}

.match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Memory viz: a remembered row with a toggle. */
.memory {
  display: grid;
  gap: 12px;
}

.mem-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: var(--neu-pressed-sm);
  font-size: 0.95rem;
}

.mem-row .what {
  flex: 1;
}

.mem-row small {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand-primary);
  box-shadow: var(--neu-pressed-sm);
}

.switch::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 26px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-on-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  animation: flick 6s var(--ease-spring) infinite;
}

@keyframes flick {
  0%,
  15% {
    transform: translateX(-22px);
  }
  25%,
  100% {
    transform: translateX(0);
  }
}

/* Simplify viz: three people, the tangle collapses to two arrows. */
.simplify svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.simplify .node {
  fill: var(--bg-card);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.simplify .label {
  fill: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.simplify .edge {
  fill: none;
  stroke: var(--brand-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.simplify .edge.extra {
  stroke: var(--text-muted);
  stroke-dasharray: 6 6;
  animation: fade-edge 7s ease-in-out infinite;
}

.simplify .edge.flow {
  stroke-dasharray: 6 10;
  animation: flow 1.6s linear infinite;
}

.tile-dark .simplify .node {
  fill: var(--inverse-surface);
  stroke: color-mix(in srgb, var(--text-on-inverse) 35%, transparent);
}

.tile-dark .simplify .label {
  fill: var(--text-on-inverse);
}

.tile-dark .simplify .edge {
  stroke: var(--accent-on-inverse);
}

.tile-dark .simplify .edge.extra {
  stroke: color-mix(in srgb, var(--text-on-inverse) 50%, transparent);
}

@keyframes fade-edge {
  0%,
  35% {
    opacity: 1;
  }
  50%,
  85% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes flow {
  to {
    stroke-dashoffset: -32;
  }
}

/* Coin viz: a 3D coin turning between currencies. */
.coin-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  perspective: 800px;
}

.coin {
  position: relative;
  flex: none;
  width: 92px;
  height: 92px;
  transform-style: preserve-3d;
  animation: spin 6s var(--ease-out) infinite;
}

.coin span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  backface-visibility: hidden;
  background: radial-gradient(circle at 35% 30%, var(--brand-primary-hover), var(--brand-primary));
  color: var(--text-on-primary);
  box-shadow:
    inset 0 0 0 6px color-mix(in srgb, var(--text-on-primary) 18%, transparent),
    0 18px 30px -12px var(--brand-primary);
  font-size: 34px;
  font-weight: 800;
}

.coin span:last-child {
  transform: rotateY(180deg);
}

@keyframes spin {
  0%,
  35% {
    transform: rotateY(0);
  }
  50%,
  85% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.fx-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Budget viz: neumorphic envelope gauges. */
.gauges {
  display: flex;
  gap: 18px;
}

.gauge {
  --p: 60;
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: var(--neu-raised-sm);
}

.gauge::before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: conic-gradient(var(--c, var(--brand-primary)) calc(var(--p) * 1%), var(--bg-subtle) 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%);
  mask: radial-gradient(circle, transparent 54%, #000 55%);
}

.gauge b {
  position: relative;
  font-size: 1.05rem;
}

.gauge small {
  position: absolute;
  bottom: -26px;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Privacy viz: a pressed vault with a lock. */
.vault {
  display: flex;
  gap: 12px;
}

.vault > div {
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  font-size: 0.875rem;
}

.vault .shared {
  box-shadow: var(--neu-raised-sm);
}

.vault .private {
  box-shadow: var(--neu-pressed);
}

.vault b {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.vault span {
  color: var(--text-muted);
}

/* Offline viz: a pressed "airplane mode" switch. */
.offline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  box-shadow: var(--neu-pressed);
}

.offline .what {
  flex: 1;
}

.offline small {
  display: block;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ eva */

.tile-brief {
  min-height: 0;
}

.eva-chat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 460px;
}

.eva-chat .bub {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 18px 18px 18px 6px;
  box-shadow: var(--neu-pressed-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.eva-chat .bub.me {
  align-self: flex-end;
  border-radius: 18px 18px 6px 18px;
  background: var(--brand-primary-tint);
  box-shadow: none;
  color: var(--text-on-tint);
}

.eva-chat .draft {
  display: grid;
  gap: 10px;
  width: min(100%, 300px);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: var(--bg-card);
  font-size: 0.9rem;
}

.eva-chat .draft-top,
.eva-chat .draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
}

.eva-chat .draft-top b {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.eva-chat .draft-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eva-chat .draft-btn {
  padding: 8px 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.eva-chat .draft-btn.primary {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: var(--text-on-primary);
}

.eva-mark {
  vertical-align: -0.12em;
  color: var(--accent-on-inverse);
}

.eva-name {
  display: grid;
  gap: 14px;
  margin: auto 0 0;
  padding-top: 18px;
}

.eva-name > div {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  align-items: baseline;
  gap: 4px;
}

.eva-name dt {
  color: var(--accent-on-inverse);
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1;
}

.eva-name dd {
  margin: 0;
  color: color-mix(in srgb, var(--text-on-inverse) 78%, transparent);
  font-size: 0.95rem;
}

.eva-name dd b {
  display: block;
  color: var(--text-on-inverse);
  font-weight: 600;
}

.eva-foot {
  margin-top: 28px;
  max-width: 70ch;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------- how it works */

.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: how;
}

.how li {
  position: relative;
  list-style: none;
  padding: 32px 28px 30px;
  counter-increment: how;
}

.how li::before {
  content: counter(how, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--brand-primary);
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.how h3 {
  margin-bottom: 8px;
  font-size: 1.375rem;
}

.how p {
  color: var(--text-secondary);
}

.how-list {
  margin: 0;
  padding: 0;
}

@media (max-width: 860px) {
  .how {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------- statement */

.statement {
  font-size: clamp(2rem, 1.1rem + 4.2vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
  max-width: 18ch;
}

.statement .dim {
  color: var(--text-muted);
}

/* ----------------------------------------------------------------- CTA band */

.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: var(--brand-primary);
  color: var(--text-on-primary);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.cta-band::before,
.cta-band::after {
  content: '';
  position: absolute;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 46px solid color-mix(in srgb, var(--text-on-primary) 9%, transparent);
  right: -120px;
  top: -160px;
}

.cta-band::after {
  right: 80px;
  top: auto;
  bottom: -260px;
}

.cta-band h2 {
  color: var(--text-on-primary);
}

.cta-band p {
  margin-top: 16px;
  /* Full-strength ink: the 70% token measures ~3.5:1 on the lavender fill,
     under BR-B-040's 4.5:1 for body text. */
  color: var(--text-on-primary);
  font-size: var(--fs-lead);
}

.cta-band .btn {
  --btn-bg: var(--text-on-primary);
  --btn-fg: var(--brand-primary);
  position: relative;
  z-index: 1;
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

.cta-band .btn[aria-disabled='true'] {
  --btn-bg: color-mix(in srgb, var(--text-on-primary) 88%, var(--brand-primary));
  --btn-fg: var(--brand-primary-hover);
  box-shadow: none;
}

.cta-band .cta-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.cta-band .cta-actions small {
  color: var(--text-on-primary);
}

@media (max-width: 860px) {
  .cta-band {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------ subscribe */

.subscribe {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 40px);
  text-align: center;
}

.subscribe h2 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.subscribe .consent {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.subscribe .consent a {
  color: var(--text-muted);
}

/* The EmailOctopus embed injects its own markup here, late: site.js loads it
   only as the section nears the viewport. The min-height holds the space so
   its arrival doesn't shift the page. */
.eo-form {
  margin-top: 16px;
  min-height: 56px;
}

.eo-form input,
.eo-form iframe,
.eo-form img {
  max-width: 100%;
}

.eo-form input,
.eo-form button {
  font-size: 16px;
}

/* The embed ships its own left-aligned, Arial-styled form. Centre it and give
   it the site's type, field and button shapes; its layout is left alone. */
.eo-form .inline-container,
.eo-form .form-container,
.eo-form .emailoctopus-form-wrapper,
.eo-form form {
  margin-inline: auto !important;
}

.eo-form .emailoctopus-form-row,
.eo-form .emailoctopus-form-wrapper form > div {
  justify-content: center;
}

.eo-form input[type='email'],
.eo-form button,
.eo-form [type='submit'],
.eo-form label,
.eo-form p {
  font-family: inherit !important;
}

.eo-form input[type='email'] {
  border-radius: 999px !important;
  padding-inline: 18px !important;
}

.eo-form button,
.eo-form [type='submit'] {
  border-radius: 999px !important;
  font-weight: 600 !important;
}

/* ------------------------------------------------------- latest posts */

.posts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  color: inherit;
  text-decoration: none;
}

.post-tile:hover {
  color: inherit;
}

.post-tile h3 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.post-tile:hover h3 {
  color: var(--brand-primary);
}

.post-tile .meta {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 860px) {
  .posts-row {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- pricing */

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 6px;
  margin-bottom: 40px;
  border-radius: var(--radius-pill);
  box-shadow: var(--neu-pressed);
}

.billing-toggle button {
  min-height: 44px;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow 0.25s var(--ease-out),
    color 0.2s;
}

.billing-toggle button[aria-pressed='true'] {
  background: var(--neu-surface);
  box-shadow: var(--neu-raised-sm);
  color: var(--brand-primary);
}

.billing-toggle .save {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 0.75rem;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 960px;
  margin-inline: auto;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 44px);
}

.plan h2 {
  font-size: 1.5rem;
}

.plan .price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 6px;
}

.plan .price b {
  font-size: clamp(3rem, 2.3rem + 2.6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.plan .price span {
  color: var(--text-muted);
}

.plan .note {
  min-height: 1.6em;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.plan ul {
  display: grid;
  gap: 12px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}

.plan li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  color: var(--text-secondary);
}

.plan li svg {
  margin-top: 3px;
  color: var(--success-fg);
}

.plan .btn {
  margin-top: auto;
}

/* Google Play + App Store, stacked full-width (pricing free card, /join). */
.store-buttons {
  display: grid;
  gap: 10px;
}

.plan .store-buttons {
  margin-top: auto;
}

.plan .store-buttons .btn {
  margin-top: 0;
}

.plan-premium {
  background: var(--inverse-surface);
  color: var(--text-on-inverse);
  box-shadow: var(--shadow-float);
}

.plan-premium h2,
.plan-premium .price b {
  color: var(--text-on-inverse);
}

.plan-premium .price span,
.plan-premium .note {
  color: color-mix(in srgb, var(--text-on-inverse) 70%, transparent);
}

.plan-premium li {
  color: color-mix(in srgb, var(--text-on-inverse) 88%, transparent);
}

.plan-premium li svg {
  color: var(--accent-on-inverse);
}

.plan .badge {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-on-inverse) 22%, transparent);
  color: var(--accent-on-inverse);
  font-size: 0.8125rem;
  font-weight: 600;
}

.plan-premium .btn[aria-disabled='true'] {
  --btn-bg: color-mix(in srgb, var(--text-on-inverse) 10%, transparent);
  --btn-fg: var(--text-on-inverse);
  box-shadow: none;
}

[data-billing='monthly'] [data-show='annual'],
[data-billing='annual'] [data-show='monthly'] {
  display: none;
}

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.975rem;
}

.compare th,
.compare td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-hairline);
}

.compare thead th {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare tbody th {
  font-weight: 500;
  color: var(--text-primary);
}

.compare td {
  color: var(--text-secondary);
}

.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- roadmap */

.lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.lane {
  padding: 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--neu-pressed);
}

.lane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 4px 18px;
}

.lane-head h2 {
  font-size: 1.25rem;
}

.lane-head .status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent);
}

.lane-head .count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.lane ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lane li {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--neu-surface);
  box-shadow: var(--neu-raised-sm);
}

.lane li h3 {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.lane li p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.lane-now {
  --c: var(--brand-primary);
}
.lane-next {
  --c: var(--sw-amber);
}
.lane-shipped {
  --c: var(--success-fg);
}

@media (max-width: 960px) {
  .lanes {
    grid-template-columns: 1fr;
  }
}

.release {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--neu-surface);
  box-shadow: var(--neu-raised-sm);
}

.release-head {
  max-width: 62ch;
}

.release-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.release-head p,
.release-list p {
  color: var(--text-secondary);
}

.release-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-primary) 14%, transparent);
  color: var(--brand-primary);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.release-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.release-list h3 {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.release-list p {
  font-size: 0.9375rem;
}

.release-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--text-muted) 22%, transparent);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (max-width: 960px) {
  .release-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .release {
    padding: 22px;
  }
  .release-list {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------- about */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
}

.facts div {
  padding: 16px 8px;
  border-bottom: 1px solid var(--border-hairline);
}

.facts dt {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 640px) {
  .facts {
    grid-template-columns: 1fr;
  }
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.principle {
  padding: 30px 26px;
}

.principle h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.principle p {
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .principles {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.story-body p + p {
  margin-top: 18px;
}

.story-body p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

@media (max-width: 860px) {
  .story {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------- small centred pages */

.center-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 320px);
  padding-block: 48px;
}

.center-card {
  width: 100%;
  max-width: 480px;
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}

.center-card > * + * {
  margin-top: 20px;
}

.center-card .steps {
  text-align: left;
}

.code-well {
  padding: 24px 16px;
  border-radius: var(--radius);
  box-shadow: var(--neu-pressed);
}

.code {
  margin: 0;
  color: var(--brand-primary);
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  word-break: break-all;
}

.code-meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.big-404 {
  font-size: clamp(6rem, 4rem + 12vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.85;
}

.post-tile .chip {
  align-self: flex-start;
}

/* The embed hard-codes dark label text, unreadable on the dark theme. */
.eo-form label,
.eo-form .emailoctopus-form-row-consent,
.eo-form .emailoctopus-form-row-consent * {
  color: var(--text-secondary) !important;
}

.eo-form .emailoctopus-form input,
.eo-form .emailoctopus-form button,
.eo-form .emailoctopus-form label {
  font-family: var(--font, 'Outfit', system-ui, sans-serif) !important;
}
