/* Omnidea Apps: shared styles. Light and dark themes follow the system. */
:root {
  --bg: #ffffff;
  --surface: #f6f7fb;
  --text: #323338;
  --muted: #676879;
  --border: #d0d4e4;
  --brand-1: #ff8a5b;
  --brand-2: #f0457a;
  --link: #e23d6f;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181b34;
    --surface: #222645;
    --text: #e6e9ef;
    --muted: #a8acc4;
    --border: #3a3f63;
    --link: #ff8fae;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Figtree, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--link); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Hero */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; margin: 0 0 16px; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(260px, 70vw); border-radius: 56px; box-shadow: 0 24px 60px rgba(240, 69, 122, 0.3); }
.gradient-text { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero-art { order: -1; } }

.button {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections, cards */
section { padding: 32px 0; }
h2 { font-size: 28px; margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 12px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card img.icon { width: 48px; height: 48px; border-radius: 12px; }
.badge-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px;
  color: #fff; font-weight: 700; font-size: 20px; background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
  content: counter(step); flex: 0 0 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}
.steps li > div { padding-top: 4px; }
.tip { background: var(--surface); border-left: 4px solid var(--brand-2); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; overflow-wrap: anywhere; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: var(--surface); }
tr:last-child td { border-bottom: 0; }

/* Legal pages */
.doc { max-width: 760px; padding-top: 40px; }
.doc h1 { font-size: 36px; margin-bottom: 4px; }
.doc .updated { color: var(--muted); margin-top: 0; }
.doc h2 { font-size: 22px; margin-top: 32px; }

/* App directory */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.app-card { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--text); }
.app-card img { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; }
.app-card p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* Embedded (iframe) mode: no header/footer */
.embedded .site-header, .embedded .site-footer { display: none; }
.embedded .doc, .embedded main { padding-top: 16px; }

/* Omnidea logo */
.omnidea-logo { height: 30px; width: auto; display: block; }
.omnidea-logo-small { height: 20px; width: auto; display: block; }
.brand picture { display: inline-flex; }
.brand-apps { font-weight: 600; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Animated scenes (mock monday.com UI) ---------- */
:root { --scene-bg: #ffffff; --scene-bar: #f6f7fb; --scene-cell: #ffffff; --brand-soft: rgba(240, 69, 122, 0.14); --ok: #00c875; --bad: #df2f4a; --wip: #fdab3d; }
@media (prefers-color-scheme: dark) { :root { --scene-bg: #1f2340; --scene-bar: #262b4d; --scene-cell: #1f2340; --brand-soft: rgba(255, 138, 91, 0.18); } }

.scene-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; padding: 40px 0; }
.scene-row.flip > :first-child { order: 2; }
.scene-row h2 { margin-bottom: 10px; }
.scene-row p { color: var(--muted); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--link); margin-bottom: 8px; }
@media (max-width: 860px) { .scene-row { grid-template-columns: 1fr; gap: 20px; } .scene-row.flip > :first-child { order: 0; } }

.scene { position: relative; background: var(--scene-bg); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(30, 34, 70, 0.14); font-size: 14px; }
.scene-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--scene-bar); border-bottom: 1px solid var(--border); }
.scene-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.scene-bar small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.scene-run { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 2px 10px; border-radius: 99px; border: 1px solid var(--border); transition: all .3s; }
.scene-run img { width: 16px; height: 16px; border-radius: 4px; }
.scene-run.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 0 0 4px var(--brand-soft); }
.scene-recipe { padding: 12px 16px; border-bottom: 1px dashed var(--border); line-height: 1.9; }
.scene-recipe b { background: var(--brand-soft); padding: 2px 7px; border-radius: 5px; font-weight: 600; transition: all .25s; }
.scene-recipe b.on { color: #fff; background: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.scene-table { overflow-x: auto; }
.scene table { min-width: 0; font-size: 13px; }
.scene th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; background: transparent; }
.scene td { padding: 9px 12px; white-space: nowrap; background: var(--scene-cell); transition: background .35s, box-shadow .35s, color .35s; }
.scene th.target { color: var(--link); }
.scene .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }
.scene td.pending { color: transparent; }
.scene td.pending::before { content: ""; display: inline-block; width: 92px; height: 10px; border-radius: 5px; background: var(--border); vertical-align: middle; }
.scene td.flash { box-shadow: inset 0 0 0 2px var(--brand-2); background: var(--brand-soft); }
.scene td.error { box-shadow: inset 0 0 0 2px var(--bad); background: rgba(223, 47, 74, .12); color: var(--bad); }
.scene td.pop > * , .scene td.pop { animation: scene-pop .45s ease-out; }
.scene tr.new { transition: opacity .4s; }
.scene tr.new.hidden { opacity: 0; }
.pill { display: inline-block; min-width: 92px; text-align: center; padding: 2px 10px; border-radius: 4px; color: #fff; font-size: 12px; font-weight: 600; transition: background .35s; }
.pill.ok { background: var(--ok); } .pill.wip { background: var(--wip); } .pill.bad { background: var(--bad); } .pill.blue { background: #579bfc; }
.typing::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--brand-2); animation: scene-blink .5s infinite alternate; }
.scene-cursor { position: absolute; left: 0; top: 0; z-index: 5; width: 20px; height: 20px; opacity: 0; pointer-events: none;
  transition: transform .7s cubic-bezier(.5, 0, .2, 1), opacity .3s; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.scene-cursor.on { opacity: 1; }
.scene-cursor.click::after { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand-2); animation: scene-ripple .45s ease-out forwards; }
.scene-toast { position: absolute; right: 14px; bottom: 14px; z-index: 4; max-width: 260px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border-radius: 10px; background: var(--scene-bg); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: 13px;
  opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.scene-toast.on { opacity: 1; transform: none; }
.scene-toast .dot { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* Scan scene: phone + board */
.scan-stage { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 18px; align-items: center; }
@media (max-width: 520px) { .scan-stage { grid-template-columns: 1fr; } .scan-stage .phone { margin: 0 auto; } }
.label-card { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border: 1px dashed var(--border); border-radius: 8px; background: #fff; color: #111; }
.label-card img { width: 92px; height: 92px; display: block; }
.label-card .code { font-size: 12px; }
.phone { position: relative; width: 170px; height: 300px; border-radius: 28px; border: 6px solid #2b2f4a; background: #f6f7fb; overflow: hidden; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
@media (prefers-color-scheme: dark) { .phone { border-color: #0e1022; background: #1f2340; } }
.phone .screen { position: absolute; inset: 0; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity .4s; font-size: 11.5px; }
.phone .screen.active { opacity: 1; }
.phone .viewfinder { align-items: center; justify-content: center; background: #111; }
.phone .viewfinder .frame { position: relative; width: 110px; height: 110px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.phone .viewfinder .frame::before { content: ""; position: absolute; inset: -6px; border: 3px solid #ffd54a; border-radius: 14px; opacity: .9; }
.phone .viewfinder img { width: 96px; height: 96px; border-radius: 4px; }
.phone .viewfinder small { color: #ddd; }
.phone .brand-row { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
.phone .brand-row img { width: 18px; height: 18px; border-radius: 5px; }
.phone .box { background: var(--scene-bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.phone .box b { font-size: 13px; }
.phone .change { display: flex; justify-content: space-between; gap: 6px; }
.phone .btn { margin-top: 4px; text-align: center; padding: 7px; border-radius: 6px; color: #fff; font-weight: 600; background: #0073ea; transition: transform .15s; }
.phone .btn.pressed { transform: scale(.95); }
.phone .done { align-items: center; justify-content: center; text-align: center; }
.phone .done .check { width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 26px; display: inline-flex; align-items: center; justify-content: center; animation: scene-pop .45s ease-out; }
.phone .muted { color: var(--muted); font-size: 10.5px; }

/* Labels scene */
.label-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px; }
.label-sheet .label-card { width: 100%; transition: opacity .35s, transform .35s; }
.label-sheet .label-card.hidden { opacity: 0; transform: translateY(8px); }
.label-sheet .label-card small { color: #676879; font-size: 11px; }
@media (max-width: 520px) { .label-sheet { grid-template-columns: repeat(2, 1fr); } .label-sheet .label-card:nth-child(n+5) { display: none; } }

@keyframes scene-blink { from { opacity: 1; } to { opacity: .2; } }
@keyframes scene-pop { 0% { transform: scale(.85); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: none; } }
@keyframes scene-ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* Grid children may shrink below their content (tables scroll inside the scene instead) */
.scene-row > *, .hero > *, .scan-stage > * { min-width: 0; }
.scene-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 860px) { .scene-row { grid-template-columns: minmax(0, 1fr); } }
.scene td:first-child, .scene th:first-child { white-space: normal; }
@media (max-width: 520px) { .scene { font-size: 13px; } .scene td, .scene th { padding: 8px 9px; } .pill { min-width: 70px; } }

/* Font Awesome Pro icons, inline SVG */
.fa { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; }
.badge-icon .fa { width: 22px; height: 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.phone .done .check .fa { width: 22px; height: 22px; }
.scene-toast .dot .fa { width: 12px; height: 12px; }
svg.scene-cursor { width: 18px; height: 18px; color: #111; stroke: #fff; stroke-width: 36px; paint-order: stroke; overflow: visible; }
.scene[data-scene="validate"] { padding-bottom: 86px; }
.scene[data-scene="validate"] .scene-toast { left: 14px; right: 14px; max-width: none; }

/* Big hero */
.hero-big { position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(240, 69, 122, 0.20), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(255, 138, 91, 0.18), transparent 70%),
    var(--bg); }
.hero-row { min-height: min(86vh, 820px); padding: 72px 0 64px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; }
.hero-title { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 22px; }
.hero-lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); margin: 0 0 32px; max-width: 34ch; }
.button.big { padding: 15px 26px; font-size: 17px; border-radius: 12px; }
.hero-row .scene { transform: scale(1.04); transform-origin: center; box-shadow: 0 30px 80px rgba(240, 69, 122, 0.25), 0 10px 30px rgba(20, 22, 50, 0.25); }
.hero-row .scene td, .hero-row .scene th { padding: 12px 14px; }
.hero-row .scene { font-size: 15px; }
@media (max-width: 860px) {
  .hero-row { min-height: 0; padding: 44px 0 40px; gap: 28px; }
  .hero-row .scene { transform: none; }
}
.hero-big .wrap { max-width: 1240px; }
.hero-row { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero-title { font-size: clamp(40px, 5vw, 66px); }
.hero-lead { max-width: 40ch; }
.hero-row .actions { flex-wrap: nowrap; }
@media (max-width: 1100px) { .hero-row .actions { flex-wrap: wrap; } }
.wrap, .hero-big .wrap { max-width: 1200px; }
.doc { max-width: 760px; }

/* Footer: logo and text on one centred line */
.site-footer .wrap { align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; line-height: 1.4; }
.footer-brand a, .footer-brand picture { display: inline-flex; align-items: center; line-height: 0; }
.omnidea-logo-small { height: 18px; }

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phones and small tablets: one column everywhere (kept last so it wins) */
@media (max-width: 860px) {
  .hero-row, .scene-row { grid-template-columns: minmax(0, 1fr); }
  .hero-row { min-height: 0; padding: 40px 0 36px; gap: 28px; }
  .hero-row .actions { flex-wrap: wrap; }
  .hero-row .scene { transform: none; font-size: 13px; }
  .hero-row .scene td, .hero-row .scene th { padding: 8px 9px; }
  .hero-title { font-size: clamp(36px, 10vw, 48px); }
}
@media (max-width: 520px) {
  .button.big { width: 100%; justify-content: center; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .footer-brand { flex-wrap: wrap; }
}
/* Scan scene in the hero: a bigger phone */
.hero-row .scan-stage { grid-template-columns: 200px 1fr; gap: 22px; padding: 22px; }
.hero-row .phone { width: 200px; height: 350px; }
.hero-row .phone .screen { font-size: 13px; }
.hero-row .label-card img { width: 120px; height: 120px; }
@media (max-width: 520px) { .hero-row .scan-stage { grid-template-columns: 1fr; } .hero-row .phone { width: 190px; height: 330px; } }
.hero-row .scene td:first-child { white-space: nowrap; }
/* Scan scene: label next to the board */
.scan-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.scan-label { display: flex; align-items: center; gap: 14px; }
.scan-label .label-card { flex-shrink: 0; transition: box-shadow .3s, transform .3s; }
.scan-label .label-card img { width: 84px; height: 84px; }
.scan-label .label-card.scanning { box-shadow: 0 0 0 4px #ffd54a; transform: scale(1.04); }
.scan-hint { color: var(--muted); font-size: 13px; }
.hero-row .scan-label .label-card img { width: 92px; height: 92px; }
.scene[data-scene="scan"] .pill { min-width: 0; padding: 2px 8px; }
.scene[data-scene="scan"] td, .scene[data-scene="scan"] th { padding-left: 10px; padding-right: 10px; }
.scene-run { font-style: normal; }

/* Try it: scan the demo label */
.try-it { padding: 48px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.try-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 48px; align-items: center; }
.try-row p { color: var(--muted); max-width: 52ch; }
.try-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; border-radius: 16px; background: #fff; color: #111;
  text-decoration: none; border: 2px dashed #c3c6d4; box-shadow: 0 18px 50px rgba(240, 69, 122, .22); transition: transform .2s; }
.try-qr:hover { transform: translateY(-2px) rotate(-1deg); }
.try-qr img { width: 200px; height: 200px; display: block; }
.try-qr .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 18px; letter-spacing: .04em; }
.try-qr small { color: #676879; }
@media (max-width: 760px) {
  .try-row { grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; text-align: center; }
  .try-row .actions { justify-content: center; }
  .try-qr img { width: 160px; height: 160px; }
}
