/* Stash landing page — design tokens mirror the app (lib/core/theme.dart). */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("assets/fonts/PlusJakartaSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("assets/fonts/PlusJakartaSans-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("assets/fonts/PlusJakartaSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("assets/fonts/PlusJakartaSans-ExtraBold.ttf") format("truetype"); }

:root {
  --page: #F4F8F9;
  --card: #FFFFFF;
  --subtle: #F0F5F5;
  --primary: #007F88;
  --primary-dark: #075F68;
  --primary-tint: #E2F8F5;
  --accent: #24B9B4;
  --text: #102A32;
  --muted: #647A80;
  --border: #DCE7E9;
  --income: #0B9D70;
  --expense: #E24B4B;
  --grad-cta: linear-gradient(135deg, #007F88 0%, #00A6A6 100%);
  --grad-hero: linear-gradient(125deg, #073F49 0%, #086C73 54%, #00989A 100%);
  --shadow-card: 0 5px 18px rgba(26, 69, 76, .06);
  --shadow-phone: 0 30px 60px rgba(3, 68, 76, .28), 0 8px 20px rgba(3, 68, 76, .18);
  --r-card: 20px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--page); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--subtle); padding: .1em .4em; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 40px); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--grad-cta); color: #fff; font: 700 15px/1 var(--font); text-decoration: none; padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 127, 136, .28); transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 127, 136, .34); }
.btn small { font-weight: 600; opacity: .85; font-size: 12.5px; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--lg { padding: 16px 26px; font-size: 16px; }
.btn--sm { padding: 10px 18px; font-size: 14px; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--primary-dark); border: 1.5px solid var(--border); box-shadow: none; }
.btn--ghost:hover { background: #fff; box-shadow: var(--shadow-card); }
.btn--light { background: #fff; color: var(--primary-dark); box-shadow: 0 12px 30px rgba(3, 40, 46, .3); }
.pill { display: inline-block; background: var(--primary-tint); color: var(--primary-dark); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(244, 248, 249, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(220, 231, 233, .7); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { border-radius: 10px; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; opacity: .8; }
.nav__links a:not(.btn):hover { opacity: 1; color: var(--primary); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav__toggle span { width: 22px; height: 2.5px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: 64px 0 96px; background:
  radial-gradient(900px 480px at 85% 8%, rgba(36, 185, 180, .22), transparent 60%),
  radial-gradient(700px 420px at 0% 30%, rgba(0, 127, 136, .10), transparent 60%), var(--page); }
.hero__in { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; margin-bottom: 20px; }
.grad { background: var(--grad-cta); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.lead strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.hero__facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); }

.hero__visual { position: relative; min-height: 600px; }
.phone { margin: 0; background: #0f2329; border: 8px solid #0f2329; border-radius: 40px; overflow: hidden; box-shadow: var(--shadow-phone); aspect-ratio: 9 / 20; }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.hero__visual .phone { position: absolute; width: min(270px, 52%); }
.phone--front { right: 14%; top: 28px; z-index: 2; transform: rotate(3deg); }
.phone--back { right: -2%; top: 96px; z-index: 1; transform: rotate(10deg) scale(.94); }
.float { position: absolute; z-index: 3; background: #fff; border-radius: 16px; padding: 10px 14px; font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-card), 0 12px 30px rgba(3, 68, 76, .14); display: flex; align-items: center; gap: 8px; max-width: 240px; }
.float .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--income); box-shadow: 0 0 0 4px rgba(11, 157, 112, .18); }
.float--a { left: -2%; top: 150px; animation: bob 5s ease-in-out infinite; }
.float--b { left: 6%; bottom: 62px; color: var(--primary-dark); font-weight: 600; animation: bob 6s ease-in-out -2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---- Sections ---- */
.section { padding: 92px 0; }
.section--tint { background: linear-gradient(180deg, #ecf6f6, var(--page)); }
.section__head { max-width: 680px; margin-bottom: 44px; }
.section__head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.section h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }

/* ---- Feature cards ---- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--card); border-radius: var(--r-card); padding: 26px 22px; box-shadow: var(--shadow-card); border: 1px solid rgba(220, 231, 233, .6); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(26, 69, 76, .12); }
.card h3 { font-size: 1.08rem; font-weight: 800; margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-tint); }
.ico svg { width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Carousel ---- */
.carousel { position: relative; }
.carousel__track { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 36px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel__track::-webkit-scrollbar { display: none; }
.slide { margin: 0; flex: 0 0 auto; width: 250px; scroll-snap-align: center; }
.slide .phone { width: 100%; }
.slide figcaption { margin-top: 18px; color: var(--muted); font-size: .92rem; text-align: center; }
.slide figcaption strong { display: block; color: var(--text); font-size: 1rem; margin-bottom: 2px; }
.carousel__btn { position: absolute; top: 42%; z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--primary-dark); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-card); display: grid; place-items: center; padding-bottom: 4px; }
.carousel__btn:hover { background: var(--primary-tint); }
.carousel__btn--prev { left: -8px; }
.carousel__btn--next { right: -8px; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; }
.carousel__dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: var(--border); padding: 0; cursor: pointer; transition: width .2s, background .2s; }
.carousel__dots button[aria-selected="true"] { width: 26px; background: var(--primary); }

/* ---- Steps ---- */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0; margin: 0; }
.steps li { background: var(--card); border-radius: var(--r-card); padding: 28px 24px; box-shadow: var(--shadow-card); position: relative; }
.steps h3 { font-size: 1.12rem; font-weight: 800; margin: 18px 0 8px; }
.steps p { color: var(--muted); margin: 0; }
.num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--grad-cta); color: #fff; font-weight: 800; font-size: 18px; box-shadow: 0 8px 18px rgba(0, 127, 136, .25); }

/* ---- Docs ---- */
.docs { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.docs__tabs { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 92px; }
.docs__tabs button { text-align: left; font: 700 15px/1.3 var(--font); color: var(--muted); background: transparent; border: 0; padding: 12px 16px; border-radius: 14px; cursor: pointer; transition: background .15s, color .15s; }
.docs__tabs button:hover { background: rgba(255, 255, 255, .7); color: var(--text); }
.docs__tabs button[aria-selected="true"] { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-card); }
.panel { background: #fff; border-radius: var(--r-card); padding: 34px 34px 28px; box-shadow: var(--shadow-card); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel h3 { font-size: 1.55rem; font-weight: 800; }
.panel h4 { font-size: 1.02rem; font-weight: 800; margin: 24px 0 8px; color: var(--primary-dark); }
.panel p, .panel li { color: #2a4249; }
.list { padding-left: 1.3em; margin: 0 0 1em; }
.list li { margin-bottom: .55em; padding-left: .2em; }
.list li::marker { color: var(--primary); font-weight: 800; }
.note { background: var(--primary-tint); border-radius: 14px; padding: 14px 18px; margin: 18px 0 0; color: var(--primary-dark); font-size: .95rem; }
.note--soft { background: var(--subtle); color: #2a4249; }
.chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--primary-tint); color: var(--primary-dark); font-weight: 600; font-size: .92rem; padding: 9px 16px; border-radius: 999px; }
details { border-bottom: 1px solid var(--border); padding: 4px 0; }
details:last-of-type { border-bottom: 0; }
summary { cursor: pointer; font-weight: 700; padding: 14px 28px 14px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--primary); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { margin: 0 0 14px; color: var(--muted); }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: 13px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec th { width: 34%; color: var(--muted); font-weight: 700; }

/* ---- Privacy ---- */
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.privacy__col { background: var(--card); border-radius: var(--r-card); padding: 26px 24px; box-shadow: var(--shadow-card); }
.privacy__col h3 { font-size: 1.1rem; font-weight: 800; }
.privacy__col p { color: var(--muted); margin: 0; }
.link { font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---- Download ---- */
.section--cta { background: var(--grad-hero); color: #fff; position: relative; overflow: hidden; }
.section--cta::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(36, 185, 180, .4), transparent 65%); }
.download { position: relative; text-align: center; }
.download__logo { margin: 0 auto 18px; border-radius: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.download h2 { color: #fff; }
.download > p { color: rgba(255, 255, 255, .8); }
.download__note { margin-top: 14px; font-weight: 600; color: #ffe29a; }
.download__meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 42px; margin: 30px 0 22px; }
.download__meta div { text-align: center; }
.download__meta dt { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); font-weight: 700; }
.download__meta dd { margin: 2px 0 0; font-weight: 800; font-size: 1.15rem; }
.hash { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 10px 12px; margin: 0 auto; max-width: 100%; text-align: left; }
.hash__label { font-weight: 800; font-size: 12px; letter-spacing: .08em; color: rgba(255, 255, 255, .7); flex: none; }
.hash code { background: none; color: #fff; font-size: 12px; overflow-wrap: anywhere; flex: 1; padding: 0; }
.hash__copy { flex: none; font: 700 13px var(--font); background: #fff; color: var(--primary-dark); border: 0; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.download__help { margin-top: 22px; font-size: .95rem; }
.download__help a { color: #fff; font-weight: 700; }

/* ---- Footer ---- */
.footer { padding: 34px 0; background: #0b2127; color: rgba(255, 255, 255, .75); }
.footer__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px; font-size: .92rem; }
.footer p { margin: 0; }
.footer .brand { color: #fff; font-size: 18px; }
.footer nav { display: flex; gap: 20px; }
.footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.phone--front.reveal.in { transform: rotate(3deg); }
.phone--back.reveal.in { transform: rotate(10deg) scale(.94); }
.phone--front.reveal, .phone--back.reveal { transform: translateY(24px) rotate(3deg); }

/* ---- Responsive ---- */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero__in { grid-template-columns: 1fr; gap: 20px; }
  .hero__visual { min-height: 560px; max-width: 520px; margin: 0 auto; width: 100%; }
  .docs { grid-template-columns: 1fr; }
  .docs__tabs { position: static; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: none; }
  .docs__tabs::-webkit-scrollbar { display: none; }
  .docs__tabs button { white-space: nowrap; background: #fff; }
}
@media (max-width: 760px) {
  .section { padding: 68px 0; }
  .nav__toggle { display: flex; }
  .nav__links { position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; background: var(--page); border-bottom: 1px solid var(--border); padding: 8px 20px 20px; display: none; }
  .nav__links.open { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav__links .btn { margin-top: 14px; }
  .hero { padding: 40px 0 70px; }
  .hero__visual { min-height: 500px; }
  .hero__visual .phone { width: 52%; }
  .phone--front { right: 18%; }
  .float--a { left: 0; top: 120px; }
  .float--b { left: 0; bottom: 30px; max-width: 200px; }
  .hero__cta .btn { width: 100%; }
  .steps, .privacy { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .panel { padding: 24px 20px; }
  .carousel__btn { display: none; }
  .slide { width: 220px; }
  .hash { flex-wrap: wrap; }
  .hash code { flex-basis: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone--front.reveal { transform: rotate(3deg); }
  .phone--back.reveal { transform: rotate(10deg) scale(.94); }
  .float, .panel { animation: none; }
}
