/* Gappo public website. Plain CSS, no build step. Brand: plum & saffron, the same purple as the apps (apps/*/src/theme.ts). */
@font-face { font-family: Jakarta; src: url(/fonts/jakarta-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Jakarta; src: url(/fonts/jakarta-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Jakarta; src: url(/fonts/jakarta-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Jakarta; src: url(/fonts/jakarta-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #1c1830;
  --muted: #5e5873;
  --brand: #5B34C2;
  --brand-dark: #432595;
  --brand-deep: #26123F;
  --brand-tint: #E9E1FB;
  --brand-soft: #B9A8EC;
  --saffron: #FF9F1C;
  --saffron-tint: #FFF1DC;
  --coral: #ef7b5a;
  --bg: #F7F5FB;
  --surface: #fff;
  --border: #ECE8F3;
  --danger: #b42318;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(38 18 63 / 6%), 0 12px 32px -12px rgb(38 18 63 / 18%);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 Jakarta, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .8rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 20; background: rgb(247 245 251 / 88%); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-color: var(--border); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.45rem; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.logo svg { width: 36px; height: 36px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--brand); }
@media (max-width: 860px) { .nav { display: none; } .top .btn { margin-left: auto; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 700 1rem Jakarta, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.saffron { background: var(--saffron); color: var(--ink); }
.btn.saffron:hover { background: #F08C00; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--border); }
.btn.small { height: 40px; padding: 0 18px; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; background: var(--brand-deep); color: #fff; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, rgb(124 91 214 / 55%), transparent 65%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 72px 0 88px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--saffron); }
.hero .lead { font-size: 1.2rem; color: #D8CEFA; max-width: 34ch; }
.hero .eyebrow { color: var(--brand-soft); }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.hero-points li { display: flex; gap: 12px; align-items: center; color: #EEE8FD; font-weight: 600; }
.hero-points svg { flex: none; width: 26px; height: 26px; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; padding: 48px 0 56px; gap: 36px; } }

/* ---------------------------------------------------------------- form card */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.apply { color: var(--ink); padding: 28px; }
.apply h2 { font-size: 1.5rem; margin-bottom: .2em; }
.apply .sub { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .field legend { font-weight: 700; font-size: .9rem; }
.field legend { padding: 0; margin-bottom: 6px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
input[type=text], input[type=tel] { height: 50px; width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 14px; font: 500 1rem Jakarta, system-ui, sans-serif; color: var(--ink); background: #FCFBFE; }
input[type=text]:focus, input[type=tel]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.phone { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; background: #FCFBFE; }
.phone:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.phone b { padding: 0 4px 0 14px; color: var(--muted); font-weight: 600; }
.phone input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border); font-weight: 600; font-size: .9rem; background: #FCFBFE; transition: all .12s; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 6px 0 18px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.apply .btn { width: 100%; }
.form-error { color: var(--danger); font-size: .9rem; font-weight: 600; margin: -4px 0 12px; }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 600; }
.done { text-align: center; padding: 18px 6px; }
.done svg { width: 72px; height: 72px; margin: 0 auto 14px; }

/* ---------------------------------------------------------------- sections */
section.block { padding: 96px 0; }
section.block.alt { background: var(--surface); }
.head { max-width: 640px; margin-bottom: 48px; }
.head.center { text-align: center; margin-inline: auto; }
.head p { color: var(--muted); font-size: 1.1rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 28px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-tint); color: var(--brand); font-weight: 800; font-size: 1.2rem; margin-bottom: 18px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* earnings */
.earn { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.rates { display: grid; gap: 12px; margin: 24px 0; }
.rate { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px; border-radius: 14px; background: var(--bg); }
.rate b { font-size: 1.25rem; }
.rate small { color: var(--muted); }
.calc { padding: 32px; background: var(--brand-deep); color: #fff; }
.calc label { display: block; font-weight: 700; margin-bottom: 4px; }
.calc output { font-weight: 800; color: var(--saffron); }
.calc input[type=range] { width: 100%; accent-color: var(--saffron); margin: 6px 0 22px; }
.calc .total { border-top: 1px solid rgb(255 255 255 / 15%); padding-top: 20px; margin-top: 4px; }
.calc .total strong { display: block; font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; color: #fff; line-height: 1.1; }
.calc .note { color: #B9A8EC; font-size: .85rem; margin: 12px 0 0; }
@media (max-width: 860px) { .earn { grid-template-columns: 1fr; } }

/* feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; }
.feature .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 28px; height: 28px; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }
.ico.brand { background: var(--brand-tint); color: var(--brand); }
.ico.saffron { background: var(--saffron-tint); color: #A85F00; }
.ico.coral { background: #fde7e0; color: #c4502f; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* payouts */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.ticks li::before { content: ""; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B34C2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; }
.ticks b { display: block; }
.ticks span { color: var(--muted); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* phone mockup */
.device { width: 290px; margin-inline: auto; border-radius: 40px; padding: 12px; background: #1A1030; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 45%); }
.screen { border-radius: 30px; overflow: hidden; background: var(--bg); color: var(--ink); aspect-ratio: 9 / 18.5; display: flex; flex-direction: column; font-size: 13px; }
.screen .bar { padding: 18px 18px 10px; }
.screen .bar small { color: var(--muted); display: block; }
.screen .bar b { font-size: 19px; font-weight: 800; }
.screen .tile { margin: 6px 14px; padding: 14px; border-radius: 16px; background: #fff; }
.screen .tile.dark { background: var(--brand); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.toggle { width: 44px; height: 26px; border-radius: 13px; background: #fff; position: relative; }
.toggle::after { content: ""; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); }
.screen .big { font-size: 24px; font-weight: 800; display: block; }
.screen .row { display: flex; gap: 8px; margin: 6px 14px; }
.screen .row .tile { margin: 0; flex: 1; }
.screen .withdraw { margin: auto 14px 18px; height: 44px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* eligibility */
.elig { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.elig div { padding: 22px; border-radius: 16px; background: var(--bg); }
.elig b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.elig span { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .elig { grid-template-columns: 1fr 1fr; } }

/* faq */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 16px; padding: 4px 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* closing call to action */
.cta { background: var(--brand); color: #fff; border-radius: 28px; padding: 56px; display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 .3em; }
.cta p { color: #D8CEFA; margin: 0; }

/* ---------------------------------------------------------------- footer */
footer { padding: 56px 0 40px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
footer nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
footer nav a:hover { color: var(--brand); }

/* ---------------------------------------------------------------- legal & small pages */
.doc { padding: 56px 0 80px; }
.doc article { max-width: 760px; margin-inline: auto; background: #fff; padding: clamp(24px, 5vw, 56px); border-radius: var(--radius); box-shadow: var(--shadow); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2em; }
.doc li { margin-bottom: .4em; }
.doc .updated { color: var(--muted); font-size: .92rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 1em; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.callout { background: var(--brand-tint); border-radius: 14px; padding: 16px 20px; margin: 0 0 1.4em; }
.invite-host { display: flex; gap: 16px; align-items: center; margin: 20px 0; padding: 18px; border-radius: 16px; background: var(--bg); }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-tint); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; color: var(--brand); flex: none; }
.code { font: 800 1.6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; background: var(--saffron-tint); padding: 10px 16px; border-radius: 12px; display: inline-block; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.calc .chip span { color: var(--ink); }
.calc .chip input:checked + span { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
#apply, .done, section[id] { scroll-margin-top: 84px; }
