/* Homepage sections under the hero: LED counters + SAAD-01 pinout. Loaded by index.php only. */

/* 7-segment counters */
.led-band { border-bottom: 1px solid var(--hx-line); background: radial-gradient(120% 140% at 50% 0, #0f1a2e 0, #070c16 70%); }
.led { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 auto; padding: 30px 24px; list-style: none; }
.led li { position: relative; padding: 18px 18px 16px; border: 1px solid #1a2a44; border-radius: 10px; background: #050a13;
  box-shadow: inset 0 0 0 4px #0b1322, inset 0 10px 30px rgba(0,0,0,.6); }
.led li::before { content: attr(data-ref); position: absolute; top: 8px; right: 12px; font: 600 10px/1 var(--mono); letter-spacing: .1em; color: #3f5578; }
.led .num { display: flex; align-items: flex-end; gap: 7px; height: 52px; }
.led .lbl { display: block; margin-top: 12px; font: 500 13px/1.45 var(--mono); color: var(--hx-mute); }
.d { --t: 6px; position: relative; display: inline-block; width: 30px; height: 52px; transform: skewX(-7deg); }
.d i { position: absolute; border-radius: 3px; background: rgba(45, 212, 191, .07); transition: background-color .08s, box-shadow .08s; }
.d .sa, .d .sg, .d .sd { left: calc(var(--t) * .9); right: calc(var(--t) * .9); height: var(--t); }
.d .sa { top: 0; } .d .sg { top: calc(50% - var(--t) / 2); } .d .sd { bottom: 0; }
.d .sf, .d .sb, .d .se, .d .sc { width: var(--t); height: calc(50% - var(--t) * 1.1); }
.d .sf, .d .se { left: 0; } .d .sb, .d .sc { right: 0; }
.d .sf, .d .sb { top: calc(var(--t) * .6); } .d .se, .d .sc { bottom: calc(var(--t) * .6); }
.d[data-d="0"] .sa, .d[data-d="0"] .sb, .d[data-d="0"] .sc, .d[data-d="0"] .sd, .d[data-d="0"] .se, .d[data-d="0"] .sf,
.d[data-d="1"] .sb, .d[data-d="1"] .sc,
.d[data-d="2"] .sa, .d[data-d="2"] .sb, .d[data-d="2"] .sg, .d[data-d="2"] .se, .d[data-d="2"] .sd,
.d[data-d="3"] .sa, .d[data-d="3"] .sb, .d[data-d="3"] .sg, .d[data-d="3"] .sc, .d[data-d="3"] .sd,
.d[data-d="4"] .sf, .d[data-d="4"] .sg, .d[data-d="4"] .sb, .d[data-d="4"] .sc,
.d[data-d="5"] .sa, .d[data-d="5"] .sf, .d[data-d="5"] .sg, .d[data-d="5"] .sc, .d[data-d="5"] .sd,
.d[data-d="6"] .sa, .d[data-d="6"] .sf, .d[data-d="6"] .sg, .d[data-d="6"] .se, .d[data-d="6"] .sd, .d[data-d="6"] .sc,
.d[data-d="7"] .sa, .d[data-d="7"] .sb, .d[data-d="7"] .sc,
.d[data-d="8"] .sa, .d[data-d="8"] .sb, .d[data-d="8"] .sc, .d[data-d="8"] .sd, .d[data-d="8"] .se, .d[data-d="8"] .sf, .d[data-d="8"] .sg,
.d[data-d="9"] .sa, .d[data-d="9"] .sb, .d[data-d="9"] .sc, .d[data-d="9"] .sd, .d[data-d="9"] .sf, .d[data-d="9"] .sg { background: var(--hx-accent); box-shadow: 0 0 10px rgba(45, 212, 191, .65); }
.led .unit { font: 800 30px/1 var(--mono); color: var(--hx-accent); text-shadow: 0 0 12px rgba(45, 212, 191, .6); transform: skewX(-7deg); }
.led .unit small { font-size: .6em; color: var(--cu-hi); text-shadow: 0 0 10px rgba(240, 178, 122, .6); }
@media (max-width: 860px) { .led { grid-template-columns: 1fr 1fr; padding: 22px 16px; } }
@media (max-width: 420px) { .d { --t: 5px; width: 24px; height: 42px; } .led .num { height: 42px; gap: 5px; } .led .unit { font-size: 24px; } }

/* SAAD-01 pinout */
.pinout { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr minmax(170px, 220px) 1fr; margin-top: 40px; }
.pins { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 22px 0; list-style: none; }
.pins-r { flex-direction: column-reverse; }
.pin { display: flex; align-items: center; height: 100%; color: inherit; text-decoration: none; }
.pins-r .pin { flex-direction: row-reverse; }
.pin .pl { flex: 0 1 300px; padding: 12px 14px; border: 1px solid var(--hx-line); border-radius: 10px; background: var(--hx-surface); transition: border-color .2s, background-color .2s; }
.pin .pnum { font: 700 11px/1 var(--mono); letter-spacing: .1em; color: var(--cu-hi); }
.pin h3 { margin: 6px 0 4px; font-size: 16px; line-height: 1.3; color: #fff; }
.pin small { display: block; font-size: 13.5px; line-height: 1.5; color: var(--hx-mute); }
.pin .tr { position: relative; flex: 1 1 24px; min-width: 18px; height: 2px; background: var(--hx-line); transition: background-color .2s, box-shadow .2s; }
.pin .tr::after { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--hx-accent); box-shadow: 0 0 10px var(--hx-accent); opacity: 0; }
.pin .leg { flex: 0 0 22px; height: 10px; border-radius: 2px; background: linear-gradient(#e2a46c, #8a5a33); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.pin:hover .pl, .pin:focus-visible .pl { border-color: rgba(45, 212, 191, .55); background: #111d31; }
.pin:hover .tr, .pin:focus-visible .tr { background: var(--hx-accent); box-shadow: 0 0 8px rgba(45, 212, 191, .7); }
.pin:hover .tr::after, .pin:focus-visible .tr::after { animation: mbs-flow .9s linear infinite; }
.pins-r .pin:hover .tr::after, .pins-r .pin:focus-visible .tr::after { animation-name: mbs-flow-r; }
.pin:hover .leg, .pin:focus-visible .leg { background: linear-gradient(#ffd2a6, #c98a52); }
.pin.soon { opacity: .55; pointer-events: none; }
@keyframes mbs-flow { from { left: 0; opacity: 1; } to { left: calc(100% - 8px); opacity: 1; } }
@keyframes mbs-flow-r { from { left: calc(100% - 8px); opacity: 1; } to { left: 0; opacity: 1; } }
.ic { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 10px;
  background: linear-gradient(160deg, #1d2433, #0b0f17 60%); border: 1px solid #2a3448; box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06); text-align: center; }
.ic-notch { position: absolute; top: -1px; left: 50%; width: 34px; height: 17px; margin-left: -17px; border-radius: 0 0 17px 17px; background: var(--hx-night); border: 1px solid #2a3448; border-top: 0; }
.ic-dot { position: absolute; top: 16px; left: 16px; width: 10px; height: 10px; border-radius: 50%; background: #2a3448; }
.ic-name { font: 800 20px/1 var(--mono); letter-spacing: .08em; color: #d5dceb; }
.ic-code { font: 800 46px/1 var(--mono); color: var(--hx-accent); text-shadow: 0 0 18px rgba(45, 212, 191, .55); min-height: 46px; }
.ic-sub { max-width: 150px; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #6f82a3; min-height: 30px; }
.ic.lit { border-color: rgba(45, 212, 191, .5); }
@media (max-width: 900px) {
  .pinout { grid-template-columns: 1fr; }
  .ic { order: -1; flex-direction: row; flex-wrap: wrap; padding: 22px 16px; }
  .ic-code { font-size: 32px; min-height: 0; } .ic-sub { display: none; }
  .pins, .pins-r { flex-direction: column; padding: 14px 0 0 0; margin-left: 10px; border-left: 2px solid var(--hx-line); gap: 10px; }
  .pins-r { padding-top: 10px; }
  .pin, .pins-r .pin { flex-direction: row-reverse; }
  .pin .leg { display: none; } .pin .tr { flex: 0 0 16px; } .pin .pl { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .pin .tr::after { animation: none !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the pinout spans both columns, so the sticky section label must not ride over it */
.sec:has(> .pinout) > .sec-h { position: static; }
