/* Even Splits website: the app's "Postcard" design system on the web.
   Ocean for trust, Sunset for actions only, sand backgrounds, drawn covers.
   Every animation respects prefers-reduced-motion. */

:root {
  --ocean: #2E7DBA;
  --ocean-deep: #1F5F91;
  --ocean-dark: #2669A0;
  --sky: #7FC6FD;
  --sky-soft: #E6F1FA;
  --sunset: #F68712;
  --sunset-soft: #FFF1E2;
  --sunset-text: #A24F00;
  --sun: #FFD36E;
  --sand: #F4F6FA;
  --card: #FFFFFF;
  --line: #EEF1F5;
  --track: #E8ECF2;
  --ink: #101621;
  --ink-soft: #3B4352;
  --muted: #5B6475;
  --green: #0E7C3A;
  --green-soft: #E3F7EA;
  --red: #C8341B;
  --red-soft: #FDECEA;

  --food: #E2670C;  --food-bg: #FFF1E6;
  --travel: #B07F00; --travel-bg: #FFF6D9;
  --stay: #6B4EE6;  --stay-bg: #F0ECFF;
  --fun: #D23C78;   --fun-bg: #FDE8F0;
  --shop: #0F8F78;  --shop-bg: #E3F7F3;

  --r-sm: 12px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow: 0 10px 30px rgba(16, 22, 33, .08);
  --shadow-lg: 0 24px 60px rgba(16, 22, 33, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pop: cubic-bezier(.3, 1.5, .5, 1);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sand); color: var(--ink);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ocean); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ocean-deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 246, 250, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--track); background: rgba(255, 255, 255, .9); }
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 19px var(--display); }
.brand .tile { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(46, 125, 186, .3); }
.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav-links a:hover { background: #fff; color: var(--ink); }
.nav-links .btn { margin-left: 6px; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 18px; border: 0; cursor: pointer;
  font: 700 16px var(--body); text-decoration: none; white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-action { background: var(--sunset); color: #fff; box-shadow: 0 8px 20px rgba(246, 135, 18, .35); }
.btn-action:hover { color: #fff; background: #EA7C08; box-shadow: 0 12px 26px rgba(246, 135, 18, .42); }
.btn-primary { background: var(--ocean); color: #fff; }
.btn-primary:hover { background: var(--ocean-deep); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--track); }
.btn-ghost:hover { color: var(--ink); border-color: #D5DBE4; }
.btn-sm { height: 40px; padding: 0 16px; border-radius: 14px; font-size: 14px; }
.btn[disabled] { background: #C9CFD8; box-shadow: none; cursor: not-allowed; }

/* ---------- Cards, chips, money ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; font: 600 14px var(--body); background: #fff; color: var(--ink); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 10px; background: #fff; color: var(--ocean-deep); font: 700 12px var(--body); }
.plus { color: var(--green); font-weight: 800; }
.minus { color: var(--red); font-weight: 800; }
.label { font: 700 13px var(--body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 14px var(--body); flex-shrink: 0; border: 2px solid #fff; }
.av-1 { background: #FFE3C8; color: #9A4A00; } .av-2 { background: #E5DEFF; color: #4B32B8; }
.av-3 { background: #D7F3EC; color: #0B6B58; } .av-4 { background: #FDE1EC; color: #A3245A; }
.av-5 { background: #DCEBFA; color: #1F5F91; }
.stack { display: flex; } .stack .avatar + .avatar { margin-left: -9px; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes drift { from { transform: translateX(-10%); } to { transform: translateX(110%); } }
@keyframes wave { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-24px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes join-left { from { transform: translateX(-26px) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes join-right { from { transform: translate(26px, -10px) rotate(14deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
.sun { animation: bob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.cloud { animation: drift linear infinite; }
.waves { animation: wave 9s ease-in-out infinite; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--ocean); animation: spin .8s linear infinite; }

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

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #C9D2DE; padding: 56px 0 40px; margin-top: 40px; }
.footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer a { color: #fff; text-decoration: none; display: block; padding: 4px 0; font-weight: 500; }
.footer a:hover { color: var(--sky); }
.footer .brand { color: #fff; margin-bottom: 12px; }
.footer small { display: block; margin-top: 28px; color: #8A95A6; grid-column: 1 / -1; }
@media (max-width: 700px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .about { grid-column: 1 / -1; } }

/* ---------- Simple pages (legal, support, join) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--sky); color: #fff; padding: 56px 0 96px; }
.page-hero h1 { font-size: clamp(34px, 6vw, 56px); }
.page-hero p { color: rgba(255, 255, 255, .92); margin-top: 10px; font-size: 18px; max-width: 620px; }
.page-hero .scene { position: absolute; inset: auto 0 0 0; height: 120px; }
.page-body { margin-top: -56px; position: relative; padding-bottom: 32px; }
.prose { padding: clamp(24px, 4vw, 44px); max-width: 820px; }
.prose h2 { font-size: 24px; margin: 28px 0 8px; }
.prose h3 { font-size: 19px; margin: 22px 0 6px; }
.prose p { margin: 0 0 14px; color: var(--ink-soft); }
.prose ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-soft); }
.prose li { margin: 4px 0; }
.prose .meta { color: var(--muted); font-size: 14px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.note { padding: 14px 16px; border-radius: 14px; background: var(--sunset-soft); color: #5A3410; font-size: 15px; }
