/* poinza — brand styles (light theme). "Kaufe smarter. Sammle mehr."
   Palette: Primary #0D1025 · Secondary #6C4DFF · Accent #A78BFA ·
   Success #22C1A6 · Info #4DA3FF · Background #F7F8FC · Surface #FFFFFF. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --ink: #0D1025;
  --purple: #6C4DFF;
  --purple-600: #5a3ee6;
  --purple-050: #efeafe;
  --accent: #A78BFA;
  --success: #22C1A6;
  --success-050: #dcf5ef;
  --info: #4DA3FF;
  --info-050: #e4f0ff;
  --bg: #F7F8FC;
  --surface: #FFFFFF;
  --text: #0D1025;
  --muted: #6B7280;
  --border: #E7E9F2;
  --danger: #EF4444;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(13, 16, 37, 0.07);
  --shadow-sm: 0 2px 8px rgba(13, 16, 37, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Defensive: absolutely-positioned decorative elements (e.g. hover
     tooltips near the viewport edge) must never create a horizontal
     scrollbar / break mobile layout, even while invisible. */
  overflow-x: hidden;
}

body { min-height: 100dvh; display: flex; flex-direction: column; }

a { color: var(--purple); text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* App bar */
.appbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.appbar .brand { display: flex; align-items: center; gap: 8px; }
.appbar .brand img { height: 28px; width: auto; display: block; }
.appbar h1 { font-size: 1.1rem; margin: 0; }

main { flex: 1; width: 100%; max-width: 660px; margin: 0 auto; padding: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

/* Highlight banner (gradient like the brand primary button) */
.banner {
  background: linear-gradient(135deg, var(--purple), #8A6BFF);
  color: #fff; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
  font-size: .95rem; box-shadow: 0 8px 24px rgba(108, 77, 255, 0.25);
}
.banner strong { font-weight: 700; }
.banner small { opacity: .92; }
.banner ul { margin: 8px 0 0; padding-left: 18px; }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: inherit;
  background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-050);
}

.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.row .grow-0 { flex: 0 0 auto; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; font-size: 15px; font-weight: 600; font-family: inherit;
  background: linear-gradient(135deg, var(--purple), #8A6BFF); color: #fff;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(108, 77, 255, 0.25);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
button:hover, .btn:hover { box-shadow: 0 8px 22px rgba(108, 77, 255, 0.32); }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary {
  background: var(--purple-050); color: var(--purple); box-shadow: none; border: 1px solid transparent;
}
button.secondary:hover, .btn.secondary:hover { background: #e6dfff; }
button.icon {
  background: transparent; color: var(--muted); box-shadow: none; padding: 8px; border-radius: 10px;
}
button.icon:hover { color: var(--ink); background: var(--bg); }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* List items */
ul.items { list-style: none; margin: 0; padding: 0; }
li.item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 2px; border-bottom: 1px solid var(--border);
}
li.item:last-child { border-bottom: none; }
li.item .name { flex: 1; font-size: 1rem; }
li.item .qty { color: var(--muted); font-size: .8rem; font-weight: 500; }
li.item.bought .name { text-decoration: line-through; color: var(--muted); }

.check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #fff;
  box-shadow: none;
}
.check.on { background: var(--success); border-color: var(--success); }

.empty { text-align: center; color: var(--muted); padding: 22px 0; }
.error { color: var(--danger); font-size: .9rem; margin: 8px 0; }
.success { color: var(--success); font-size: .9rem; margin: 8px 0; font-weight: 600; }
.muted { color: var(--muted); font-size: .9rem; }
.stack > * + * { margin-top: 12px; }

.invite-code {
  font-family: ui-monospace, "SF Mono", monospace; font-size: 1.3rem; letter-spacing: 3px;
  background: var(--purple-050); color: var(--purple); padding: 10px 16px; border-radius: 12px;
  display: inline-block; font-weight: 700;
}

/* Auth pages */
.auth-wrap { max-width: 420px; margin: 6vh auto; }
.auth-wrap .brand-hero {
  display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 20px;
}
.auth-wrap .brand-hero img { height: 46px; width: auto; }
.auth-wrap .tagline { color: var(--muted); font-size: .95rem; }
.auth-wrap .tagline b { color: var(--purple); font-weight: 600; }

/* Bottom tab bar */
nav.tabbar {
  position: sticky; bottom: 0;
  display: flex; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
nav.tabbar a {
  flex: 1; text-align: center; padding: 11px 0; color: var(--muted);
  font-size: .78rem; font-weight: 600;
}
nav.tabbar a.active { color: var(--purple); }

.offline-note {
  display: none; background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa;
  text-align: center; padding: 6px; font-size: .85rem;
}
body.is-offline .offline-note { display: block; }

/* Barcode + scanner */
.barcode-box {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 10px;
  display: flex; justify-content: center; align-items: center; min-height: 90px;
}
.barcode-box svg { max-width: 100%; height: auto; }
.scanner-reader {
  width: 100%; min-height: 240px; border-radius: 14px; overflow: hidden;
  background: var(--ink); border: 1px solid var(--border);
}
.scanner-reader video { width: 100% !important; height: auto !important; display: block; }

/* Tinted stat pill (brand "+32% Mehr Gegenwert") */
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pill.success { background: var(--success-050); color: #0f766e; }
.pill.info { background: var(--info-050); color: #1d4ed8; }

/* ============================ Marketing / Landing ======================== */
body.marketing { display: block; }
body.marketing main { max-width: 1080px; }

.mkt-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  background: rgba(247, 248, 252, 0.85); backdrop-filter: saturate(180%) blur(10px);
}
.mkt-header .brand, .mkt-footer .brand { display: inline-flex; align-items: center; }
.mkt-header .brand img { height: 30px; width: auto; display: block; }
.mkt-footer .brand img { height: 26px; width: auto; display: block; }
.mkt-nav { display: flex; align-items: center; gap: 18px; }
.mkt-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; }
.mkt-nav a.mkt-login { color: var(--muted); }
.mkt-nav .mkt-cta { padding: 9px 16px; color: #fff; }
@media (max-width: 640px) {
  .mkt-nav a:not(.mkt-cta):not(.mkt-login) { display: none; }
}

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center;
  padding: 40px 20px 24px;
}
.hero .eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--purple); background: var(--purple-050);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 14px; }
.grad {
  background: linear-gradient(120deg, var(--purple), var(--info));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.12rem; color: #37384a; max-width: 34ch; }
.hero .waitlist { margin-top: 22px; max-width: 460px; }

.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 260px; }
.hero-icon { filter: drop-shadow(0 24px 48px rgba(13,16,37,.25)); border-radius: 40px; }
.float-card {
  position: absolute; bottom: 8px; right: 0; background: #fff; border-radius: 16px;
  padding: 14px 16px; box-shadow: var(--shadow); border: 1px solid var(--border); width: 230px;
}
.fc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fc-big { font-weight: 800; font-size: 1.05rem; color: var(--ink); line-height: 1.2; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; min-height: 200px; }
  .lead { max-width: none; }
}
@media (max-width: 480px) {
  /* .float-card is absolutely positioned and at narrow widths there isn't
     room beside the centered icon — it ends up covering it. Stack instead. */
  .hero-art { flex-direction: column; gap: 14px; min-height: auto; padding-bottom: 8px; }
  .hero-icon { width: 120px; height: 120px; }
  .float-card { position: static; width: 100%; max-width: 280px; }
}

.section { padding: 44px 20px; }
.section-title { text-align: center; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 28px; }

.steps, .feature-grid, .pricing { display: grid; gap: 16px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.pricing { grid-template-columns: repeat(3, 1fr); align-items: start; }
@media (max-width: 820px) {
  .steps, .feature-grid, .pricing { grid-template-columns: 1fr; }
}

.step { position: relative; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--purple); color: #fff; font-weight: 800; margin-bottom: 8px;
}
.feature .ficon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; font-size: 1.2rem; margin-bottom: 10px;
}
.feature h3, .step h3 { margin: 6px 0; font-size: 1.1rem; }

.plan { text-align: center; position: relative; }
.plan h3 { margin: 0 0 4px; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--ink); margin: 4px 0 12px; }
.plan .price span { font-size: .95rem; font-weight: 500; color: var(--muted); }
.plan .items { text-align: left; margin-bottom: 16px; }
.plan .btn { width: 100%; }
.plan.featured { border: 2px solid var(--purple); box-shadow: 0 12px 32px rgba(108,77,255,.18); }
.plan .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--purple); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}

.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { color: var(--purple); }
.faq p { margin: 10px 0 0; }

.cta-final .cta-card {
  text-align: center; background: linear-gradient(135deg, var(--ink), #241b3f);
  color: #fff; border: none; padding: 40px 24px;
}
.cta-final .cta-card h2 { color: #fff; margin: 0 0 8px; }
.cta-final .cta-card .muted { color: #c7c9d9; }
.cta-final .cta-card .btn { margin-top: 16px; }

.success-box {
  background: var(--success-050); color: #0f766e; border: 1px solid #9ae6d3;
  border-radius: 12px; padding: 16px;
}

.mkt-footer { background: var(--ink); color: #c7c9d9; padding: 32px 20px; margin-top: 20px; }
.mkt-footer-inner {
  max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; align-items: center;
}
.mkt-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.mkt-footer a { color: #fff; font-weight: 600; }
.mkt-legal-note { max-width: 1080px; margin: 20px auto 0; font-size: .8rem; color: #8b8ea6; }

.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 2rem; }
.legal h2 { margin-top: 26px; font-size: 1.2rem; }
.legal code { background: var(--purple-050); color: var(--purple); padding: 1px 6px; border-radius: 6px; }

.cookie-note {
  position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 40;
  max-width: 720px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  font-size: .88rem;
}
.cookie-note button { flex: 0 0 auto; }
.cookie-note[hidden] { display: none; }

.early-note {
  text-align: center; margin: -8px 0 20px; color: var(--purple); font-size: .95rem;
  background: var(--purple-050); padding: 10px 14px; border-radius: 999px; display: table; margin-left: auto; margin-right: auto;
}
.plan .price .old { text-decoration: line-through; color: var(--muted); font-size: 1.1rem; font-weight: 600; margin-right: 6px; }
.early-tag { color: var(--purple); font-size: .8rem; font-weight: 700; margin: -8px 0 12px; }

/* Admin */
.admin-nav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-nav a {
  padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .9rem;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
}
.admin-nav a.active { color: var(--purple); background: var(--purple-050); border-color: transparent; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Info tooltip (perk details) */
.info {
  position: relative; display: inline-flex; width: 17px; height: 17px; border-radius: 50%;
  background: var(--purple-050); color: var(--purple); font-size: 11px; font-weight: 800;
  font-style: normal; align-items: center; justify-content: center; cursor: help;
  margin-left: 6px; vertical-align: middle; outline: none;
}
.info:focus { box-shadow: 0 0 0 3px var(--purple-050); }
.info .tip-bubble {
  position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 12px; border-radius: 10px;
  width: min(240px, calc(100vw - 32px));
  font-size: .8rem; font-weight: 400; line-height: 1.45; opacity: 0; visibility: hidden;
  transition: opacity .15s; z-index: 30; box-shadow: var(--shadow); text-align: left;
}
.info:hover .tip-bubble, .info:focus .tip-bubble, .info:focus-within .tip-bubble { opacity: 1; visibility: visible; }
.info .tip-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink);
}

/* KI section */
.ki { background: linear-gradient(135deg, #f3f0ff, #eaf3ff); border-radius: 22px; padding: 40px 24px; }
.ki-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 820px; margin: 0 auto; }
.ki-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.ki-item .k { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--purple-050); color: var(--purple); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.ki-note { max-width: 820px; margin: 18px auto 0; text-align: center; }
@media (max-width: 720px) { .ki-grid { grid-template-columns: 1fr; } }
.demo-note { text-align: center; max-width: 640px; margin: 0 auto 22px; color: #37384a; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
