/* haku control page — only loaded by haku-control.html */
.hc-page { --hc-a: #19d3ff; --hc-b: #8b5cff; --hc-c: #ff3fa4; --hc-glow: rgba(139,92,255,.5); }

/* ——— hero ——— */
.hc-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 32px;
  min-height: 440px;
  overflow: hidden;
  padding: 38px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 29px;
  background: #0b0b0b;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .3;
  background:
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(255,255,255,.03) 75px, transparent 76px),
    repeating-linear-gradient(0deg, transparent 0 74px, rgba(255,255,255,.03) 75px, transparent 76px);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 50%, #000 20%, transparent 75%);
}
.hc-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 70%;
  aspect-ratio: 1;
  right: -14%;
  top: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hc-glow), transparent 62%);
  opacity: .32;
  filter: blur(30px);
  transform: translateY(-50%);
}
.hc-hero-copy { position: relative; z-index: 2; animation: content-rise .8s .1s cubic-bezier(.22, 1, .36, 1) both; }
.hc-title { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 18px 0 18px; padding: 0; }
.hc-title img { display: block; width: clamp(190px, 22vw, 300px); height: auto; filter: drop-shadow(0 6px 30px rgba(255,255,255,.12)); }
.hc-title em {
  display: flex;
  align-items: center;
  gap: 14px;
  width: clamp(190px, 22vw, 300px);
  color: #bdbdbd;
  font: 400 clamp(12px, 1vw, 14px) 'DM Mono', monospace;
  font-style: normal;
  letter-spacing: .42em;
  text-transform: lowercase;
}
.hc-title em::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.4), transparent); }
.hc-lead { max-width: 480px; margin: 0; color: #c2c2c2; font-size: 16px; line-height: 1.55; }
.hc-lead strong { color: #fff; font-weight: 600; }
.hc-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 26px; }
.hc-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 19px;
  font-size: 14px;
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
}
.hc-download::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--hc-a), var(--hc-b), var(--hc-c), var(--hc-a));
  background-size: 300% 100%;
  opacity: 0;
  filter: blur(10px);
  transition: opacity .3s ease;
  animation: hc-sweep 4s linear infinite;
}
.hc-download:hover { background: #fff; }
.hc-download:hover::before { opacity: .75; }
.hc-download svg { transition: transform .2s ease; }
.hc-download:hover svg { transform: translateY(2px); }
@keyframes hc-sweep { to { background-position: 300% 0; } }
.hc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; color: var(--muted); font: 10px 'DM Mono', monospace; }
.hc-meta span + span::before { content: '·'; margin-right: 14px; color: var(--subtle); }

/* ——— hero light scene: colours set per element by haku-control.js ——— */
.hc-scene { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 22px 26px; align-items: center; justify-items: center; }
.hc-scene i { --c: #8b5cff; display: block; background: var(--c); box-shadow: 0 0 18px -2px var(--c), 0 0 46px -8px var(--c); }
.hc-rig {
  position: relative;
  grid-row: span 2;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 20px 18px 30px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  backdrop-filter: blur(6px);
}
.hc-ram { display: flex; gap: 10px; }
.hc-ram i { width: 12px; height: 92px; border-radius: 3px; }
.hc-strip { display: flex; gap: 3px; padding: 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: #0e0e0e; }
.hc-strip i { width: 14px; height: 5px; border-radius: 2px; }
.hc-wall { position: relative; display: grid; grid-template-columns: repeat(3, 44px); gap: 7px; padding-bottom: 22px; }
.hc-wall i { aspect-ratio: 1; border-radius: 7px; opacity: .92; }
.hc-wall i:nth-child(2), .hc-wall i:nth-child(5) { transform: translateY(14px); }
.hc-bulbs { display: flex; gap: 26px; }
.hc-bulbs i { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 22px 2px var(--c), 0 0 60px 4px var(--c); }
.hc-label { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); color: var(--subtle); font: 9px 'DM Mono', monospace; letter-spacing: .3em; text-transform: uppercase; }
.hc-wall { padding-bottom: 38px; }
.hc-wall .hc-label { bottom: 0; }

/* ——— stats + screenshot ——— */
.hc-stats strong { background: linear-gradient(180deg, #fff 20%, #8d8d8d); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hc-shot {
  position: relative;
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: #0c0c0c;
  box-shadow: var(--shadow), 0 0 80px -30px var(--hc-glow);
  transition: box-shadow .6s ease;
}
.hc-shot-bar { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,.08); background: #111; }
.hc-shot-bar span { width: 9px; height: 9px; border-radius: 50%; background: #2c2c2c; }
.hc-shot-bar b { margin-left: 10px; color: var(--subtle); font: 400 10px 'DM Mono', monospace; }
.hc-shot-full { margin-left: auto; color: var(--muted); font: 10px 'DM Mono', monospace; transition: color .2s; }
.hc-shot-full:hover { color: #fff; }
.hc-shot-stage { position: relative; aspect-ratio: 16 / 10; background: #0a0a0a; }
.hc-shot-stage img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.012); transition: opacity .45s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.hc-shot-stage img.is-active { opacity: 1; transform: none; }
.hc-shot-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.08); background: #101010; }
.hc-shot-tabs button { position: relative; display: grid; gap: 4px; padding: 14px 16px 15px; border-right: 1px solid rgba(255,255,255,.06); background: transparent; text-align: left; transition: background .2s; }
.hc-shot-tabs button:last-child { border-right: 0; }
.hc-shot-tabs button::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, var(--hc-a), var(--hc-b), var(--hc-c)); opacity: 0; transition: opacity .3s; }
.hc-shot-tabs button:hover { background: rgba(255,255,255,.04); }
.hc-shot-tabs button[aria-selected="true"] { background: rgba(255,255,255,.06); }
.hc-shot-tabs button[aria-selected="true"]::after { opacity: 1; }
.hc-shot-tabs strong { color: #9a9a9a; font-size: 13px; font-weight: 600; letter-spacing: -.02em; transition: color .2s; }
.hc-shot-tabs button[aria-selected="true"] strong, .hc-shot-tabs button:hover strong { color: #fff; }
.hc-shot-tabs span { color: var(--subtle); font: 10px 'DM Mono', monospace; line-height: 1.4; }

/* ——— what's new ——— */
.hc-new { display: grid; grid-template-columns: 1.35fr .65fr; gap: 12px; }
.hc-new-main { position: relative; overflow: hidden; }
.hc-new-main::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--hc-a), var(--hc-b), var(--hc-c)); opacity: .8; }
.hc-new-list { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.hc-new-list li { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hc-new-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.hc-new-list strong { font-size: 15px; letter-spacing: -.02em; }
.hc-new-list span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.hc-new-list--small strong { font-size: 13px; }
.hc-new-list--small span { font-size: 12px; }
.hc-dev-list b.hc-badge-new { color: #fff; background: linear-gradient(90deg, #138fc0, #6c3fd8, #c8287f); }

/* ——— features ——— */
.hc-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hc-feature { position: relative; overflow: hidden; transition: border-color .24s ease, transform .24s ease; }
.hc-feature:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.hc-feature::after {
  content: '';
  position: absolute;
  left: 23px; right: 23px; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hc-a), var(--hc-b), var(--hc-c));
  opacity: 0;
  transform: scaleX(.3);
  transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
}
.hc-feature:hover::after { opacity: .9; transform: scaleX(1); }
.hc-ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: #171717; }
.hc-ico svg { width: 19px; height: 19px; fill: none; stroke: #eee; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hc-feature h2 { margin-bottom: 9px; font-size: 17px; }

/* ——— devices ——— */
.hc-devices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hc-dev-list { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.hc-dev-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hc-dev-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.hc-dev-list strong { font-size: 14px; letter-spacing: -.02em; }
.hc-dev-list span { grid-column: 1; color: var(--muted); font: 10px 'DM Mono', monospace; }
.hc-dev-list b { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 4px 7px; border-radius: 5px; color: #111; background: #fff; font: 500 9px 'DM Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.hc-tags span { font-size: 11px; transition: border-color .2s, color .2s; }
.hc-tags span:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.info-card .hc-note { margin-top: 18px; font-size: 12px; }

/* ——— install ——— */
.hc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hc-step-n { display: block; margin-bottom: 22px; color: var(--subtle); font: 11px 'DM Mono', monospace; }
.hc-step h2 { margin-bottom: 8px; font-size: 17px; }
.hc-req { margin: 14px 2px 0; color: var(--subtle); font: 11px/1.7 'DM Mono', monospace; }
.hc-req a { color: #bcbcbc; border-bottom: 1px solid rgba(255,255,255,.25); }
.hc-req a:hover { color: #fff; border-color: #fff; }

/* ——— final call to action ——— */
.hc-cta {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  margin-top: 54px;
  padding: 30px 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  isolation: isolate;
}
.hc-cta::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 2px;
  background: linear-gradient(90deg, var(--hc-a), var(--hc-b), var(--hc-c), var(--hc-a));
  background-size: 300% 100%;
  animation: hc-sweep 6s linear infinite;
}
.hc-cta-mark { width: 72px; height: 72px; opacity: .9; }
.hc-cta h2 { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.05em; }
.hc-cta p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.hc-cta-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

@media (min-width: 701px) and (max-width: 980px) {
  .hc-hero { grid-template-columns: 1fr; min-height: 0; padding: 30px; }
  .hc-scene { justify-self: start; }
  .hc-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-shot-tabs span { display: none; }
  .hc-new { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hc-hero { grid-template-columns: 1fr; min-height: 0; padding: 26px 22px; border-radius: 21px; gap: 34px; }
  .hc-hero::after { width: 140%; right: -60%; top: 78%; }
  .hc-scene { justify-self: center; gap: 18px; }
  .hc-ram i { height: 72px; }
  .hc-strip i { width: 10px; }
  .hc-wall { grid-template-columns: repeat(3, 34px); }
  .hc-bulbs { gap: 20px; }
  .hc-meta { gap: 4px 12px; }
  .hc-meta span + span::before { content: none; }
  .hc-features, .hc-devices, .hc-steps, .hc-new { grid-template-columns: 1fr; }
  .hc-shot-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .hc-shot-tabs button { flex: 0 0 auto; padding: 12px 14px; }
  .hc-shot-tabs span { display: none; }
  .hc-shot-full { display: none; }
  .hc-cta { grid-template-columns: 1fr; gap: 18px; padding: 26px 22px; }
  .hc-cta-mark { width: 56px; height: 56px; }
}
@media (min-width: 1536px) {
  .hc-hero { min-height: clamp(440px, 30vw, 560px); padding: clamp(38px, 3vw, 58px); }
  .hc-lead { font-size: clamp(16px, 1.05vw, 19px); max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-download::before, .hc-cta::before { animation: none; }
}
