/* Bento's site: white, one typeface, black buttons, recordings in plain windows. Follows the system's light or dark. */
:root {
  --bg: #ffffff; --bg-2: #f6f6f6; --fg: #0a0a0a; --fg-2: #555555; --fg-3: #8a8a8a; --line: #e8e8e8;
  --btn: #0a0a0a; --btn-fg: #ffffff; --win: #ffffff; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 60px -20px rgba(0,0,0,.18);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --w: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a; --bg-2: #141414; --fg: #f4f4f4; --fg-2: #a3a3a3; --fg-3: #737373; --line: #232323;
    --btn: #f4f4f4; --btn-fg: #0a0a0a; --win: #161616; --shadow: 0 0 0 1px rgba(255,255,255,.04), 0 30px 70px -24px rgba(0,0,0,.8);
  }
  .ais img, .stars img, .btn.ghost img, .foot .gh { filter: invert(1); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; font-weight: 650; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; background: var(--btn); color: var(--btn-fg);
  font: 600 15px var(--sans); letter-spacing: -.01em; border: 1px solid var(--btn); transition: opacity .15s, transform .15s var(--ease), background .15s; }
.btn:hover { opacity: .86; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { opacity: 1; background: var(--bg-2); }
.btn.sm { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 14px; }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ctas.left { justify-content: flex-start; }
.fine { color: var(--fg-3); font-size: 13px; margin-top: 16px; }
.fine a { color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 28px; height: 60px; padding: 0 max(20px, calc((100vw - var(--w)) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; letter-spacing: -.02em; }
.links { display: flex; gap: 24px; font-size: 14px; color: var(--fg-2); }
.links a { transition: color .15s; } .links a:hover, .links a.on { color: var(--fg); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.stars { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.stars:hover { color: var(--fg); }

/* sections */
main > section { width: min(var(--w), calc(100% - 40px)); margin: 0 auto; }
.hero { text-align: center; padding: clamp(64px, 11vh, 120px) 0 0; }
.eyebrow { font-size: 14px; color: var(--fg-3); margin-bottom: 20px; }
h1 { font-size: clamp(48px, 8.4vw, 104px); }
.sub { max-width: 600px; margin: 24px auto 34px; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-2); }

.window { position: relative; border-radius: 14px; overflow: hidden; background: var(--win); border: 1px solid var(--line); box-shadow: var(--shadow); }
.window video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-2); }
.chrome { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--win); }
.chrome i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.chrome .url { margin: 0 auto; transform: translateX(-24px); font-size: 12px; color: var(--fg-3); background: var(--bg-2); padding: 3px 14px; border-radius: 6px; }
.hero-win { margin: clamp(48px, 7vw, 80px) auto 0; }

.ais { padding: clamp(72px, 10vw, 120px) 0 0; text-align: center; }
.ais > p:first-child { font-size: 14px; color: var(--fg-3); }
.ais ul { list-style: none; margin: 22px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 44px; }
.ais li { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.ais li img, .ais li svg { width: 22px; height: 22px; fill: currentColor; }
.ais .none { margin-top: 22px; font-size: 15px; color: var(--fg-2); }

.feature { padding: clamp(112px, 14vw, 168px) 0 0; }
.copy { max-width: 640px; margin: 0 auto 44px; text-align: center; }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
.copy p { margin-top: 18px; font-size: 18px; color: var(--fg-2); }

/* tabs */
.tabs { display: flex; justify-content: center; gap: 4px; margin: -12px auto 0; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border-radius: 12px; background: var(--bg-2); }
.tabs button { position: relative; overflow: hidden; height: 36px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--fg-2);
  font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; transition: color .15s, background .15s, box-shadow .15s; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.stage .chrome { position: relative; }
.stage .bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--fg); opacity: .55; transform-origin: left; transform: scaleX(var(--p, 0)); }
.tab-line { text-align: center; color: var(--fg-2); margin: 20px 0 32px; min-height: 1.55em; transition: opacity .2s; }
.stage video { transition: opacity .2s; }
.stage.swap video, .tab-line.swap { opacity: 0; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(112px, 14vw, 168px) !important; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 32px 28px 34px 0; }
.facts div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.facts b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.facts span { display: block; margin-top: 6px; font-size: 15px; color: var(--fg-2); }

/* open source */
.open { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; padding: clamp(112px, 14vw, 168px) 0 0; }
.open > * { min-width: 0; }
.open .copy { margin: 0; text-align: left; }
.open .ctas { margin-top: 28px; }
.code { position: relative; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.code pre { margin: 0; padding: 26px 28px; overflow-x: auto; font: 14px/1.9 var(--mono); }
.code .p { color: var(--fg-3); user-select: none; }
.copy-btn { position: absolute; top: 12px; right: 12px; height: 28px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg);
  color: var(--fg-2); font: 500 12px var(--sans); cursor: pointer; }
.copy-btn:hover { color: var(--fg); }

.last { text-align: center; padding: clamp(128px, 16vw, 200px) 0 clamp(96px, 12vw, 150px); }
.last h2 { margin-bottom: 32px; }

.foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 28px max(20px, calc((100vw - var(--w)) / 2)); border-top: 1px solid var(--line); font-size: 14px; color: var(--fg-3); }
.foot .who { display: flex; align-items: center; gap: 9px; }
.foot .who a { color: var(--fg-2); }
.foot nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.foot a:hover { color: var(--fg); }

/* arrivals */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 860px) {
  .links { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .open { grid-template-columns: 1fr; gap: 32px; }
  .open .copy { text-align: center; } .open .ctas { justify-content: center; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { gap: 12px; }
  .stars span:empty { display: none; }
  .hero .btn { width: 100%; justify-content: center; }
  .chrome { height: 26px; } .chrome i { width: 8px; height: 8px; } .chrome .url { display: none; }
  .window { border-radius: 10px; }
  .tabs { justify-content: flex-start; }
  .facts { grid-template-columns: 1fr; }
  .facts div, .facts div + div { padding: 22px 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
  .copy p { font-size: 17px; }
  .code pre { font-size: 12.5px; padding: 22px 18px; }
  .foot nav { margin-left: 0; }
}
