/* ==========================================================================
   How It Works — technical documentation
   Blueprint-ish. A cinematic access-control hero, lamp states, a road-vs-plant panel,
   and the manual laid out with a sticky step index.
   Prefix: hw-
   ========================================================================== */

.hw-page { background: #040404; position: relative; overflow: clip; }
@supports not (overflow: clip) { .hw-page { overflow: hidden; } }

.hw-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 5; }

.hw-mono {
  font-family: 'Chakra Petch', sans-serif;
  text-transform: uppercase; letter-spacing: .2em;
  font-size: 10px; font-weight: 600;
}

/* ------------------------------------------------------------------ hero */

.hw-hero {
  padding: 180px 0 90px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: relative; overflow: hidden;
  background: #040404;
}
/* Drafting grid. */
.hw-hero:before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 48px);
  mask-image: linear-gradient(160deg, #000 10%, transparent 75%);
  -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 75%);
}
.hw-hero .hw-wrap { max-width: 1440px; }
.hw-hero__grid {
  display: grid; grid-template-columns: minmax(360px, .78fr) minmax(560px, 1.22fr);
  gap: clamp(44px, 5vw, 84px); align-items: center;
}
.hw-tag {
  display: inline-block; color: var(--primary);
  border: 1px solid rgba(216,35,52,.4); padding: 7px 14px; margin-bottom: 26px;
}
.hw-hero h1 {
  margin: 0; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.02em;
}
.hw-hero p { margin: 26px 0 0; color: rgba(255,255,255,.6); font-weight: 300; font-size: 17px; line-height: 1.85; max-width: 52ch; }
.hw-hero__acts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 15px 28px;
  border: 2px solid var(--primary); background: var(--primary); color: #fff;
  text-transform: uppercase; letter-spacing: .12em;
  font-family: 'Chakra Petch', sans-serif; font-size: 13px; font-weight: 600;
  transition: all .4s cubic-bezier(.22,.61,.36,1);
}
.hw-btn:hover { background: transparent; }
.hw-btn--line { border-color: rgba(255,255,255,.28); background: transparent; }
.hw-btn--line:hover { border-color: #fff; background: #fff; color: #000; }

/* --------------------------------------------------------- hero visual */

.hw-visual {
  margin: 0; min-height: clamp(470px, 38vw, 610px); position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.2); background: #090909;
  box-shadow: 0 32px 90px rgba(0,0,0,.55);
}
.hw-visual:before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.04) 45%, rgba(0,0,0,.72) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.hw-visual img { width: 100%; height: 100%; position: absolute; inset: 0; display: block; object-fit: cover; object-position: 54% center; }
.hw-visual__eyebrow {
  position: absolute; z-index: 2; top: 22px; right: 22px; padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.62); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: 'Chakra Petch', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
}
.hw-visual__status {
  position: absolute; z-index: 2; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 15px;
  min-width: 260px; padding: 17px 20px; border: 1px solid rgba(76,211,133,.42);
  background: rgba(2,14,8,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.hw-visual__status > i {
  width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; background: #4cd385;
  box-shadow: 0 0 0 6px rgba(76,211,133,.1), 0 0 24px rgba(76,211,133,.85);
}
.hw-visual__status span { display: grid; gap: 3px; }
.hw-visual__status strong {
  color: #fff; font-family: 'Chakra Petch', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
.hw-visual__status small { color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .06em; }

/* ---------------------------------------------------------- lamp states */

.hw-lamps { padding: 100px 0; }
.hw-h2 {
  margin: 0 0 14px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.05;
}
.hw-lead { color: rgba(255,255,255,.5); font-weight: 300; line-height: 1.8; margin: 0 0 44px; max-width: 62ch; }

.hw-lamp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hw-lamp {
  border: 1px solid rgba(255,255,255,.14);
  background: #070707; padding: 40px 36px;
  display: grid; grid-template-columns: 64px 1fr; gap: 28px; align-items: start;
}
.hw-lamp__bulb {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
}
.hw-lamp__bulb i { width: 26px; height: 26px; border-radius: 50%; display: block; }
.hw-lamp--go { border-color: rgba(52,180,110,.32); }
.hw-lamp--go .hw-lamp__bulb { border-color: rgba(52,180,110,.5); background: rgba(52,180,110,.08); }
.hw-lamp--go .hw-lamp__bulb i { background: #34b46e; box-shadow: 0 0 22px rgba(52,180,110,.8); }
.hw-lamp--stop { border-color: rgba(216,35,52,.32); }
.hw-lamp--stop .hw-lamp__bulb { border-color: rgba(216,35,52,.55); background: rgba(216,35,52,.08); }
.hw-lamp--stop .hw-lamp__bulb i { background: var(--primary); box-shadow: 0 0 22px rgba(216,35,52,.8); }
.hw-lamp h3 {
  margin: 0 0 12px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-size: 19px; font-weight: 600;
}
.hw-lamp p { margin: 0; color: rgba(255,255,255,.58); font-weight: 300; line-height: 1.8; font-size: 15px; }

/* -------------------------------------------------------- spec plates */

.hw-plates { padding: 0 0 100px; }
.hw-plate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.hw-plate {
  border: 1px solid rgba(255,255,255,.14); background: #070707;
  padding: 32px 30px; position: relative;
  transition: border-color .4s ease, background .4s ease;
}
.hw-plate:hover { border-color: rgba(216,35,52,.5); background: #0c0c0c; }
.hw-plate__id {
  color: var(--primary); display: block; margin-bottom: 18px;
  font-family: 'Chakra Petch', sans-serif; text-transform: uppercase;
  letter-spacing: .2em; font-size: 10px; font-weight: 600;
}
.hw-plate h3 {
  margin: 0 0 12px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-size: 18px; font-weight: 600;
}
.hw-plate p { margin: 0; color: rgba(255,255,255,.56); font-weight: 300; font-size: 15px; line-height: 1.8; }
.hw-plate p strong { color: #fff; font-weight: 600; }

/* ------------------------------------------------------ road vs plant */

.hw-vs { padding: 0 0 100px; }
.hw-vs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid rgba(255,255,255,.16); }
.hw-vs__col { padding: 44px 40px; }
.hw-vs__col + .hw-vs__col { border-left: 1px solid rgba(255,255,255,.16); }
.hw-vs__col--road { background: #070707; }
.hw-vs__col--plant { background: linear-gradient(160deg, rgba(216,35,52,.1), #070707 65%); }
.hw-vs__col h3 {
  margin: 0 0 6px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-size: 22px; font-weight: 600;
}
.hw-vs__col > span {
  display: block; margin-bottom: 26px; color: rgba(255,255,255,.4);
  font-family: 'Chakra Petch', sans-serif; text-transform: uppercase;
  letter-spacing: .18em; font-size: 10px; font-weight: 600;
}
.hw-vs__col dl { margin: 0; }
.hw-vs__col dt {
  color: var(--primary); margin-top: 22px;
  font-family: 'Chakra Petch', sans-serif; text-transform: uppercase;
  letter-spacing: .14em; font-size: 10px; font-weight: 600;
}
.hw-vs__col dd { margin: 8px 0 0; color: rgba(255,255,255,.62); font-weight: 300; font-size: 15px; line-height: 1.75; }

/* ------------------------------------------------------ manual, indexed */

.hw-manual { border-top: 1px solid rgba(255,255,255,.12); padding: 100px 0; }
.hw-manual__grid { display: grid; grid-template-columns: 250px 1fr; gap: 70px; align-items: start; }
.hw-index { position: sticky; top: 120px; }
.hw-index > span {
  display: block; color: rgba(255,255,255,.4); padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.16); margin-bottom: 10px;
  font-family: 'Chakra Petch', sans-serif; text-transform: uppercase;
  letter-spacing: .18em; font-size: 10px; font-weight: 600;
}
.hw-index a {
  display: flex; gap: 12px; padding: 9px 0;
  color: rgba(255,255,255,.45);
  text-transform: none; letter-spacing: normal;
  font-family: 'Mulish', sans-serif; font-size: 14px; font-weight: 300; line-height: 1.4;
  transition: color .3s ease, padding-left .3s ease;
}
.hw-index a b { color: rgba(255,255,255,.25); font-weight: 600; font-family: 'Chakra Petch', sans-serif; font-size: 11px; padding-top: 2px; }
.hw-index a:hover { color: #fff; padding-left: 5px; }
.hw-index a.is-active { color: #fff; }
.hw-index a.is-active b { color: var(--primary); }

.hw-step { scroll-margin-top: 110px; padding-bottom: 56px; }
.hw-step + .hw-step { border-top: 1px solid rgba(255,255,255,.1); padding-top: 56px; }
.hw-step__n {
  display: inline-block; color: var(--primary); margin-bottom: 16px;
  font-family: 'Chakra Petch', sans-serif; text-transform: uppercase;
  letter-spacing: .2em; font-size: 10px; font-weight: 600;
}
.hw-step h3 {
  margin: 0 0 18px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-size: 24px; font-weight: 600; line-height: 1.2;
}
.hw-step p { margin: 0 0 16px; color: rgba(255,255,255,.6); font-weight: 300; font-size: 16px; line-height: 1.85; max-width: 68ch; }
.hw-step p strong { color: #fff; font-weight: 600; }
.hw-step ul { list-style: none; margin: 0 0 16px; padding: 0; max-width: 68ch; }
.hw-step li {
  color: rgba(255,255,255,.6); font-weight: 300; font-size: 15px; line-height: 1.75;
  padding: 12px 0 12px 24px; border-top: 1px solid rgba(255,255,255,.08); position: relative;
}
.hw-step li:before { content: ""; position: absolute; left: 0; top: 21px; width: 11px; height: 2px; background: var(--primary); }
.hw-step li strong { color: #fff; font-weight: 600; }
.hw-step a { color: var(--primary); text-transform: none; font-family: inherit; font-size: inherit; display: inline; }

.hw-tip {
  border-left: 2px solid var(--primary); background: rgba(216,35,52,.07);
  padding: 20px 24px; margin: 0 0 16px; max-width: 68ch;
}
.hw-tip b {
  display: block; margin-bottom: 8px; color: var(--primary);
  font-family: 'Chakra Petch', sans-serif; text-transform: uppercase;
  letter-spacing: .16em; font-size: 10px; font-weight: 600;
}
.hw-tip p { margin: 0; color: rgba(255,255,255,.78); font-size: 15px; }

.hw-figure { margin: 26px 0 0; border: 1px solid rgba(255,255,255,.14); background: #0b0b0b; max-width: 760px; }
.hw-figure__bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12); background: #0d0d0d;
}
.hw-figure__bar i { width: 8px; height: 8px; border-radius: 50%; background: #2a2a2a; }
.hw-figure__bar i:first-child { background: var(--primary); }
.hw-figure__bar span { margin-left: 10px; color: rgba(255,255,255,.35); font-family: 'Chakra Petch', sans-serif; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hw-figure img { width: 100%; display: block; cursor: zoom-in; }

/* --------------------------------------------------------- icon legend */

.hw-legend { border-top: 1px solid rgba(255,255,255,.12); padding: 100px 0; }
.hw-legend__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hw-key {
  border: 1px solid rgba(255,255,255,.14); background: #070707;
  padding: 30px 24px; text-align: center;
  transition: border-color .4s ease, transform .4s cubic-bezier(.22,.61,.36,1);
}
.hw-key:hover { border-color: rgba(216,35,52,.5); transform: translateY(-4px); }
.hw-key__mark {
  width: 52px; height: 52px; margin: 0 auto 20px;
  border: 1.5px solid rgba(255,255,255,.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Chakra Petch', sans-serif; font-size: 17px; font-weight: 600;
}
.hw-key--alert .hw-key__mark { border-color: var(--primary); color: var(--primary); background: rgba(216,35,52,.1); }
.hw-key--ok .hw-key__mark { border-color: rgba(52,180,110,.6); color: #34b46e; }
.hw-key__mark svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hw-key__mark .hw-spin { animation: hw-revolve 2.4s linear infinite; transform-origin: 50% 50%; }
@keyframes hw-revolve { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hw-key__mark .hw-spin { animation: none; } }
.hw-key h3 {
  margin: 0 0 8px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .06em;
}
.hw-key p { margin: 0; color: rgba(255,255,255,.5); font-weight: 300; font-size: 13px; line-height: 1.7; }

/* --------------------------------------------------------- download bar */

.hw-dl {
  border: 1px solid rgba(255,255,255,.16); background: linear-gradient(120deg, rgba(216,35,52,.14), #060606 60%);
  padding: 44px 46px; margin-bottom: 100px;
  display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap;
}
.hw-dl h3 {
  margin: 0 0 8px; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-size: 21px; font-weight: 600;
}
.hw-dl p { margin: 0; color: rgba(255,255,255,.55); font-weight: 300; font-size: 15px; }

/* ------------------------------------------------------------- red end */

.hw-end { background: var(--primary); padding: 76px 0; }
.hw-end__in { display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap; }
.hw-end h2 {
  margin: 0; color: #fff; text-transform: uppercase;
  font-family: 'Chakra Petch', sans-serif; font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.05;
}
.hw-end p { margin: 12px 0 0; color: rgba(255,255,255,.85); font-weight: 300; max-width: 48ch; }
.hw-end__acts { display: flex; gap: 14px; flex-wrap: wrap; }
.hw-end__acts a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 16px 30px; border: 2px solid #fff; color: #fff;
  text-transform: uppercase; letter-spacing: .12em;
  font-family: 'Chakra Petch', sans-serif; font-size: 13px; font-weight: 600;
  transition: all .4s cubic-bezier(.22,.61,.36,1);
}
.hw-end__acts a.is-solid { background: #000; border-color: #000; }
.hw-end__acts a:hover { background: #fff; color: var(--primary); border-color: #fff; }

/* ----------------------------------------------------------- responsive */

@media (max-width: 1050px) {
  .hw-hero { padding: 150px 0 70px; }
  .hw-hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hw-visual { min-height: 520px; }
  .hw-manual__grid { grid-template-columns: 1fr; gap: 34px; }
  .hw-index { position: static; }
  .hw-index a { display: inline-flex; margin-right: 18px; }
  .hw-legend__grid { grid-template-columns: repeat(3, 1fr); }
  .hw-lamps, .hw-manual, .hw-legend { padding: 80px 0; }
}

@media (max-width: 720px) {
  .hw-lamp-grid, .hw-plate-grid, .hw-vs__grid { grid-template-columns: 1fr; }
  .hw-vs__col + .hw-vs__col { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
  .hw-legend__grid { grid-template-columns: repeat(2, 1fr); }
  .hw-lamp { grid-template-columns: 1fr; gap: 20px; }
  .hw-dl { padding: 32px 26px; }
  .hw-end__acts a, .hw-btn { width: 100%; }
  .hw-visual { min-height: 380px; }
  .hw-visual__eyebrow { top: 16px; right: 16px; }
  .hw-visual__status { left: 16px; right: 16px; bottom: 16px; min-width: 0; }
}
