/* Talli website — tokens mirror lib/core/utils/app_colors/app_colors.dart (V4) */
:root {
  --navy: #053373;
  --navy-deep: #032B61;
  --blue: #08408D;
  --blue-2: #1F57A2;
  --blue-3: #144894;
  --peri: #6195E0;
  --sky: #3C9EEA;
  --cyan: #34C8E8;
  --green: #9DF18F;
  --green-2: #4FDA38;
  --orange: #FB8639;
  --loss: #D5651B;
  --gold: #FFB400;
  --ink: #0A2147;
  --muted: #4E6283;
  --line: #DCE5F2;
  --paper: #F4F7FC;
  --white: #FFFFFF;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(3, 27, 66, .45);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Display type — the V4 stat-card voice: heavy, italic, uppercase */
.display {
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .95;
  margin: 0;
}
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-2);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 51, 115, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 10px 14px; border-radius: 999px; opacity: .88;
}
.nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.nav a.cta {
  opacity: 1; color: var(--navy-deep);
  background: linear-gradient(180deg, var(--green), var(--green-2));
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em;
  padding: 10px 18px;
}
.nav a.cta:hover { filter: brightness(1.05); }
@media (max-width: 640px) {
  .nav a:not(.cta) { display: none; }
  .brand img { height: 32px; }
}

/* ---------- Buttons / badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badges a { display: inline-block; border-radius: 10px; transition: transform .15s ease; }
.store-badges a:hover { transform: translateY(-2px); }
.store-badges img { height: 52px; width: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; border: 0; cursor: pointer;
  padding: 15px 26px; border-radius: 999px;
  color: var(--navy-deep);
  background: linear-gradient(180deg, var(--green), var(--green-2));
  box-shadow: 0 10px 24px -10px rgba(79, 218, 56, .7);
}
.btn.ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(52, 200, 232, .25), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(97, 149, 224, .35), transparent 60%),
    linear-gradient(160deg, var(--blue) 0%, var(--navy) 55%, var(--navy-deep) 100%);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding: 72px 0 96px;
}
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 5.4rem); }
.hero h1 .accent { white-space: nowrap; }
.hero h1 .accent { color: var(--green); display: block; }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.86); max-width: 30ch; margin: 22px 0 32px; }
.get-app { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.qr {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  padding: 10px 16px 10px 10px; border-radius: 16px;
}
.qr img { width: 76px; height: 76px; background: #fff; padding: 6px; border-radius: 10px; }
.qr span { font-size: .82rem; line-height: 1.35; color: rgba(255,255,255,.8); max-width: 12ch; }
@media (hover: none) { .qr { display: none; } }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; width: 100%; color: var(--white); }

/* Phone mock — rebuilt from the V4 dashboard, not a screenshot */
.stage { position: relative; display: flex; justify-content: center; min-height: 600px; }
.phone {
  position: relative; width: 300px; height: 610px; border-radius: 46px; padding: 12px;
  background: linear-gradient(145deg, #2a3442, #0d1219);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.08);
  transform: rotate(4deg);
}
.screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden;
  background: linear-gradient(180deg, var(--blue) 0%, var(--navy) 100%);
  padding: 46px 16px 16px; display: flex; flex-direction: column; gap: 12px;
}
.screen::before { /* dynamic island */
  content: ""; position: absolute; top: 12px; left: 50%; translate: -50% 0;
  width: 92px; height: 26px; border-radius: 20px; background: #05080c;
}
.scr-top { display: flex; align-items: center; justify-content: space-between; }
.scr-top img.logo { height: 22px; width: auto; }
.scr-top .me { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--green); }
.scr-card {
  border-radius: 16px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(97,149,224,.30), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.12);
}
.scr-label { font-size: .64rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.85); }
.record { display: flex; gap: 8px; margin-top: 8px; }
.pill { flex: 1; text-align: center; border-radius: 999px; padding: 4px 0; font-weight: 900; font-style: italic; font-size: 1.35rem; line-height: 1.2; }
.pill small { display: block; font-size: .55rem; letter-spacing: .1em; opacity: .85; margin-top: -2px; }
.pill.w { background: linear-gradient(180deg, var(--green), var(--green-2)); color: var(--navy-deep); }
.pill.l { background: linear-gradient(180deg, var(--orange), var(--loss)); color: #fff; }
.pill.d { background: #D9D9D9; color: var(--navy-deep); }
.scr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scr-big { font-weight: 900; font-style: italic; font-size: 1.7rem; line-height: 1.1; margin-top: 4px; }
.scr-big.green { color: var(--green); }
.scr-grid .scr-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 92px; }
.scr-grid img { width: 36px; height: 36px; object-fit: contain; margin-top: 6px; }
.feed-item { display: flex; align-items: center; gap: 10px; }
.feed-item .avs { display: flex; }
.feed-item .avs img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--navy); margin-left: -8px; }
.feed-item .avs img:first-child { margin-left: 0; }
.feed-item p { margin: 0; font-size: .68rem; line-height: 1.35; color: rgba(255,255,255,.9); }
.feed-item b { color: #fff; }
.chip { font-size: .58rem; font-weight: 900; font-style: italic; padding: 3px 8px; border-radius: 999px; background: var(--green); color: var(--navy-deep); margin-left: auto; white-space: nowrap; }

.float {
  position: absolute; background: #fff; color: var(--ink); border-radius: 18px;
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 4px solid var(--blue);
}
.float .scr-label { color: var(--blue); font-size: .7rem; }
.float strong { display: block; font-weight: 900; font-style: italic; font-size: 1.5rem; line-height: 1.1; }
.float img { width: 44px; height: 44px; object-fit: contain; }
.float.f1 { top: 120px; left: calc(50% - 290px); transform: rotate(-5deg); }
.float.f2 { bottom: 90px; right: calc(50% - 300px); transform: rotate(5deg); }
.float.f1 strong { color: var(--green-2); }
.float.f2 strong { color: var(--blue); font-size: 1.05rem; text-transform: uppercase; }
.lettering-float { position: absolute; z-index: 3; width: 150px; bottom: 20px; left: calc(50% - 320px); transform: rotate(-8deg); filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); }

@media (max-width: 960px) {
  .float.f1 { left: calc(50% - 230px); }
  .float.f2 { right: calc(50% - 230px); }
  .lettering-float { display: none; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); text-align: center; padding: 48px 0 80px; }
  .hero .lede { margin-inline: auto; }
  .get-app { justify-content: center; }
  .store-badges { justify-content: center; }
  .stage { min-height: 560px; margin-top: 10px; }
}
@media (max-width: 420px) {
  .phone { width: 270px; height: 560px; }
  .float.f1 { left: -4px; top: 40px; }
  .float.f2 { right: -4px; }
  .float { padding: 8px 12px; }
  .float img { width: 32px; height: 32px; }
  .lettering-float { width: 120px; left: 0; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2 { text-wrap: balance; font-size: clamp(2.2rem, 4.6vw, 3.6rem); color: var(--blue); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 18px 0 0; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(97,149,224,.22), rgba(244,247,252,.6));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px 0; display: flex; flex-direction: column;
}
.step .num { font-weight: 900; font-style: italic; color: var(--peri); font-size: .95rem; letter-spacing: .08em; }
.step h3 { font-size: 1.9rem; color: var(--blue); margin: 4px 0 8px; }
.step p { margin: 0 0 18px; color: var(--muted); font-size: .98rem; }
.step .art { margin-top: auto; height: 230px; display: flex; align-items: flex-end; justify-content: center; }
.step .art img { max-height: 100%; width: auto; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step .art { height: 200px; } }

/* Gloat band */
.gloat {
  color: #fff; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(251,134,57,.22), transparent 60%),
    linear-gradient(160deg, var(--blue-2), var(--navy));
}
.gloat .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.gloat .section-head h2 { color: #fff; }
.gloat .section-head h2 .accent { color: var(--orange); }
.gloat .section-head p { color: rgba(255,255,255,.82); }
.gloat .eyebrow { color: var(--cyan); }
.gloat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gloat-tile {
  aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center; padding: 18px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  transition: transform .2s ease;
}
.gloat-tile:nth-child(odd) { transform: rotate(-3deg); }
.gloat-tile:nth-child(even) { transform: rotate(3deg); }
.gloat-tile:hover { transform: rotate(0) scale(1.05); }
.gloat-tile img { width: 78%; }
.gloat-tile figcaption { font-size: .7rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; text-align: center; }
.gloat-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.gloat-points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.9); }
.gloat-points li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; margin-top: 8px; background: var(--green); transform: rotate(45deg); }
@media (max-width: 860px) { .gloat .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .gloat-grid { gap: 10px; } .gloat-tile { padding: 12px; border-radius: 16px; } .gloat-tile figcaption { font-size: .6rem; } }

/* Stats */
.stats { background: var(--paper); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat {
  background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line);
  border-bottom: 5px solid var(--blue); box-shadow: 0 10px 30px -22px rgba(3,27,66,.5);
}
.stat .icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(180deg, var(--blue), var(--navy)); margin-bottom: 18px; }
.stat .icon img { height: 38px; width: 38px; object-fit: contain; }
.stat h3 { font-size: 1.45rem; color: var(--blue); margin-bottom: 8px; }
.stat p { margin: 0; color: var(--muted); }
.stat.green { border-bottom-color: var(--green-2); }
.stat.orange { border-bottom-color: var(--orange); }
@media (max-width: 860px) { .stat-grid { grid-template-columns: 1fr; } }

/* Final CTA */
.cta-band { padding: 0 0 96px; background: var(--paper); }
.cta-card {
  position: relative; overflow: hidden; border-radius: 32px; color: #fff;
  background:
    radial-gradient(500px 300px at 90% 100%, rgba(157,241,143,.25), transparent 60%),
    linear-gradient(140deg, var(--blue), var(--navy-deep));
  padding: 56px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center;
}
.cta-card h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.cta-card h2 .accent { color: var(--green); }
.cta-card p { color: rgba(255,255,255,.85); margin: 16px 0 28px; font-size: 1.1rem; }
.cta-card .lettering { width: 100%; max-width: 250px; justify-self: center; transform: rotate(-6deg); }
@media (max-width: 760px) {
  .cta-card { grid-template-columns: minmax(0, 1fr); padding: 40px 24px; text-align: center; }
  .cta-card .store-badges { justify-content: center; }
  .cta-card .lettering { max-width: 170px; grid-row: 1; margin-bottom: -8px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.75); padding: 56px 0 40px; font-size: .95rem; }
.site-footer .top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.site-footer .brand img { height: 60px; }
.site-footer nav { display: flex; gap: 48px; flex-wrap: wrap; }
.site-footer h4 { margin: 0 0 12px; color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* ---------- Inner pages (legal, contact) ---------- */
.page-hero {
  color: #fff; padding: 64px 0 56px;
  background: linear-gradient(160deg, var(--blue), var(--navy));
}
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.page-hero p { margin: 14px 0 0; color: rgba(255,255,255,.82); }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 56px 0 96px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .9rem; }
.toc h2 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; border-left: 3px solid transparent; }
.toc a:hover { color: var(--blue); background: var(--paper); border-left-color: var(--blue); }
.prose { max-width: 760px; font-size: 1.02rem; }
.prose h2 { font-size: 1.5rem; font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--blue); margin: 48px 0 12px; scroll-margin-top: 96px; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 28px 0 8px; color: var(--ink); }
.prose p, .prose li { color: #2b3d5c; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose a { color: var(--blue); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper); color: var(--blue); font-weight: 800; white-space: nowrap; }
.callout { background: var(--paper); border-left: 4px solid var(--green-2); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.callout.warn { border-left-color: var(--orange); }
.callout p { margin: 0; }
.caps { text-transform: uppercase; font-size: .93rem; }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--paper); border-radius: 16px; padding: 18px; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 56px 0 24px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  border-bottom: 5px solid var(--blue); display: flex; flex-direction: column; gap: 10px;
}
.contact-card.green { border-bottom-color: var(--green-2); }
.contact-card.orange { border-bottom-color: var(--orange); }
.contact-card h2 { font-size: 1.4rem; color: var(--blue); }
.contact-card p { margin: 0; color: var(--muted); }
.contact-card a.mail { margin-top: auto; font-weight: 800; color: var(--blue); text-decoration: none; word-break: break-all; }
.contact-card a.mail:hover { text-decoration: underline; }
.faq { padding: 32px 0 96px; max-width: 820px; }
.faq h2 { font-size: 2rem; color: var(--blue); margin-bottom: 20px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 12px; background: #fff; }
.faq summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.faq details p { margin: 12px 0 0; color: var(--muted); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* Download redirect page */
.download-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.download-page img.icon { width: 120px; border-radius: 28px; margin: 0 auto 24px; box-shadow: var(--shadow); }
.download-page h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--blue); margin-bottom: 12px; }
.download-page p { color: var(--muted); margin: 0 0 28px; }
.download-page .store-badges { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Store badges (drawn inline so they never depend on a third-party image host) */
.badge, .store-badges a.badge {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; min-width: 184px; padding: 0 18px 0 14px;
  background: #000; color: #fff; text-decoration: none; border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55);
}
.badge svg { width: 26px; height: 26px; flex: none; }
.badge span { display: flex; flex-direction: column; font-size: 1.28rem; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.badge small { font-size: .66rem; font-weight: 500; letter-spacing: .01em; }

/* Keep the footer at the bottom on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
