/* IO Systems showcase. Matches www.iosystems.co.za: ink background, teal accent, IBM Plex. */
:root {
  --ink: #101010;
  --ink-2: #161616;
  --ink-3: #1D1D1D;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #FFFFFF;
  --muted: #A3A9AC;
  --subtle: #6B7175;
  --teal: #0D9CAF;
  --teal-hover: #0A7E8E;
  --teal-soft: rgba(13, 156, 175, 0.14);
  --blue: #105375;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 7px; font: 500 1rem var(--sans); letter-spacing: -0.01em; transition: background 0.2s, color 0.2s; }
.btn-sm { padding: 10px 22px; font-size: 0.95rem; }
.btn-teal { background: var(--teal); color: var(--ink); }
.btn-teal:hover { background: var(--teal-hover); color: var(--text); }
.btn-light { background: var(--text); color: var(--ink); }
.btn-light:hover { background: #E9E9E9; }
.arrow { font-size: 1.15em; line-height: 1; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(16, 16, 16, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 40px; width: auto; }
.nav-divider { width: 1px; height: 24px; background: var(--line-strong); }
.nav-label { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; text-align: center; background: radial-gradient(ellipse 60% 50% at 50% 30%, rgba(13, 156, 175, 0.12), transparent 70%); border-bottom: 1px solid var(--line); }
.network { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; }
.hero-logo { width: 110px; height: auto; margin: 0 auto 36px; animation: rise 0.7s var(--ease) both; }
.pill { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(16, 16, 16, 0.6); font-family: var(--mono); font-size: 0.95rem; animation: rise 0.7s 0.06s var(--ease) both; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.hero h1 { max-width: 760px; margin: 0 auto 20px; font-size: clamp(2.5rem, 6.4vw, 4.1rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.06em; text-wrap: balance; animation: rise 0.7s 0.12s var(--ease) both; }
.hero-sub { max-width: 600px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; animation: rise 0.7s 0.18s var(--ease) both; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 40px; animation: rise 0.7s 0.24s var(--ease) both; }
.stats { display: flex; justify-content: center; gap: 0; margin: 64px auto 0; padding: 0; max-width: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(16, 16, 16, 0.6); animation: rise 0.7s 0.3s var(--ease) both; }
.stats div { flex: 1; padding: 18px 12px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle); }
.stats dd { margin: 4px 0 0; font-size: 2rem; font-weight: 500; letter-spacing: -0.04em; }

/* Section */
.section { padding: 88px 0 112px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 40px; }
.eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.section-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.05em; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); }
.filter { padding: 7px 14px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.2s, color 0.2s; }
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { background: var(--teal-soft); color: var(--teal); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--subtle); stroke-width: 2; stroke-linecap: round; }
.search input { width: 240px; height: 42px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); color: var(--text); font: 400 0.95rem var(--sans); transition: border-color 0.2s; }
.search input::placeholder { color: var(--subtle); }
.search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 156, 175, 0.25); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); transition: border-color 0.2s, transform 0.4s var(--ease), box-shadow 0.2s; animation: rise 0.5s var(--ease) both; }
.card:hover { border-color: rgba(13, 156, 175, 0.5); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4); }
.card:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 156, 175, 0.3); }

.preview { position: relative; aspect-ratio: 16 / 10; background: var(--ink-3); border-bottom: 1px solid var(--line); overflow: hidden; }
.chrome { position: absolute; top: 0; left: 0; right: 0; z-index: 1; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: rgba(16, 16, 16, 0.85); border-bottom: 1px solid var(--line); }
.chrome i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.chrome span { margin-left: 10px; font-family: var(--mono); font-size: 0.68rem; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-frame { position: absolute; top: 28px; left: 0; width: 400%; height: calc((100% - 28px) * 4); border: 0; transform: scale(0.25); transform-origin: 0 0; pointer-events: none; background: #fff; }
.preview img { position: absolute; top: 28px; left: 0; width: 100%; height: calc(100% - 28px); object-fit: cover; object-position: top; }
.placeholder { position: absolute; inset: 28px 0 0; display: grid; place-items: center; background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px); background-size: 18px 18px; }
.placeholder span { font-size: 3rem; font-weight: 500; letter-spacing: -0.06em; color: var(--line-strong); }
.card:hover .placeholder span { color: var(--teal); transition: color 0.2s; }

.card-body { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle); }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.status[data-status="live"] { color: var(--teal); }
.status[data-status="live"]::before { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.status[data-status="development"]::before { background: #E8A040; }
.card h3 { margin: 0 0 6px; font-size: 1.4rem; font-weight: 500; letter-spacing: -0.04em; line-height: 1.2; }
.card-desc { margin: 0 0 20px; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.card-url { font-family: var(--mono); font-size: 0.75rem; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-open { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); white-space: nowrap; }
.card-open b { font-weight: 400; transition: transform 0.2s var(--ease); }
.card:hover .card-open b { transform: translateX(4px); }

.empty { padding: 64px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty code { font-family: var(--mono); color: var(--text); background: var(--ink-3); padding: 2px 8px; border-radius: 4px; }

/* Footer */
.footer { padding: 64px 0; border-top: 1px solid var(--line); text-align: center; }
.footer-logo { height: 44px; width: auto; margin: 0 auto 18px; opacity: 0.55; }
.footer p { margin: 0 0 4px; color: var(--subtle); font-size: 0.9rem; }
.footer a:hover { color: var(--teal); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .nav-label, .nav-divider { display: none; }
  .hero { padding: 64px 0 56px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .pill { font-size: 0.72rem; padding: 7px 12px; gap: 8px; }
  .stats dd { font-size: 1.6rem; }
  .section { padding: 64px 0 80px; }
  .grid { grid-template-columns: 1fr; }
  .toolbar, .search, .search input { width: 100%; }
  .filters { overflow-x: auto; }
}
