/* Better Friends on the web - the app's own pieces (round 316).
   Every value comes from the app: ios/.../DesignSystem/Theme.swift
   (BFTheme), docs/design-language.md and docs/brand/README.md. Shared by
   the home page and the legal pages; home.css and legal.css add their own.

   The phone screens are drawn at iPhone points (393 x 852) and scaled to
   the phone's width with one transform, so a 17pt title in the app is a
   17px title here and the mock-ups stay true to the app at any size. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --violet: #8F7BFF; --violet-deep: #6C55E0;
  --gold: #FFB84D;   --gold-deep: #D98E00;
  --aqua: #57E6C9;   --aqua-deep: #18B99A;
  --rose: #FF6B8B;   --rose-deep: #DE4368;
  --night: #0D0D15;  --plum: #1D1735;
  --ink-night: #F2F1F7; --muted-night: #8D8BA0;
  --display: "Nunito", ui-rounded, system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--violet); color: #120A33; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

/* ---------- the mark: "The b, pinged" (docs/brand/render-icon.mjs, as paths) ---------- */
.mark { display: inline-block; flex: none; width: 40px; aspect-ratio: 1; border-radius: 23%; background: var(--plum); }
.mark svg { width: 100%; height: 100%; display: block; }
.mark .ping, .mark .ring { transform-box: fill-box; transform-origin: center; }
.motion .mark.live .ping { animation: ping-drop 1.1s .5s var(--spring) both; }
.motion .mark.live .ring { animation: ping-ring 2.6s 1.4s ease-out infinite; }
@keyframes ping-drop { from { transform: translateY(-140%) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ping-ring { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Apple's "Download on the App Store" badge, as Apple supplies it
   (docs/brand/app-store-badge/). Never redrawn or recoloured; kept at 40px
   tall or more, with clear space around it. ---------- */
.store-btn { display: inline-block; flex: none; line-height: 0; border-radius: 9px; transition: transform .5s var(--spring), opacity .2s; }
.store-btn img { height: 52px; width: auto; }
.store-btn:active { transform: scale(.97); opacity: .8; }

/* ---------- web-scale atoms ---------- */
.chip { flex: none; display: inline-flex; align-items: center; gap: .4em; padding: .42em .85em; border-radius: 999px; font: 700 13px/1.15 var(--text); white-space: nowrap; }
.chip svg { width: 1.05em; height: 1.05em; }
.chip.t { background: var(--gold); color: #2A1A00; }
.chip.a { background: var(--violet); color: #120A33; }
.chip.y { background: var(--aqua); color: #04251E; }
.chip.n { background: rgba(255,255,255,.1); color: #C9C7D6; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); backdrop-filter: blur(14px); }
.tally { display: inline-flex; align-items: center; gap: .35em; padding: .32em .75em; border-radius: 999px; font: 800 13px var(--text); }
.tally::before { content: ""; width: .58em; height: .58em; border-radius: 50%; background: currentColor; }
.tally.y { color: var(--aqua); background: rgba(87,230,201,.16); }
.tally.m { color: var(--gold); background: rgba(255,184,77,.16); }
.tally.x { color: var(--rose); background: rgba(255,107,139,.16); }

/* ---------- the phone ---------- */
.phone { --wn: 300; position: relative; flex: none; overflow: clip; width: calc(var(--wn) * 1px); height: calc(var(--wn) * 2.0979px); border-radius: calc(var(--wn) * .165px); background: #07060c; box-shadow: inset 0 0 0 calc(var(--wn) * .005px) #3b374f, inset 0 0 0 calc(var(--wn) * .012px) #121019, 0 calc(var(--wn) * .1px) calc(var(--wn) * .18px) calc(var(--wn) * -.06px) rgba(12, 8, 30, .5); }
.phone > .scr { position: absolute; left: calc(var(--wn) * .03px); top: calc(var(--wn) * .03px); width: 393px; height: 852px; transform-origin: 0 0; transform: scale(calc(var(--wn) * .94 / 393)); border-radius: 58px; overflow: hidden; }

.scr { background: var(--night); color: var(--ink-night); font: 15px/1.35 var(--text); letter-spacing: -.01em; isolation: isolate; text-align: left; }
.scr::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px 420px at 100% 0, rgba(143,123,255,.12), transparent 70%), radial-gradient(380px 380px at 0 100%, rgba(87,230,201,.06), transparent 70%); }
.scr .island { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; z-index: 30; }
.scr .sb { position: absolute; inset: 0 0 auto; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 50px; font: 600 17px var(--text); z-index: 29; }
.scr .sb svg { height: 13px; width: auto; }
.scr .sb .r { display: flex; gap: 6px; align-items: center; }
.scr .pad { position: absolute; inset: 54px 0 0; padding: 6px 18px 130px; overflow: hidden; }
.scr .h1 { font: 850 30px/1.08 var(--display); letter-spacing: -.5px; }
.scr .sub { color: var(--muted-night); font-size: 15px; }
.scr .sec { display: flex; align-items: center; gap: 7px; margin: 16px 0 9px; font: 700 15px var(--text); color: #B7B5C6; }
.scr .sec svg { width: 16px; height: 16px; }
.scr .card { position: relative; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 14px; backdrop-filter: blur(18px) saturate(140%); }
.scr .card + .card { margin-top: 10px; }
.scr .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scr .nowrap { flex-wrap: nowrap; }
.scr .between { justify-content: space-between; }
.scr .chip { font-size: 12px; padding: 5px 10px; }
.scr .chip svg { width: 11px; height: 11px; }
.scr .chip.big { font-size: 14px; padding: 8px 13px; }
.scr .tally { font-size: 12px; padding: 4px 9px; }
.scr .link { color: var(--violet); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.scr .line { display: flex; align-items: center; gap: 8px; color: #CFCDDB; margin-top: 7px; font-size: 15px; }
.scr .line svg, .scr .link svg { width: 17px; height: 17px; flex: none; }
.scr .pic { position: relative; height: 150px; border-radius: 14px; overflow: hidden; background: #1A1926 center / cover; margin-bottom: 12px; }
.scr .pic > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scr .btn { display: grid; place-items: center; height: 52px; border-radius: 26px; background: var(--violet); color: #120A33; font: 800 17px var(--text); }
.scr .circ { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); color: #F2F1F7; }
.scr .circ svg { width: 19px; height: 19px; }
.scr .pill { padding: 9px 16px; border-radius: 20px; background: rgba(255,255,255,.08); color: var(--violet); font: 600 16px var(--text); }
.scr .pill.v { font-weight: 800; }
.scr .i17 { width: 18px; height: 18px; flex: none; } .scr .i14 { width: 14px; height: 14px; } .scr .i12 { width: 11px; height: 11px; }

.av { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--violet) center / cover; color: rgba(0,0,0,.8); font: 800 12px var(--text); box-shadow: 0 0 0 2px var(--night); transition: opacity .4s, transform .5s var(--spring); }
.avs { display: flex; align-items: center; }
.avs .av + .av { margin-left: -8px; }
.av.dim { opacity: .32; }
.av .tk { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 2px var(--night); display: grid; place-items: center; transform: scale(0); transition: transform .45s var(--spring); }
.av .tk svg { width: 8px; height: 8px; color: #04251E; stroke-width: 3.5; }
.av.ticked .tk { transform: scale(1); }

.scr .tabbar { position: absolute; left: 22px; right: 22px; bottom: 30px; height: 66px; border-radius: 33px; background: rgba(32,30,48,.78); backdrop-filter: blur(22px); border: 1px solid rgba(255,255,255,.08); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; z-index: 20; }
.scr .tab { display: grid; justify-items: center; gap: 3px; color: #8D8BA0; font: 700 10.5px var(--text); }
.scr .tab svg { width: 22px; height: 22px; }
.scr .tab.on { color: var(--violet); }
.scr .fab { justify-self: center; width: 60px; height: 60px; margin-top: -30px; border-radius: 50%; background: var(--violet); display: grid; place-items: center; box-shadow: 0 0 0 5px var(--night), 0 10px 26px rgba(143,123,255,.55); }
.scr .fab svg { width: 26px; height: 26px; color: #120A33; }

/* layers: one screen that changes as a story is scrolled */
.scr .layer, .scr .tlayer { position: absolute; opacity: 0; transition: opacity .55s var(--ease), transform .7s var(--ease); transform: translateY(24px) scale(.985); pointer-events: none; }
.scr .layer { inset: 0; }
.scr .tlayer { left: 0; right: 0; top: 0; }
.scr .layer[data-on], .scr .tlayer[data-on] { opacity: 1; transform: none; }

/* the propose form */
.scr .field { margin-top: 12px; padding: 13px 14px; border-radius: 18px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); }
.scr .field label { display: block; margin-bottom: 6px; color: var(--muted-night); font: 700 13px var(--text); }
.scr .val { display: flex; align-items: center; gap: 7px; font: 600 16px var(--text); }
.scr .val svg { width: 17px; height: 17px; color: var(--violet); }
.scr .val.big { font: 800 21px var(--display); letter-spacing: -.3px; }
.scr .caret { display: inline-block; width: 2px; height: 22px; background: var(--violet); margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.scr .opt { display: flex; gap: 6px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.06); transition: opacity .4s, transform .5s var(--spring); }
.scr .opt:first-of-type { border-top: 0; }
.scr .stepper { display: inline-flex; align-items: center; gap: 12px; padding: 5px 6px; border-radius: 20px; background: rgba(255,255,255,.08); font: 700 15px var(--text); }
.scr .stepper i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: rgba(255,255,255,.1); color: var(--violet); }

/* votes, quorum, the vote sheet */
.scr .quorum { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 10px; }
.scr .quorum i { display: block; height: 100%; width: calc(var(--q, 0) * 100%); background: var(--aqua); border-radius: 4px; transition: width .6s var(--ease); }
.scr .cta { position: absolute; left: 18px; right: 18px; bottom: 44px; z-index: 10; }

/* receipt and money rows */
.scr .item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.07); align-items: center; transition: opacity .45s, transform .55s var(--spring); }
.scr .item:first-child { border-top: 0; }
.scr .item b { font: 600 15px var(--text); }
.scr .item .p { font: 700 15px var(--text); font-variant-numeric: tabular-nums; }
.scr .item small { color: var(--muted-night); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.scr .item small .av, .scr .item small .avs .av { width: 18px; height: 18px; font-size: 9px; }
.scr .item small .avs .av + .av { margin-left: -6px; }
.scr .item .tk { display: none; }
.scr .claim { font: 800 12px var(--text); color: var(--violet); background: rgba(143,123,255,.14); padding: 5px 10px; border-radius: 99px; justify-self: end; transition: background .3s, color .3s; }
.scr .claim.mine { background: var(--violet); color: #120A33; }
.scr .rthumb { position: relative; flex: none; width: 58px; height: 76px; border-radius: 8px; background: #F4F1E8; padding: 9px 8px; display: grid; gap: 5px; align-content: start; transform: rotate(-4deg); }
.scr .rthumb i { height: 3px; border-radius: 2px; background: #C9C3B5; }
.scr .rthumb i:nth-child(odd) { width: 70%; }
.scr .rthumb b { height: 4px; border-radius: 2px; background: #6E6A84; margin-top: 3px; }
.scr .big-n { font: 850 28px var(--display); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }

/* trips: the stage rail (BFStageRail), stays, travel, days */
.scr .rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.scr .rail span { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 0; border-radius: 10px; font: 800 12px var(--text); color: var(--muted-night); border: 1.5px solid rgba(255,255,255,.1); transition: background .45s, color .45s, border-color .45s; }
.scr .rail svg { width: 10px; height: 10px; stroke-width: 3.5; display: none; }
.scr .rail i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: none; }
.scr .rail .done { background: rgba(143,123,255,.16); color: var(--violet); border-color: transparent; }
.scr .rail .done svg { display: block; }
.scr .rail .live { border-color: var(--gold); color: var(--gold); }
.scr .rail .live i { display: block; }
.scr .react { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--muted-night); font: 800 13px var(--text); flex: none; transition: background .3s, color .3s; }
.scr .react svg { width: 14px; height: 14px; }
.scr .react.on { background: rgba(255,107,139,.16); color: var(--rose); }
.scr .react.on svg { fill: currentColor; }
.scr .booked { position: absolute; right: 8px; top: 8px; transform: scale(0); transition: transform .5s var(--spring); }
.scr .booked.on { transform: none; }
.scr .tbtn { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; padding: 11px; border-radius: 12px; background: var(--violet); color: #fff; font: 850 14px var(--text); transition: background .35s, color .35s; }
.scr .tbtn svg { width: 16px; height: 16px; }
.scr .tbtn.mine { background: rgba(143,123,255,.14); color: var(--violet); }
.scr .lbl { color: var(--muted-night); font: 700 12px var(--text); }
.scr .day + .day { margin-top: 12px; }
.scr .stop { display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); font-weight: 600; transition: opacity .45s, transform .55s var(--spring); }
.scr .hop { display: flex; align-items: center; gap: 6px; margin: 6px 0 0 14px; color: var(--muted-night); font: 700 12.5px var(--text); transition: opacity .45s; }
.scr .hop svg { width: 14px; height: 14px; }
.scr .pay { white-space: nowrap; padding: 10px 14px; border-radius: 99px; background: var(--violet); color: #120A33; font: 800 14px var(--text); transition: background .35s, color .35s; }
.scr .pay.done { background: var(--aqua); color: #04251E; }
.scr .off { opacity: 0; transform: translateY(10px); }

/* the welcome film */
.scr .wv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scr .wshade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), transparent 30%, transparent 60%, rgba(0,0,0,.45)); }
.scr .wtxt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; color: #fff; }
.scr .wswipe { position: absolute; left: 0; right: 0; bottom: 70px; display: grid; justify-items: center; gap: 4px; color: #fff; font: 700 14px var(--text); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.scr .wswipe svg { width: 30px; height: 18px; stroke-width: 2.6; }
.motion .scr .wswipe { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

/* push notification (iOS banner) */
.push { display: grid; grid-template-columns: 38px 1fr auto; gap: 4px 11px; align-items: center; padding: 12px 14px; border-radius: 22px; background: rgba(40,38,56,.78); backdrop-filter: blur(24px) saturate(160%); color: #F2F1F7; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); font: 14px/1.3 var(--text); }
.push .mark { width: 38px; grid-row: span 2; border-radius: 9px; }
.push b { font-weight: 650; } .push time { color: #A9A6BA; font-size: 12.5px; }
.push p { margin: 0; grid-column: 2 / 4; color: #E2E0EC; }

/* ---------- motion primitives (switched on by bf.js unless Reduce Motion) ---------- */
.motion [data-rv] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.motion [data-rv].in { opacity: 1; transform: none; }
.motion [data-rv="scale"] { transform: scale(.92); }
[data-px], [data-tilt] { will-change: transform; }
.confetti { position: absolute; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
