/* Splitou web — design system (shared by guest share page, invites, landing and legal pages). */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('/fonts/PlusJakartaSans-400.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('/fonts/PlusJakartaSans-600.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('/fonts/PlusJakartaSans-700.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('/fonts/PlusJakartaSans-800.ttf') format('truetype'); }

:root {
  --indigo: #5B4BFF;
  --violet: #9B4DFF;
  --coral: #FF5C8A;
  --peach: #FF7A6B;
  --amber: #FFB020;
  --night: #0E0F2C;
  --ink: #17183B;
  --muted: #6B6E91;
  --line: #E7E7F3;
  --bg: #F6F5FF;
  --card: #FFFFFF;
  --soft: #EFEDFF;
  --danger: #E5484D;
  --grad: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 55%, var(--coral) 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,75,255,.12), rgba(255,92,138,.12));
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px -12px rgba(27, 15, 92, .25);
  --shadow-lg: 0 24px 60px -20px rgba(27, 15, 92, .45);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F3F2FF;
    --muted: #A3A5C8;
    --line: #26284F;
    --bg: #0B0C24;
    --card: #15163A;
    --soft: #1E1F4A;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: var(--indigo); text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 10px; box-shadow: var(--shadow); }
.topbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255,92,138,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,92,138,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,92,138,0); } 100% { box-shadow: 0 0 0 0 rgba(255,92,138,0); } }

/* ---------- hero card */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px; color: #fff;
  background: var(--grad); box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero::before { width: 260px; height: 260px; right: -80px; top: -110px; }
.hero::after { width: 180px; height: 180px; left: -60px; bottom: -90px; }
.hero > * { position: relative; }
.hero .eyebrow { font-size: 13px; font-weight: 600; opacity: .85; }
.hero h1 { margin: 4px 0 2px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.hero .meta { font-size: 14px; opacity: .9; }
.hero .total { margin-top: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero .total strong { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.progress { margin-top: 14px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; position: relative; }
.progress > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.progress .claimed { background: rgba(255,255,255,.45); }
.progress .paid { background: #fff; }
.legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; opacity: .92; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* ---------- sections */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 4px 10px; }
.section-title h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.section-title small { color: var(--muted); font-weight: 600; font-size: 13px; }
.hint { color: var(--muted); font-size: 13.5px; margin: -4px 4px 12px; }

/* ---------- items */
.items { display: flex; flex-direction: column; gap: 10px; }
.item {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 14px 14px 14px 16px; border-radius: var(--radius); background: var(--card);
  border: 2px solid transparent; box-shadow: 0 1px 0 var(--line); transition: transform .15s ease, border-color .2s, background .2s, opacity .2s;
  text-align: left; width: 100%;
}
.item:active { transform: scale(.985); }
.item .name { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.item .sub { grid-column: 1; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item .price { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 800; font-size: 16px; }
.item .price small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.item.mine { border-color: var(--indigo); background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; }
.item.mine .check { opacity: 1; transform: scale(1); }
.item.taken { opacity: .55; }
.item.taken .name { text-decoration: line-through; text-decoration-color: rgba(107,110,145,.5); }
.item.locked::after { content: '🔒'; position: absolute; top: 8px; right: 10px; font-size: 11px; }
.item.pending { pointer-events: none; }
.item.pending::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(155,77,255,.12), transparent); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.check { position: absolute; left: -9px; top: -9px; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; opacity: 0; transform: scale(.4); transition: all .25s cubic-bezier(.3,1.6,.5,1); box-shadow: var(--shadow); }
.avatars { display: inline-flex; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 800; border: 2px solid var(--card); margin-left: -6px; text-transform: uppercase; }
.avatars .avatar:first-child { margin-left: 0; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; margin: 0; border: 0; }
.tag { padding: 2px 8px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 700; color: var(--indigo); }
.tag.coral { color: var(--coral); background: rgba(255,92,138,.12); }
.item-actions { grid-column: 1 / -1; display: none; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.item.open .item-actions { display: flex; }
.mini-btn { padding: 8px 12px; border-radius: 12px; background: var(--soft); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.mini-btn.active { background: var(--grad); color: #fff; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 12px; padding: 2px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; font-weight: 800; }
.stepper button:disabled { opacity: .3; }
.stepper span { min-width: 34px; text-align: center; font-weight: 800; }

/* ---------- people */
.people { background: var(--card); border-radius: var(--radius); padding: 6px 14px; box-shadow: 0 1px 0 var(--line); }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; font-size: 15px; }
.person .who span { font-size: 12.5px; color: var(--muted); }
.person .amt { text-align: right; font-weight: 800; }
.status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; display: inline-block; margin-top: 2px; }
.status.paid { color: #fff; background: var(--indigo); }
.status.confirmed { color: #fff; background: var(--grad); }
.status.pending { color: var(--muted); background: var(--soft); }

/* ---------- bottom bar */
.spacer-bottom { height: calc(130px + var(--safe-bottom)); }
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
  transform: translateY(0); transition: transform .3s ease;
}
.bottombar .inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bottombar .mine-total { flex: 1; }
.bottombar .mine-total small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.bottombar .mine-total strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border-radius: 16px; font-weight: 800; font-size: 16px; color: #fff; background: var(--grad);
  box-shadow: 0 12px 24px -10px rgba(91,75,255,.7); transition: transform .15s, filter .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--soft); color: var(--ink); box-shadow: none; }
.btn.dark { background: var(--night); }
.link-btn { color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }

/* ---------- sheets / modals */
.backdrop { position: fixed; inset: 0; background: rgba(8, 8, 30, .5); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .25s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 92dvh; overflow: auto;
  background: var(--card); border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + var(--safe-bottom));
  transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.9,.25,1); box-shadow: var(--shadow-lg);
}
.sheet.show { transform: translateY(0); }
.sheet .grabber { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.sheet p { margin: 0 0 16px; color: var(--muted); }
@media (min-width: 640px) { .sheet { max-width: 520px; margin: 0 auto; bottom: 24px; border-radius: 28px; } }
.field { display: block; width: 100%; padding: 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); font-size: 17px; font-weight: 600; outline: none; transition: border-color .2s; }
.field:focus { border-color: var(--indigo); }
.stack { display: flex; flex-direction: column; gap: 10px; }

.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: 18px; color: #fff; font-weight: 800; font-size: 16px; min-height: 92px; box-shadow: var(--shadow); text-align: left; transition: transform .15s; }
.pay-btn:active { transform: scale(.97); }
.pay-btn small { font-weight: 600; font-size: 12px; opacity: .85; }
.pay-btn .logo { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.pay-wero { background: linear-gradient(135deg, #1D1D1B, #3A3A36); }
.pay-wero .logo { background: #FFF48D; color: #1D1D1B; }
.pay-lydia { background: linear-gradient(135deg, #0A7BFF, #3F9BFF); }
.pay-revolut { background: linear-gradient(135deg, #111216, #2B2D35); }
.pay-paypal { background: linear-gradient(135deg, #003087, #0070E0); }
.pay-other { background: var(--soft); color: var(--ink); box-shadow: none; }

.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1px dashed var(--line); margin-bottom: 10px; }
.copy-row span { color: var(--muted); font-size: 12.5px; font-weight: 600; display: block; }
.copy-row b { font-size: 17px; word-break: break-all; }
.copy-row button { padding: 9px 14px; border-radius: 12px; background: var(--soft); font-weight: 800; font-size: 13.5px; color: var(--indigo); flex-shrink: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 10px 38px; color: var(--ink); font-size: 14.5px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--indigo); font-weight: 800; display: grid; place-items: center; font-size: 13px; }

/* ---------- states */
.empty { text-align: center; padding: 60px 20px; }
.empty .emoji { font-size: 56px; }
.empty h1 { font-size: 24px; margin: 12px 0 6px; }
.empty p { color: var(--muted); margin: 0 0 22px; }
.paid-card { border-radius: var(--radius); padding: 18px; background: var(--grad-soft); border: 1px solid rgba(91,75,255,.2); display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.paid-card .big { font-size: 34px; }
.paid-card b { display: block; font-size: 16px; }
.paid-card span { color: var(--muted); font-size: 13.5px; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -140%); z-index: 80; background: var(--night); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow-lg); transition: transform .35s cubic-bezier(.2,.9,.25,1), opacity .25s, visibility 0s .35s; max-width: 92vw; text-align: center; opacity: 0; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,.9,.25,1), opacity .25s; }
.toast.error { background: var(--danger); }

footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 16px 20px; }
footer.site a { color: var(--muted); font-weight: 700; }
.app-promo { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 0 var(--line); margin-top: 22px; }
.app-promo img { width: 44px; height: 44px; border-radius: 12px; }
.app-promo div { flex: 1; font-size: 13.5px; color: var(--muted); }
.app-promo b { color: var(--ink); display: block; font-size: 14.5px; }

.fade-in { animation: fadeIn .45s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.pop { animation: pop .35s ease; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- landing & legal */
.landing-hero { padding: 40px 0 20px; text-align: center; }
.landing-hero img.logo { width: 96px; height: 96px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.landing-hero h1 { font-size: clamp(32px, 7vw, 48px); line-height: 1.05; letter-spacing: -.03em; margin: 20px 0 12px; font-weight: 800; }
.landing-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-hero p { color: var(--muted); font-size: 18px; max-width: 460px; margin: 0 auto 26px; }
.stores { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--night); color: #fff; font-weight: 700; min-width: 180px; justify-content: center; }
@media (prefers-color-scheme: dark) { .store-btn { background: #fff; color: var(--night); } }
.features { display: grid; gap: 12px; margin: 34px 0; }
.feature { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 0 var(--line); display: flex; gap: 14px; }
.feature .ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; background: var(--grad-soft); display: grid; place-items: center; font-size: 22px; }
.feature h3 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.legal { background: var(--card); border-radius: var(--radius); padding: 22px; margin: 10px 0 30px; box-shadow: 0 1px 0 var(--line); }
.legal h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink); font-size: 15px; }
.legal .muted { color: var(--muted); }
.lang-switch { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; }
.lang-switch button { padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--muted); }
.lang-switch button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
