/* Shared product-page layout for codered.lol/<product> (lares, dailies, invoicing).
   Accent defaults to the CodeRed red; a page overrides --accent* (and --page/--band/--surface) inline. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --page: var(--cr-page);
  --band: var(--cr-bg-b);
  --surface: var(--cr-surface);
  --line: var(--cr-line);
  --text: var(--cr-text);
  --muted: var(--cr-muted);
  --heading: var(--cr-heading);
  --ok: var(--cr-ok);
  --shadow: var(--cr-shadow);
  --accent: var(--cr-accent);
  --accent-hover: var(--cr-link-hover);
  --accent-ink: var(--cr-accent-ink);
  --accent-soft: var(--cr-accent-soft);
  --hero-heading: var(--cr-heading);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--text); background: var(--page);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--cr-blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; margin: 0; }
.wrap { max-width: 1128px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* ── Header ─────────────────────────────────────────── */
cr-topbar { --cr-header-border: var(--line); }
.topend { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; margin-right: auto; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { color: var(--heading); }
nav.links { display: none; gap: 4px; }
nav.links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 8px 12px; border-radius: 8px; }
nav.links a:hover { color: var(--heading); background: var(--accent-soft); }
@media (min-width: 860px) { nav.links { display: flex; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; transition: background .15s, box-shadow .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.btn-ghost { color: var(--muted); padding: 0 14px; }
.btn-ghost:hover { color: var(--heading); background: var(--accent-soft); }
.topend .btn { min-height: 38px; font-size: 0.95rem; }
.topend .btn-outline { padding: 0 16px; }
@media (max-width: 420px) { .topend .btn-ghost { display: none; } }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: 48px 0 56px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 80px 0 96px; } .hero .wrap { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { color: var(--hero-heading); font-weight: 300; font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
.hero h1 strong { font-weight: 700; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 20px 0 32px; }
.stack { display: grid; gap: 12px; max-width: 400px; }
.stack .btn { min-height: 52px; width: 100%; }
/* official badge as-is: no container, recolour or reshape (Google Play badge guidelines) */
.play { justify-self: start; align-self: center; }
.play img { height: 48px; width: auto; display: block; }
.fine { font-size: 0.82rem; color: var(--muted); max-width: 400px; margin: 16px 0 0; }

/* phone mock: an HTML replica of the Inventory tab, so it follows the theme */
.visual { position: relative; display: grid; place-items: center; padding: 24px 0; }
.blob { position: absolute; inset: 6% 8%; border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%; background: radial-gradient(circle at 30% 30%, rgba(255, 14, 4, 0.12), transparent 60%), radial-gradient(circle at 70% 70%, var(--accent-soft), transparent 65%), var(--band); }
.phone {
  position: relative; width: min(300px, 78vw); border-radius: 40px; padding: 12px;
  background: #16101b; box-shadow: var(--shadow), 0 30px 60px rgba(29, 20, 36, 0.18);
}
.screen { border-radius: 30px; overflow: hidden; background: var(--page); padding: 18px 14px 12px; font-size: 13px; }
.screen .title { font-weight: 700; font-size: 18px; color: var(--heading); margin: 8px 2px 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.total small { color: var(--muted); display: block; }
.total b { font-size: 22px; color: var(--heading); }
.group { margin: 12px 0 6px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; }
.item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.thumb { width: 38px; height: 38px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 18px; background: var(--accent-soft); }
.item div { flex: 1; min-width: 0; }
.item strong { display: block; color: var(--heading); font-size: 13px; }
.item span { color: var(--muted); font-size: 11px; }
.item em { font-style: normal; font-weight: 600; color: var(--heading); }
.tabs { display: flex; justify-content: space-around; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; color: var(--muted); font-size: 11px; }
.tabs .on { color: var(--accent); font-weight: 700; }
.chip {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center;
}
.chip b { color: var(--heading); display: block; }
.chip span { color: var(--muted); font-size: 12px; }
.chip .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); flex: none; }
.chip-a { top: 0; left: 0; }
.chip-b { bottom: 0; right: 0; }
.up { color: var(--ok); font-weight: 700; }
@media (max-width: 520px) { .chip { padding: 8px 10px; } }

/* ── Explore chips (the LinkedIn "explore topics" row) ── */
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.explore { padding: 48px 0; display: grid; gap: 20px; }
@media (min-width: 900px) { .explore { grid-template-columns: 1fr 2fr; align-items: start; padding: 64px 0; } }
.explore h2 { font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pills a { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--heading); font-weight: 600; text-decoration: none; }
.pills a:hover { border-color: var(--accent); color: var(--accent); }

/* ── Feature rows ───────────────────────────────────── */
section { scroll-margin-top: 72px; }
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 300; max-width: 40rem; }
.section h2 strong { font-weight: 700; }
.section > .wrap > p.sub { color: var(--muted); font-size: 1.1rem; max-width: 40rem; margin: 14px 0 0; }
.grid { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.card h3 { font-size: 1.15rem; margin: 14px 0 8px; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.icon svg { width: 22px; height: 22px; }

/* ── Use cases: image-left rows ─────────────────────── */
.case { display: grid; gap: 20px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.case:first-of-type { border-top: 0; }
@media (min-width: 760px) { .case { grid-template-columns: 220px 1fr; gap: 40px; } }
.ph {
  aspect-ratio: 4 / 3; border-radius: 16px; display: grid; place-items: center; font-size: 3rem;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 14, 4, 0.07)), var(--surface);
  border: 1px solid var(--line);
}
.case h3 { font-size: 1.3rem; margin-bottom: 6px; }
.case p { margin: 0; color: var(--muted); max-width: 38rem; }

/* ── Privacy band ───────────────────────────────────── */
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .ticks { grid-template-columns: repeat(2, 1fr); } }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--heading); font-weight: 600; }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* ── Pricing ────────────────────────────────────────── */
.plans { display: grid; gap: 16px; margin-top: 40px; max-width: 760px; }
@media (min-width: 700px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; }
.plan.pro { border: 2px solid var(--accent); }
.plan h3 { font-size: 1.1rem; }
.price { font-size: 2.2rem; font-weight: 800; color: var(--heading); margin: 8px 0 2px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan .note { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; flex: 1; }
.plan li::before { content: "✓  "; color: var(--ok); font-weight: 800; }

/* ── Final CTA ──────────────────────────────────────── */
.cta-final { text-align: center; padding: 72px 0; }
.cta-final h2 { font-weight: 300; font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--hero-heading); }
.cta-final .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

@media (prefers-reduced-motion: no-preference) {
  .chip { animation: float 6s ease-in-out infinite; }
  .chip-b { animation-delay: -3s; }
  @keyframes float { 50% { transform: translateY(-8px); } }
}

/* browser mock for web apps: same .screen/.tile/.item innards as the phone */
.browser {
  position: relative; width: min(440px, 88vw); border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 30px 60px rgba(29, 20, 36, 0.18);
}
.browser .bar { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser .bar span { margin-left: 8px; flex: 1; font-size: 11px; color: var(--muted); background: var(--page); border-radius: 6px; padding: 2px 10px; }
.browser .screen { border-radius: 0; }
.meter { height: 6px; border-radius: 999px; background: var(--accent-soft); margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; color: var(--heading); }
.check::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--line); flex: none; }
.check.done { color: var(--muted); text-decoration: line-through; }
.check.done::before { background: var(--accent); border-color: var(--accent); }
.plans.one { max-width: 420px; }
@media (min-width: 700px) { .plans.one { grid-template-columns: 1fr; } }
.browser ~ .chip-a { top: 42%; left: -8px; } /* keep the URL bar visible */
