/* TIcam - themed to match www.techinstaller.net (dark navy, cyan -> blue).
   No frameworks, no web fonts. */
:root {
  --bg: #070b12;
  --panel: #0d1626;
  --panel-2: #0a101c;
  --line: rgba(148, 163, 184, .12);
  --line-2: rgba(148, 163, 184, .24);
  --text: #e6edf6;
  --muted: #93a4bb;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-dim: rgba(34, 211, 238, .45);
  --accent-ink: #04121a;
  --grad: linear-gradient(135deg, #22d3ee, #3b82f6);
  --glow: 0 0 20px rgba(34, 211, 238, .35);
  --live: #34d399;
  --danger: #f87171;
  --info: #3b82f6;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(34, 211, 238, .10), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(59, 130, 246, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .86em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap-row { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.hide { display: none !important; }

/* ---------- top bar ---------- */
header.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 11, 18, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 8px 18px; min-height: 66px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .01em; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { height: 40px; width: auto; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .35)); }
.brand .word { font-size: 1.1rem; text-transform: uppercase; }
.brand .word b { color: var(--accent); font-weight: 800; }
.brand span.sub {
  color: var(--accent); font-weight: 700; font-size: .72rem; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 999px; background: rgba(34, 211, 238, .1);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .25);
}
nav.tabs { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
@media (max-width: 760px) {
  nav.tabs { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  nav.tabs button { white-space: nowrap; padding: 6px 12px; font-size: .88rem; }
}
@media (max-width: 380px) { .brand span.sub { display: none; } }
nav.tabs button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: .92rem;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
nav.tabs button:hover { color: var(--text); background: var(--panel); }
nav.tabs button.on { color: var(--accent); background: rgba(34, 211, 238, .1); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .3); }

/* ---------- buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: var(--accent-ink); border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; padding: 10px 20px; cursor: pointer;
  box-shadow: var(--glow);
  transition: filter .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:hover { filter: brightness(1.08); box-shadow: 0 0 26px rgba(34, 211, 238, .45); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: var(--panel); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .4); }
.btn.sm { padding: 5px 12px; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .35); }
label { display: block; font-size: .84rem; color: var(--muted); margin: 0 0 4px; }
input, select, textarea {
  width: 100%; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent-dim); outline-offset: 0; border-color: var(--accent); }
.field { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- panels ---------- */
.panel {
  background: linear-gradient(180deg, rgba(13, 22, 38, .92), rgba(10, 16, 28, .92));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.panel + .panel { margin-top: 16px; }
.panel h2, .panel h3 { margin-top: 0; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: #1b2330; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.pill.on { background: rgba(48, 209, 88, .12); color: var(--live); }
.pill.off { background: rgba(255, 107, 94, .1); color: var(--danger); }
.pill.warn { background: rgba(251, 191, 36, .12); color: #fbbf24; }
.pill.info { background: rgba(59, 130, 246, .14); color: #60a5fa; }
.pill .led { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on .led { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.notice { border-left: 3px solid var(--accent); background: var(--panel-2); padding: 11px 14px; border-radius: 0 8px 8px 0; }
.notice.bad { border-color: var(--danger); }
.notice.good { border-color: var(--live); }

/* ---------- live grid ---------- */
.livegrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.livegrid.one { grid-template-columns: 1fr; }
.tile {
  position: relative; background: #000; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9;
}
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.tile .label {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; font-size: .82rem; font-weight: 600;
  background: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
  text-shadow: 0 1px 2px #000; pointer-events: none;
}
.tile .label .led { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.tile.live .label .led { background: var(--live); animation: pulse 2s infinite; }
.tile .state {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .86rem; padding: 20px; gap: 10px;
}
.tile .tools { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.tile:hover .tools { opacity: 1; }
.tile .tools button {
  background: rgba(10, 13, 18, .8); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 4px 8px; font: inherit; font-size: .78rem; cursor: pointer;
}

/* ---------- tables, lists ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 0 10px 8px; }
td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: var(--panel-2); }
.eventlist { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.event { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.event img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.event .body { padding: 9px 11px; }
.event .body .when { color: var(--muted); font-size: .78rem; }
.bar { height: 7px; background: var(--panel-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--grad); }
.bar.ai > i { background: var(--accent-2); }

/* ---------- landing ---------- */
.hero { padding: 72px 0 40px; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 54ch; }
.hero .cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent); font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(34, 211, 238, .08); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .25);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps > div::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px;
  border-radius: 999px; background: var(--grad); color: var(--accent-ink); font-weight: 800; font-size: .85rem;
  box-shadow: var(--glow);
}
.price { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 12px; }
.price b { font-size: 1.9rem; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan { display: flex; flex-direction: column; }
.plan.featured { box-shadow: inset 0 0 0 1px var(--accent-dim), var(--glow); }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 7px; font-size: .9rem; }
.plan ul li { padding-left: 20px; position: relative; color: var(--muted); }
.plan ul li::before { content: "\2713"; position: absolute; left: 0; color: var(--live); font-weight: 700; }
.plan .btn { margin-top: auto; }
footer.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 24px 0 40px; color: var(--muted); font-size: .86rem; }
section { padding: 34px 0; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(4, 6, 10, .72); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal .box { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 22px; }
.modal h2 { margin-bottom: 14px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 80;
  background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  padding: 11px 16px; border-radius: 8px; font-size: .9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  max-width: min(520px, 92vw);
}
.toast.bad { border-left-color: var(--danger); }
.toast.good { border-left-color: var(--live); }
.spin { width: 15px; height: 15px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
