/* Spaziobianco components, hand-written in plain CSS from the theme's Astro + Tailwind sources.
   Colours, type and shadows come from tokens.css. Behaviour (dither shader, transfer card,
   API tabs, mobile menu) is in spaziobianco.js. Prefix: .sb- */

.sb { margin: 0; font-family: var(--font-sans); color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.sb *, .sb *::before, .sb *::after { box-sizing: border-box; }
.sb img, .sb svg { display: block; }
:where(.sb) a { color: inherit; text-decoration: none; }
:where(.sb) h1, :where(.sb) h2, :where(.sb) h3, :where(.sb) h4, :where(.sb) p, :where(.sb) ul, :where(.sb) dl, :where(.sb) dd, :where(.sb) figure, :where(.sb) blockquote { margin: 0; }
:where(.sb) ul { list-style: none; padding: 0; }
.sb :focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 40%, transparent); outline-offset: 2px; }

/* Type roles */
.sb-hero-title { letter-spacing: var(--tracking-tighter); text-wrap: pretty; }
.sb-heading { letter-spacing: var(--tracking-tight); }
.sb-quiet { color: var(--muted-foreground); }
.sb-medium { font-weight: 500; } .sb-semibold { font-weight: 600; }
.sb-num { font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .sb-balance { text-wrap: balance; } }

/* Wrapper.astro: max 1152px, 16px padding all round. Sections are bare and take 96px. */
.sb-wrap { max-width: var(--width-wrapper); margin: 0 auto; padding: var(--space-gutter); }
.sb-section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.sb-dark { background: var(--foreground); color: var(--background); }

/* Splits: no empty columns */
.sb-split3 { display: grid; gap: 32px; }
.sb-split2 { display: grid; gap: 48px; }
@media (min-width: 1024px) {
  .sb-split3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sb-span2 { grid-column: span 2; }
  .sb-split2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 96px; }
  .sb-split2 .sb-last { order: 9; }
}
.sb-grid2 { display: grid; gap: 32px 8px; } .sb-grid4 { display: grid; gap: 32px; }
@media (min-width: 640px) { .sb-grid2, .sb-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sb-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Icon + label feature item */
.sb-feat dt, .sb-feat-label { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 24px; font-weight: 500; color: var(--foreground); }
.sb-feat dd { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.sb-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sb-icon--sm { width: 16px; height: 16px; }

/* Button.astro: gradient pills of charcoal or paper, inset highlight shadows, press scale */
.sb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-align: center; border: 0; font-family: var(--font-sans); font-weight: 500; cursor: pointer; height: 40px; padding: 0 16px; font-size: 16px; border-radius: var(--radius-lg); transition: filter 200ms ease-out, transform 200ms ease-out; }
.sb-btn:active { transform: scale(.98); }
.sb-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 40%, transparent); }
.sb-btn--default { color: var(--background); background: linear-gradient(to bottom, color-mix(in oklab, var(--foreground) 85%, transparent), var(--foreground)); box-shadow: var(--shadow-button-default); }
.sb-btn--default:hover { filter: brightness(1.25); }
.sb-btn--muted { color: var(--foreground); background: linear-gradient(to bottom, var(--background), var(--muted)); box-shadow: var(--shadow-button-muted); }
.sb-btn--muted:hover { filter: brightness(.97); }
.sb-btn--xs { height: 32px; padding: 0 12px; font-size: 12px; border-radius: var(--radius-md); }
.sb-btn--sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: var(--radius-md); }
.sb-btn--md { height: 44px; padding: 0 20px; }
.sb-btn--lg { height: 48px; padding: 0 20px; font-size: 18px; }
.sb-btn--xl { height: 52px; padding: 0 24px; font-size: 20px; }
.sb-btn .sb-icon, .sb-more .sb-icon { transition: transform 300ms ease-out; }
.sb-btn:hover .sb-icon, .sb-more:hover .sb-icon, a:hover > .sb-more .sb-icon { transform: translateX(8px); }
.sb-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }

/* Cards: muted, shadow, no outline; concentric radii (2xl p-2 holds xl) */
.sb-card { padding: 24px; border-radius: var(--radius-2xl); background: var(--muted); box-shadow: var(--shadow); }
.sb-card--hold { padding: 8px; }
.sb-card--hover { transition: box-shadow 500ms; } .sb-card--hover:hover { box-shadow: var(--shadow-2xl); }
.sb-cta { padding: 32px; border-radius: var(--radius-2xl); box-shadow: var(--shadow); background: var(--highlight); }
.sb-cta--info { background: var(--info); color: var(--background); }
.sb-tile { border-radius: var(--radius-xl); background: var(--highlight); }

/* Customer entry: blush logo tile + copy inside a held card */
.sb-customer { position: relative; display: flex; align-items: center; gap: 16px; }
.sb-customer > a { position: absolute; inset: 0; }
.sb-customer .sb-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; width: 128px; max-width: 128px; padding: 0 20px; flex-shrink: 0; }
.sb-customer .sb-tile img { width: 100%; height: auto; filter: brightness(0); }

/* Navigation.astro: fixed paper bar, wordmark, centred links, one button */
.sb-nav { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--background); }
.sb-nav__in { position: relative; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.sb-nav__logo svg { height: 16px; width: auto; }
.sb-nav__links, .sb-nav__end { display: none; align-items: center; gap: 16px; font-size: 14px; font-weight: 500; }
.sb-nav__links a:hover, .sb-nav__end > a:not(.sb-btn):hover { color: var(--muted-foreground); }
.sb-nav__toggle { display: inline-flex; padding: 8px; border: 0; background: none; color: var(--muted-foreground); cursor: pointer; }
.sb-nav__toggle:hover { color: var(--foreground); }
.sb-nav__menu { position: absolute; right: 0; top: 100%; margin-top: 8px; display: none; flex-direction: column; width: 256px; padding: 6px; border-radius: var(--radius-xl); background: var(--background); box-shadow: var(--shadow-lg); }
.sb-nav__menu.is-open { display: flex; }
.sb-nav__menu > a:not(.sb-btn) { padding: 8px 12px; font-weight: 500; }
@media (min-width: 768px) { .sb-nav__links, .sb-nav__end { display: flex; } .sb-nav__toggle, .sb-nav__menu, .sb-nav__menu.is-open { display: none; } }

/* Dither shader host: put a canvas[data-shader] inside a relative, overflow-hidden box */
.sb-shader-host { position: relative; overflow: hidden; }
canvas[data-shader] { display: block; pointer-events: none; image-rendering: pixelated; }

/* Code block (Shiki css-variables theme): charcoal ground, numbered lines */
.sb-code { margin: 0; padding: 32px; overflow-x: auto; border-radius: var(--radius-xl); background: var(--foreground); color: var(--muted); font: 400 12px/1.7 var(--font-mono); scrollbar-width: none; counter-reset: step; }
.sb-code::-webkit-scrollbar { display: none; }
.sb-code .line { display: block; white-space: pre; }
.sb-code .line::before { content: counter(step); counter-increment: step; display: inline-block; width: 1rem; margin-right: 1.5rem; text-align: right; color: #ffffff55; }
.sb-code .s { color: var(--highlight); } .sb-code .k { color: var(--info); } .sb-code .c { color: var(--muted-foreground); }

/* Visual panels on paper: rounded-xl, outline muted, the warm 2xl shadow */
.sb-visual { padding: 32px; overflow: hidden; border-radius: var(--radius-xl); background: var(--background); outline: 1px solid var(--muted); box-shadow: var(--shadow-2xl); }
.sb-rail { position: relative; height: 16px; }
.sb-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.3px; background: var(--muted); border-radius: 9999px; }
.sb-rail > i { position: absolute; top: 50%; translate: 0 -50%; border-radius: 9999px; }
.sb-rail__from { left: 0; width: 16px; height: 16px; background: var(--foreground); }
.sb-rail__to { right: 0; width: 16px; height: 16px; background: var(--info); }
.sb-rail__dot { left: 0; width: 8px; height: 8px; background: var(--accent-strong); opacity: 0; }

/* Timeline (VisualAsset3) */
.sb-timeline { display: flex; flex-direction: column; gap: 12px; padding: 32px 32px 56px; }
.sb-timeline li { position: relative; display: flex; gap: 8px; font-size: 12px; line-height: 16px; }
.sb-timeline li::before { content: ""; position: absolute; left: 11.5px; top: 0; bottom: -24px; width: 1px; background: var(--muted); }
.sb-timeline li:last-child::before { display: none; }
.sb-timeline__dot { position: relative; display: flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 9999px; background: var(--background); }
.sb-timeline__dot::after { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: color-mix(in oklab, var(--accent) 40%, transparent); box-shadow: 0 0 0 3px var(--accent); }
.sb-timeline li:last-child .sb-timeline__dot::after { background: color-mix(in oklab, var(--highlight) 70%, transparent); box-shadow: 0 0 0 3px var(--highlight); }
.sb-timeline p { flex: auto; padding: 2px 0; color: var(--muted-foreground); }
.sb-timeline time { flex: none; padding: 2px 0; font-size: 9.6px; color: var(--muted-foreground); }

/* Marquees: logo strip and network rows (VisualAsset2) */
.sb-marquee { display: flex; overflow: hidden; }
.sb-marquee > ul { display: flex; flex-shrink: 0; align-items: center; animation: sb-marquee 24s linear infinite; }
.sb-marquee--right > ul { animation-name: sb-marquee-right; }
.sb-marquee--slow > ul { animation-duration: 48s; }
.sb-fade-x { -webkit-mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent); }
@keyframes sb-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes sb-marquee-right { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.sb-network { position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; height: 100%; overflow: hidden; border-radius: var(--radius-xl); background: var(--muted); outline: 1px solid var(--muted); box-shadow: var(--shadow); }
.sb-network__rows { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.sb-network__row { border-top: 1px dashed; border-bottom: 1px dashed; }
.sb-network__row ul { gap: 32px; padding: 4px 32px 4px 0; }
.sb-network__row li { display: flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.sb-network__row--ach { background: color-mix(in oklab, var(--accent) 70%, transparent); border-color: var(--accent-strong); }
.sb-network__row--wire { background: color-mix(in oklab, var(--highlight) 70%, transparent); border-color: var(--highlight); }
.sb-network__row--now { background: color-mix(in oklab, var(--info) 70%, transparent); border-color: var(--info); }
.sb-network__core { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 50%; height: 160px; border-radius: var(--radius-lg); background: var(--background); outline: 2px solid var(--muted); box-shadow: 0 20px 25px -5px color-mix(in oklab, var(--foreground) 30%, transparent), 0 8px 10px -6px color-mix(in oklab, var(--foreground) 30%, transparent); }

/* API tabs (Feature4) */
.sb-tabs { display: flex; flex-direction: column; margin-top: 32px; }
.sb-tab { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; background: none; text-align: left; font: 500 14px/20px var(--font-sans); color: var(--muted-foreground); cursor: pointer; transition: color 300ms; }
.sb-tab::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--foreground); opacity: 0; transition: opacity 300ms; }
.sb-tab:hover, .sb-tab[aria-selected="true"] { color: var(--foreground); }
.sb-tab[aria-selected="true"]::before { opacity: 1; }
.sb-checks { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.sb-checks li { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 24px; font-weight: 500; color: var(--muted-foreground); }
.sb-checks .sb-icon { color: var(--foreground); }

/* Comparison table on dark (Feature6) */
.sb-compare__head { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-bottom: 16px; font-size: 14px; font-weight: 500; text-align: center; }
.sb-compare__head p:first-child { grid-column-start: 3; }
.sb-compare__rows { border-top: 1px solid color-mix(in oklab, var(--background) 10%, transparent); border-bottom: 1px solid color-mix(in oklab, var(--background) 10%, transparent); }
.sb-compare__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; align-items: start; gap: 16px; padding: 24px 0; }
.sb-compare__row + .sb-compare__row { border-top: 1px solid color-mix(in oklab, var(--background) 10%, transparent); }
.sb-compare__row h3 { order: 1; grid-column: span 3; font-size: 16px; line-height: 24px; font-weight: 500; }
.sb-compare__row p { order: 4; grid-column: span 3; font-size: 14px; line-height: 20px; color: color-mix(in oklab, var(--background) 60%, transparent); }
.sb-compare__yes { order: 2; justify-self: center; color: var(--accent); }
.sb-compare__no { order: 3; display: none; justify-self: center; color: color-mix(in oklab, var(--background) 40%, transparent); }
@media (min-width: 768px) { .sb-compare__head { display: grid; } .sb-compare__row h3, .sb-compare__row p { grid-column: span 2; } .sb-compare__no { display: block; } }
@media (min-width: 1024px) { .sb-compare__row h3, .sb-compare__row p { grid-column: span 1; } .sb-compare__row p { order: 2; } .sb-compare__yes { order: 3; } .sb-compare__no { order: 4; } }

/* Fee lists: hairline rows */
.sb-fees { border-top: 1px solid var(--muted); border-bottom: 1px solid var(--muted); }
.sb-fees li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 14px; line-height: 20px; }
.sb-fees li + li { border-top: 1px solid var(--muted); }

/* Footer.astro: hairline, columns, the knockout wordmark over the dark shader */
.sb-foot__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 16px; }
@media (min-width: 1024px) { .sb-foot__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sb-foot__grid > :first-child { grid-column: span 2; }
.sb-foot__links { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; color: var(--muted-foreground); font-size: 14px; font-weight: 500; }
.sb-foot a:hover { color: var(--accent-strong); }
.sb-foot__mark { position: relative; overflow: hidden; margin-top: 96px; }
.sb-foot__mark > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb-foot__mark > svg { position: relative; width: 100%; height: auto; color: var(--background); overflow: visible; }

.sb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .sb-marquee > ul { animation: none; }
  .sb-btn, .sb-btn .sb-icon, .sb-more .sb-icon, .sb-tab, .sb-card--hover { transition: none; }
  .sb-btn:active { transform: none; }
}
