/* The Fundz website. Fundz's own colours (the app's blue, near-black, a soft cream) and its typeface, Funnel Display.
   Built after looking at the strong fintech pages: a full-bleed brand-colour first screen with big phones stepping out of it,
   small live cards moving around them, a grid of little interface cards, a dark walk-through, a loud footer. */
:root {
  --bg: #F6F6F3;
  --card: #FFFFFF;
  --ink: #15161A;
  --night: #0F1013;
  --muted: #5F626B;
  --line: #E6E6E1;
  --blue: #2D5BFF;
  --blue-deep: #1B3FD0;
  --blue-soft: #E8EEFF;
  --green: #1FA971;
  --amber: #E8A317;
  --red: #E2483D;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --font: "Funnel Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.035em; }
p { margin: 0; }

.eyebrow { margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--blue); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 44ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 32px; border-radius: 999px; font: 600 17px var(--font); text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; transition: background 160ms, color 160ms, border-color 160ms, transform 160ms; }
.btn:active { transform: scale(0.97); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: var(--ink); color: #fff; }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; background: transparent; }
.btn-ghost:hover { background: #fff; color: var(--blue); border-color: #fff; }

/* the bar: sits on the blue, turns cream and ink once the page has moved */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 36px; padding: 18px var(--gutter); color: #fff; transition: background 220ms, color 220ms, box-shadow 220ms; }
.top .on-cream { display: none; }
.top.scrolled { background: rgba(246, 246, 243, .92); backdrop-filter: blur(12px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.top.scrolled .on-blue { display: none; } .top.scrolled .on-cream { display: block; }
.brand img { height: 30px; width: auto; }
.menu { display: flex; gap: 32px; margin-left: auto; }
.menu a { font-size: 16px; font-weight: 500; text-decoration: none; opacity: .86; transition: opacity 150ms; }
.menu a:hover { opacity: 1; }
.top-cta { height: 46px; padding: 0 24px; font-size: 15px; }
.top.scrolled .top-cta { background: var(--blue); color: #fff; } .top.scrolled .top-cta:hover { background: var(--blue-deep); }

/* ---------- the first screen ---------- */
.hero { position: relative; background: radial-gradient(70% 90% at 82% 8%, rgba(120, 156, 255, .55) 0%, rgba(120, 156, 255, 0) 60%), linear-gradient(165deg, #3463FF 0%, #1B3FD0 100%); color: #fff; border-radius: 0 0 clamp(36px, 5vw, 72px) clamp(36px, 5vw, 72px); }
.hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.4px); background-size: 26px 26px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(16px, 3vw, 48px); align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(120px, 14vh, 160px) var(--gutter) 0; min-height: min(92vh, 900px); }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: 14px; font-weight: 500; margin-bottom: 26px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #7CF2B6; box-shadow: 0 0 0 4px rgba(124, 242, 182, .25); }
.hero h1 { font-size: clamp(46px, 6.4vw, 96px); line-height: .96; letter-spacing: -0.05em; margin-bottom: 26px; }
.hero h1 em { font-style: normal; color: #BCD0FF; }
.hero .lede { color: rgba(255, 255, 255, .84); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 22px; font-size: 15px; color: rgba(255, 255, 255, .72); }
.hero-copy { padding-bottom: clamp(40px, 8vh, 110px); }

/* the phones step out of the blue */
.stage { position: relative; align-self: end; height: clamp(440px, 50vw, 700px); margin-bottom: clamp(-150px, -9vw, -70px); }
.phone { position: absolute; bottom: 0; width: clamp(160px, 18vw, 270px); aspect-ratio: 540 / 1167; padding: 7px; border-radius: 44px; background: #0A0B0D; box-shadow: 0 0 0 1.5px #2B2D33 inset, 0 2px 4px rgba(10, 11, 13, .2), 0 40px 70px -24px rgba(8, 22, 90, .6); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.phone::before { content: ""; position: absolute; z-index: 2; top: 15px; left: 50%; width: 28%; height: 13px; border-radius: 99px; background: #0A0B0D; transform: translateX(-50%); }
.phone-c { z-index: 3; left: 50%; width: clamp(190px, 22vw, 330px); transform: translateX(-50%); }
.phone-l { z-index: 1; left: 3%; transform: translateY(-4%) rotate(-7deg) scale(.92); transform-origin: bottom center; }
.phone-r { z-index: 2; right: 0; transform: translateY(-4%) rotate(7deg) scale(.92); transform-origin: bottom center; }

/* small live cards, moving a little around the phones */
.float { position: absolute; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 18px 40px -14px rgba(8, 22, 90, .45); white-space: nowrap; }
.float b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.float small { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.float strong { margin-left: 8px; font-size: 16px; color: var(--green); font-weight: 700; }
.dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: #fff; flex: none; }
.dot svg { width: 20px; height: 20px; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--red); } .dot.wa { background: #25D366; }
.f1 { left: -13%; top: 24%; } .f2 { right: -9%; top: 3%; } .f3 { left: -2%; bottom: 17%; }

/* ---------- sections ---------- */
.head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.head h2, .plans h2 { font-size: clamp(34px, 4.8vw, 66px); line-height: 1; letter-spacing: -0.045em; max-width: 14ch; }

.features { padding: clamp(150px, 16vw, 230px) 0 clamp(64px, 8vw, 120px); scroll-margin-top: 60px; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(12px, 1.6vw, 22px); max-width: var(--max); margin: clamp(32px, 4vw, 56px) auto 0; padding: 0 var(--gutter); }
.tile { position: relative; overflow: hidden; border-radius: 36px; padding: clamp(24px, 2.8vw, 40px); background: var(--card); border: 1px solid var(--line); min-height: 340px; }
.tile h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 12px; line-height: 1.05; }
.tile p { color: var(--muted); font-size: 17px; max-width: 34ch; }
.t-invoice { grid-column: span 7; background: var(--blue-soft); border-color: transparent; }
.t-invoice .copy { max-width: 48%; }
.t-pay { grid-column: span 5; background: var(--night); border-color: transparent; color: #fff; }
.t-pay p { color: rgba(255, 255, 255, .7); }
.t-report { grid-column: span 5; }
.t-more { grid-column: span 7; background: linear-gradient(160deg, #3463FF, #1B3FD0); border-color: transparent; color: #fff; min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.t-more h3 { max-width: 16ch; }

/* invoice paper */
.paper { position: absolute; right: clamp(20px, 3vw, 44px); bottom: -22px; width: min(42%, 290px); background: #fff; border-radius: 22px 22px 0 0; padding: 20px 20px 36px; box-shadow: 0 30px 60px -26px rgba(31, 68, 214, .45); transform: rotate(3deg); }
.paper-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 16px; }
.paper-top span { font-weight: 800; letter-spacing: .12em; font-size: 12px; color: var(--muted); }
.paper-due { background: var(--blue-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.paper-due small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.paper-due strong { font-size: 26px; letter-spacing: -0.03em; color: var(--blue); }
.paper-lines { display: grid; gap: 9px; margin-bottom: 18px; }
.paper-lines i { display: block; height: 8px; border-radius: 6px; background: #EDEDF0; } .paper-lines i.s { width: 60%; }
.paper-send { display: inline-flex; padding: 10px 18px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; }

/* payment progress */
.progress { position: absolute; left: clamp(24px, 2.8vw, 40px); right: clamp(24px, 2.8vw, 40px); bottom: clamp(24px, 2.8vw, 40px); }
.progress .row { display: flex; justify-content: space-between; font-size: 14px; color: rgba(255, 255, 255, .68); }
.progress .row b { font-weight: 700; color: #FFC24D; }
.bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); margin: 12px 0; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #5C86FF, #8DB0FF); transition: width 1400ms var(--ease) 300ms; }
.t-pay.in .bar i { width: 22%; }

/* bars */
.chart { position: absolute; left: clamp(24px, 2.8vw, 40px); right: clamp(24px, 2.8vw, 40px); bottom: clamp(24px, 2.8vw, 40px); height: 130px; display: flex; align-items: flex-end; gap: clamp(6px, 1vw, 12px); }
.chart i { flex: 1; height: 0; border-radius: 10px 10px 4px 4px; background: #CFDBFF; transition: height 1000ms var(--ease); }
.chart i.hot { background: var(--blue); }
.t-report.in .chart i { height: var(--h); }
.t-report.in .chart i:nth-child(2) { transition-delay: 60ms; } .t-report.in .chart i:nth-child(3) { transition-delay: 120ms; } .t-report.in .chart i:nth-child(4) { transition-delay: 180ms; }
.t-report.in .chart i:nth-child(5) { transition-delay: 240ms; } .t-report.in .chart i:nth-child(6) { transition-delay: 300ms; } .t-report.in .chart i:nth-child(7) { transition-delay: 380ms; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 11px 18px; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .24); font-size: 16px; font-weight: 500; }

/* ---------- how it works (dark) ---------- */
.how { background: var(--night); color: #fff; border-radius: clamp(36px, 5vw, 72px); padding: clamp(64px, 8vw, 120px) 0 clamp(72px, 9vw, 130px); margin: 0 clamp(8px, 1.4vw, 20px); scroll-margin-top: 60px; }
.how .eyebrow { color: #86A4FF; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); max-width: var(--max); margin: clamp(40px, 5vw, 72px) auto 0; padding: 0 var(--gutter); }
.step { display: flex; flex-direction: column; align-items: flex-start; }
.phone.small { position: relative; bottom: auto; left: auto; right: auto; width: min(100%, 250px); margin: 0 0 28px; transform: none; box-shadow: 0 0 0 1.5px #2B2D33 inset, 0 30px 50px -24px rgba(0, 0, 0, .8); background: #1A1B1F; }
.num { font-size: 15px; font-weight: 700; letter-spacing: .1em; color: #86A4FF; margin-bottom: 10px; }
.step h3 { font-size: clamp(26px, 2.6vw, 36px); margin-bottom: 10px; }
.step p:last-child { color: rgba(255, 255, 255, .66); font-size: 17px; max-width: 28ch; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--gutter); scroll-margin-top: 40px; }
.plans .lede { margin-top: 18px; }
.panel { background: var(--blue); color: #fff; border-radius: 40px; padding: clamp(26px, 3.4vw, 48px); box-shadow: 0 44px 80px -40px rgba(31, 68, 214, .7); }
.panel .t { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.panel .t + input + .t { margin-top: 22px; }
.panel input[type=email] { width: 100%; height: 60px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); padding: 0 26px; font: 500 17px var(--font); outline: none; }
.panel input[type=email]:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 26px; padding: 20px 14px; text-align: center; cursor: pointer; transition: background 160ms, color 160ms; }
.opt input { display: none; }
.opt strong { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.opt span { font-size: 14px; opacity: .85; }
.opt.on { background: #fff; color: var(--blue); border-color: #fff; }
.panel button { width: 100%; height: 60px; margin-top: 26px; border: 0; border-radius: 999px; background: #fff; color: var(--blue); font: 700 18px var(--font); cursor: pointer; transition: background 160ms, color 160ms; }
.panel button:hover { background: var(--ink); color: #fff; }
.panel button:disabled { opacity: .65; }
.err { min-height: 22px; margin-top: 14px; font-size: 15px; font-weight: 500; color: #FFE1E1; }
.fine { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .72); text-align: center; }

/* ---------- the foot: loud ---------- */
.foot { background: var(--blue); color: #fff; border-radius: clamp(36px, 5vw, 72px) clamp(36px, 5vw, 72px) 0 0; padding: clamp(40px, 5vw, 72px) var(--gutter) 0; overflow: hidden; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; max-width: var(--max); margin: 0 auto; }
.by { font-size: 18px; color: rgba(255, 255, 255, .85); }
.by a { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid rgba(255, 255, 255, .6); }
.foot nav { display: flex; gap: 26px; }
.foot nav a { text-decoration: none; font-weight: 500; opacity: .85; } .foot nav a:hover { opacity: 1; }
.foot-mark { width: min(100%, 1120px); margin: clamp(28px, 5vw, 64px) auto -2.2vw; opacity: .16; }
.foot-line { position: absolute; width: 1px; height: 1px; overflow: hidden; }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease) var(--d, 0ms), transform 800ms var(--ease) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 800ms var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; } .hero-copy > :nth-child(3) { animation-delay: 160ms; } .hero-copy > :nth-child(4) { animation-delay: 240ms; } .hero-copy > :nth-child(5) { animation-delay: 300ms; }
  .phone-c { animation: up 1000ms var(--ease) 150ms both; }
  .phone-l { animation: upl 1000ms var(--ease) 300ms both; } .phone-r { animation: upr 1000ms var(--ease) 380ms both; }
  .float { animation: bob 6s ease-in-out infinite, pop 700ms var(--ease) 900ms both; }
  .f2 { animation-duration: 7s, 700ms; animation-delay: -2s, 1050ms; } .f3 { animation-duration: 8s, 700ms; animation-delay: -4s, 1200ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes up { from { opacity: 0; transform: translate(-50%, 90px); } to { opacity: 1; transform: translate(-50%, 0); } }
  @keyframes upl { from { opacity: 0; transform: translateY(100px) rotate(-7deg) scale(.92); } to { opacity: 1; transform: translateY(-4%) rotate(-7deg) scale(.92); } }
  @keyframes upr { from { opacity: 0; transform: translateY(100px) rotate(7deg) scale(.92); } to { opacity: 1; transform: translateY(-4%) rotate(7deg) scale(.92); } }
  @keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
  @keyframes pop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
}

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; padding-top: 120px; }
  .hero-copy { padding-bottom: 20px; }
  .stage { height: clamp(380px, 92vw, 560px); margin-bottom: -90px; }
  .phone { width: 34vw; } .phone-c { width: 42vw; }
  .f1 { left: 0; top: 8%; } .f2 { right: 0; top: 2%; } .f3 { display: none; }
  .features { padding-top: 150px; }
  .bento { grid-template-columns: 1fr; }
  .t-invoice, .t-pay, .t-report, .t-more { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .phone.small { width: 220px; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .menu a:not(:last-child) { display: none; }
  .menu { gap: 18px; } .top { gap: 14px; }
  .float b { font-size: 13px; } .float small { font-size: 11px; } .float { padding: 8px 12px 8px 8px; gap: 8px; } .dot { width: 32px; height: 32px; border-radius: 11px; } .dot svg { width: 16px; height: 16px; }
  .paper { width: 58%; }
  .f1 { left: 0; top: -2%; } .f2 { right: 0; top: 16%; }
  .foot nav { gap: 16px; }
}
