/* LOY Pixel website. Plain CSS, no build step, no external fonts. Tokens match loy_pixel/static/css/app.css. */

:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-alt: #0d1015;
  --surface: #12151c;
  --raised: #191d26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --text-2: #b4bac8;
  --text-3: #8b93a7;
  --pink: #ff4fa3;
  --cyan: #2de2e6;
  --accent: #ff4f9a;
  --accent-2: #3dd6f5;
  --ink: #12020a;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --grad: linear-gradient(90deg, var(--pink), var(--cyan));
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --led: 6px; /* one LED of the 64×64 demo panel */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-2); text-underline-offset: 2px; }
a:hover { color: #7fe6fa; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.2rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; background: var(--raised); padding: 0.1em 0.35em; border-radius: 5px; }
pre { background: #07090c; border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; overflow-x: auto; margin: 0 0 0.9rem; }
pre code { background: none; padding: 0; font-size: 0.85rem; line-height: 1.55; }
.muted { color: var(--text-3); }
.fine { font-size: 0.9rem; color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: 8px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.65rem 1.3rem; border-radius: 999px;
  font-weight: 650; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-size: 1rem; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--grad); color: var(--ink); box-shadow: 0 6px 24px rgba(255, 79, 163, 0.25); }
.btn-primary:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(45, 226, 230, 0.25); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); background: var(--raised); }
.btn-sm { min-height: 36px; padding: 0.35rem 0.9rem; font-size: 0.9rem; }
button.btn { font-family: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand img { border-radius: 8px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 0.4rem 0.7rem; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--raised); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(700px 420px at 8% 0%, rgba(255, 79, 163, 0.16), transparent 70%),
    radial-gradient(700px 480px at 95% 100%, rgba(45, 226, 230, 0.12), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 700; color: var(--text-2); margin-bottom: 0.6rem; }
.hero h1 { font-size: clamp(2.8rem, 1.6rem + 5vw, 4.6rem); letter-spacing: -0.03em; margin-bottom: 0.2rem; }
.tagline { font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); font-weight: 750; letter-spacing: -0.01em; margin-bottom: 1rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.platforms { color: var(--text-3); font-size: 0.92rem; }

/* ---------- LED panel demo ---------- */
.panel-demo { margin: 0; display: grid; justify-items: center; gap: 1rem; }
.bezel {
  padding: 22px; border-radius: 28px;
  background: linear-gradient(160deg, #1d212b, #12151c);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 80px rgba(255, 79, 163, 0.18), 0 0 120px rgba(45, 226, 230, 0.10);
}
.screen {
  position: relative;
  width: calc(var(--led) * 64); height: calc(var(--led) * 64);
  background: #000; border-radius: 6px; overflow: hidden;
}
.screen img {
  display: block; width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  transition: opacity 0.25s ease;
}
.screen img.fade { opacity: 0; }
/* LED gaps: a dark grid line every LED */
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.7) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 1px, transparent 1px);
  background-size: var(--led) var(--led);
}
.panel-demo figcaption { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; font-size: 0.95rem; text-align: center; }
.panel-demo .now { color: var(--text-2); }
.panel-demo .now strong { color: var(--text); }
.panel-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem; }
.thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.thumbs button {
  display: block; padding: 3px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border);
}
.thumbs button:hover { border-color: var(--border-strong); }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.thumbs img { display: block; width: 40px; height: 40px; image-rendering: pixelated; border-radius: 5px; }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-lead { color: var(--text-2); font-size: 1.08rem; max-width: 46rem; margin-bottom: 2rem; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-2); }
.card ol { color: var(--text-2); margin: 0; }
.card ol li + li { margin-top: 0.45rem; }
.cards-3 .card { display: flex; flex-direction: column; }
.cards-3 .card a { margin-top: auto; font-weight: 600; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem;
}
.feature p, .feature ul { color: var(--text-2); margin-bottom: 0; }
.feature ul { padding-left: 1.1rem; }
.feature li + li { margin-top: 0.2rem; }
.feature h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; }
.dot { width: 12px; height: 12px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px rgba(255, 79, 163, 0.6); flex: none; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-top: 2rem; }
.shot { margin: 0; grid-column: span 2; }
.shot-wide { grid-column: span 4; grid-row: span 2; }
.shot a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface); }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; transition: transform 0.3s ease; }
.shot a:hover img { transform: scale(1.02); }
.shot-wide img { aspect-ratio: auto; height: 100%; }
.shot-wide a { height: calc(100% - 2rem); }
.shot-studio { grid-column: span 4; }
.shot-phone { grid-column: span 2; display: flex; flex-direction: column; align-items: center; }
.shot-phone a { width: min(170px, 60%); border-radius: 22px; border: 6px solid #1d212b; box-shadow: 0 0 0 1px var(--border-strong); }
.shot-phone img { aspect-ratio: 9 / 19; }
.shot figcaption { color: var(--text-2); font-size: 0.92rem; margin-top: 0.5rem; text-align: center; }

/* ---------- downloads ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dl { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; display: flex; flex-direction: column; }
.dl h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.dl .file { font-size: 0.92rem; }
.dl ol, .dl p { color: var(--text-2); font-size: 0.95rem; }
.dl ol { margin: 0; }
.dl ol li + li { margin-top: 0.4rem; }
.note { margin-top: 1.5rem; padding: 1.2rem 1.4rem; border-radius: var(--radius); border: 1px dashed var(--border-strong); }
.note p { color: var(--text-2); margin: 0; }

.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; vertical-align: middle; }
.badge-beta { background: rgba(251, 191, 36, 0.15); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.4); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }

/* ---------- hardware table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
thead th { color: var(--text-3); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
tbody th { font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
td { color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-weight: 650; font-size: 0.88rem; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.status-ok { color: var(--ok); }
.status-warn { color: var(--warn); }
.status-bad { color: var(--bad); }
.status-unknown { color: var(--text-2); }
.fine { margin-top: 1rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; font-weight: 650; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--accent);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 1.2rem 1.1rem; margin: 0; color: var(--text-2); }

/* ---------- troubleshooting ---------- */
.trouble { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0 0; }
.trouble > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.trouble dt { font-weight: 700; margin-bottom: 0.3rem; }
.trouble dd { margin: 0; color: var(--text-2); }

/* ---------- LOY Studio ---------- */
.studio-box {
  text-align: center; padding: clamp(2rem, 5vw, 3rem);
  border-radius: 22px; border: 1px solid var(--border-strong);
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(255, 79, 163, 0.14), transparent 70%),
    radial-gradient(400px 200px at 100% 100%, rgba(45, 226, 230, 0.12), transparent 70%),
    var(--surface);
}
.studio-box p { color: var(--text-2); font-size: 1.08rem; max-width: 38rem; margin: 0 auto 1.4rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; background: var(--bg-alt); }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr auto; gap: 2rem; align-items: start; }
.brand-foot { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; margin: 0; }
.brand-foot img { border-radius: 6px; }
.site-footer .fine { margin-top: 0.4rem; }
.disclaimer { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.95rem; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .disclaimer { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot-wide, .shot-studio { grid-column: span 2; grid-row: auto; }
  .shot-wide img { aspect-ratio: 16 / 10; height: auto; }
  .shot-wide a { height: auto; }
  .shot-phone { grid-column: span 2; }
  .trouble { grid-template-columns: 1fr; }
  .nav ul { gap: 0; }
  .nav a { padding: 0.4rem 0.45rem; font-size: 0.9rem; }
}
@media (max-width: 680px) {
  :root { --led: 4px; }
  .header-inner { flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding-top: 0.4rem; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .nav ul { padding-bottom: 0.35rem; }
  html { scroll-padding-top: 110px; }
  .cards-4, .dl-grid, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  /* hardware table becomes stacked cards */
  .table-wrap { overflow: visible; background: none; border: 0; }
  table, thead, tbody, tr, th, td { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; padding: 0.4rem 0; }
  th, td, tbody tr:last-child > * { border: 0; padding: 0.3rem 1rem; }
  td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); font-size: 0.85rem; }
  td:empty { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .disclaimer { grid-row: auto; }
  .bezel { padding: 16px; border-radius: 22px; }
}
@media (min-width: 681px) and (max-width: 1100px) {
  :root { --led: 5px; }
}

/* ---------- reduced motion: no animation, no smooth scroll ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
