nav .nav-links a[href="how-it-works.html"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.lightbox-trigger {
  cursor: zoom-in;
}

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 501;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

#page-hero {
  padding: 0 max(110px, calc(50% - 626px)) 0 max(112px, calc(50% - 624px));
  min-height: calc(100vh - 62px);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow-x: hidden;
  display: flex;
  align-items: center;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
  width: 100%;
  padding: 56px 0;
}

.page-hero-text .hero-actions { margin-bottom: 0; }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: max(112px, calc(50% - 624px));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.14em;
  animation: hint-bounce 2.8s ease-in-out infinite;
}

.hero-scroll-hint svg { opacity: 0.75; }

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%       { transform: translateY(7px); opacity: 1; }
}

.hero-flowchart {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 28px 24px;
  margin-top: 72px;
}

.hero-actions .btn-primary {
  box-shadow: 0 0 14px rgba(59,130,246,0.25), 0 4px 20px rgba(0,0,0,0.45);
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 500;
}

.hero-actions .btn-primary:hover {
  box-shadow: 0 0 22px rgba(59,130,246,0.4), 0 6px 24px rgba(0,0,0,0.5);
}

.hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.07em;
}

.hero-stats-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  flex-shrink: 0;
}

.hero-stats-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.22);
  margin-right: 2px;
}

.fc-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.14em;
  margin-bottom: 22px;
}

.fc-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 10px;
  border: 1px solid;
}

.fc-blue  { background: rgba(59,130,246,0.07);  border-color: rgba(59,130,246,0.35);  box-shadow: 0 0 22px rgba(59,130,246,0.1); }
.fc-cyan  { background: rgba(34,211,238,0.07);  border-color: rgba(34,211,238,0.35);  box-shadow: 0 0 22px rgba(34,211,238,0.1); }
.fc-green { background: rgba(74,222,128,0.07);  border-color: rgba(74,222,128,0.35);  box-shadow: 0 0 22px rgba(74,222,128,0.1); }

.fc-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.fc-icon-blue  { background: rgba(59,130,246,0.18); color: #3b82f6; }
.fc-icon-cyan  { background: rgba(34,211,238,0.18); color: #22d3ee; }
.fc-icon-green { background: rgba(74,222,128,0.18); color: #4ade80; }

.fc-body { flex: 1; min-width: 0; }

.fc-step-num {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 6px;
  opacity: 0.9;
}

.fc-blue  .fc-step-num { color: #3b82f6; }
.fc-cyan  .fc-step-num { color: #22d3ee; }
.fc-green .fc-step-num { color: #4ade80; }

.fc-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.fc-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 300;
}

@keyframes fc-step-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-flowchart > :nth-child(3) { animation: fc-step-in 0.25s ease 1.12s both; }
.hero-flowchart > :nth-child(5) { animation: fc-step-in 0.25s ease 1.52s both; }

@keyframes pulse-blue-box {
  0%   { box-shadow: 0 0 22px rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.35); animation-timing-function: ease-in; }
  22%  { box-shadow: 0 0 34px rgba(59,130,246,0.55), 0 0 0 1px rgba(59,130,246,0.45); border-color: rgba(59,130,246,0.85); animation-timing-function: ease-out; }
  44%  { box-shadow: 0 0 22px rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.35); }
  100% { box-shadow: 0 0 22px rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.35); }
}
@keyframes pulse-cyan-box {
  0%   { box-shadow: 0 0 22px rgba(34,211,238,0.1);  border-color: rgba(34,211,238,0.35); animation-timing-function: ease-in; }
  22%  { box-shadow: 0 0 34px rgba(34,211,238,0.55), 0 0 0 1px rgba(34,211,238,0.45); border-color: rgba(34,211,238,0.85); animation-timing-function: ease-out; }
  44%  { box-shadow: 0 0 22px rgba(34,211,238,0.1);  border-color: rgba(34,211,238,0.35); }
  100% { box-shadow: 0 0 22px rgba(34,211,238,0.1);  border-color: rgba(34,211,238,0.35); }
}
@keyframes pulse-green-box {
  0%   { box-shadow: 0 0 22px rgba(74,222,128,0.1);  border-color: rgba(74,222,128,0.35); animation-timing-function: ease-in; }
  22%  { box-shadow: 0 0 34px rgba(74,222,128,0.55), 0 0 0 1px rgba(74,222,128,0.45); border-color: rgba(74,222,128,0.85); animation-timing-function: linear; }
  34%  { box-shadow: 0 0 34px rgba(74,222,128,0.55), 0 0 0 1px rgba(74,222,128,0.45); border-color: rgba(74,222,128,0.85); animation-timing-function: ease-out; }
  52%  { box-shadow: 0 0 22px rgba(74,222,128,0.1);  border-color: rgba(74,222,128,0.35); }
  100% { box-shadow: 0 0 22px rgba(74,222,128,0.1);  border-color: rgba(74,222,128,0.35); }
}

@keyframes pulse-line-bc {
  0%   { background: linear-gradient(to bottom, rgba(59,130,246,0.15), rgba(34,211,238,0.15)); box-shadow: none; animation-timing-function: ease-in; }
  22%  { background: linear-gradient(to bottom, rgba(59,130,246,0.9),  rgba(34,211,238,0.9));  box-shadow: 0 0 7px rgba(34,211,238,0.55); animation-timing-function: ease-out; }
  44%  { background: linear-gradient(to bottom, rgba(59,130,246,0.15), rgba(34,211,238,0.15)); box-shadow: none; }
  100% { background: linear-gradient(to bottom, rgba(59,130,246,0.15), rgba(34,211,238,0.15)); box-shadow: none; }
}
@keyframes pulse-line-cg {
  0%   { background: linear-gradient(to bottom, rgba(34,211,238,0.15), rgba(74,222,128,0.15)); box-shadow: none; animation-timing-function: ease-in; }
  22%  { background: linear-gradient(to bottom, rgba(34,211,238,0.9),  rgba(74,222,128,0.9));  box-shadow: 0 0 7px rgba(74,222,128,0.55); animation-timing-function: ease-out; }
  44%  { background: linear-gradient(to bottom, rgba(34,211,238,0.15), rgba(74,222,128,0.15)); box-shadow: none; }
  100% { background: linear-gradient(to bottom, rgba(34,211,238,0.15), rgba(74,222,128,0.15)); box-shadow: none; }
}

@keyframes pulse-tip-cyan {
  0%, 44%, 100% { border-top-color: rgba(34,211,238,0.35); }
  22%            { border-top-color: rgba(34,211,238,0.95); }
}
@keyframes pulse-tip-green {
  0%, 52%, 100%  { border-top-color: rgba(74,222,128,0.35); }
  22%, 34%        { border-top-color: rgba(74,222,128,0.95); }
}

.fc-blue  { animation: fc-step-in 0.42s ease 0.9s both,  pulse-blue-box  10s linear 3.5s  infinite; }
.fc-cyan  { animation: fc-step-in 0.42s ease 1.3s both,  pulse-cyan-box  10s linear 4.65s infinite; }
.fc-green { animation: fc-step-in 0.42s ease 1.7s both,  pulse-green-box 10s linear 5.75s infinite; }
.fc-conn--bc  { animation: pulse-line-bc  10s linear 4.1s  infinite; }
.fc-conn--cg  { animation: pulse-line-cg  10s linear 5.2s  infinite; }
.fc-tip--cyan  { animation: pulse-tip-cyan  10s linear 4.1s  infinite; }
.fc-tip--green { animation: pulse-tip-green 10s linear 5.2s  infinite; }

.hero-flowchart:hover .fc-blue,
.hero-flowchart:hover .fc-cyan,
.hero-flowchart:hover .fc-green,
.hero-flowchart:hover .fc-conn--bc,
.hero-flowchart:hover .fc-conn--cg,
.hero-flowchart:hover .fc-tip--cyan,
.hero-flowchart:hover .fc-tip--green { animation-play-state: paused !important; }

.fc-step {
  cursor: default;
  transition: transform 0.22s ease;
}
.fc-step:hover { transform: translateY(-3px); }

.fc-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 40px;
  padding: 3px 0;
}

.fc-conn-line { width: 2px; height: 22px; }
.fc-conn--bc { background: linear-gradient(to bottom, rgba(59,130,246,0.2), rgba(34,211,238,0.2)); }
.fc-conn--cg { background: linear-gradient(to bottom, rgba(34,211,238,0.2), rgba(74,222,128,0.2)); }

.fc-conn-tip {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.fc-tip--cyan  { border-top: 7px solid rgba(34,211,238,0.35); }
.fc-tip--green { border-top: 7px solid rgba(74,222,128,0.35); }

.step-section {
  padding: 100px max(80px, calc(50% - 656px)) 100px max(112px, calc(50% - 624px));
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.step-section--center { align-items: center; }

.step-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

.fade-align-center { align-self: center; }

.step-device-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

.devicelist-img {
  width: 490px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

.step-device-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.step-content { padding-top: 4px; }

.step-content .step-num {
  font-family: 'DM Mono', monospace;
  font-size: 24px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.step-h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.step-body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 300;
}

.step-body p + p { margin-top: 14px; }

.step-body strong { color: var(--text); font-weight: 500; }

.step-note {
  margin-top: 24px;
  padding: 11px 15px;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 6px;
  font-size: 12px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  line-height: 1.7;
}

.step-note span { color: var(--dim); margin-right: 6px; }
.step-note--mt  { margin-top: 10px; }

.visual-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.visual-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.visual-card-title { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); }

.visual-card-badge {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.term-card {
  background: #020810;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.9;
}

.term-card-prompt { color: var(--dim); font-size: 12px; margin-bottom: 14px; letter-spacing: 0.05em; }

.t-line { display: flex; gap: 8px; }
.t-line .t-arrow { color: var(--dim); flex-shrink: 0; }
.t-line .t-msg   { color: var(--muted); }
.t-line .t-ok    { color: #4ade80; }
.t-line .t-info  { color: var(--accent); }

.t-sep { border-top: 1px solid var(--border); margin: 10px 0; }

.t-section-label { font-size: 12px; color: var(--dim); letter-spacing: 0.07em; margin: 14px 0 4px; }

.output-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.output-panel-inner { background: var(--bg2); }

.output-format-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

.output-format-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.output-table-wrap { padding: 14px 16px; }

.output-switch-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.vlan-tbl { width: 100%; border-collapse: collapse; font-family: 'DM Mono', monospace; font-size: 12px; }

.vlan-tbl th {
  text-align: left;
  color: var(--dim);
  font-weight: 400;
  padding: 0 8px 7px 0;
  border-bottom: 1px solid var(--border);
}

.vlan-tbl td { padding: 5px 8px 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.vlan-tbl td.port  { color: var(--muted); }
.vlan-tbl td.vid   { color: var(--accent); }
.vlan-tbl td.vname { color: var(--text); }

.output-footer-bar {
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--dim);
  background: #020810;
  display: flex;
  justify-content: space-between;
}

#requirements {
  padding: 100px max(80px, calc(50% - 656px)) 100px max(112px, calc(50% - 624px));
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 48px;
}

.req-card { background: var(--bg1); padding: 32px 28px; transition: background 0.2s; }
.req-card:hover { background: var(--bg2); }

.req-icon { font-family: 'DM Mono', monospace; font-size: 22px; color: var(--accent); margin-bottom: 18px; line-height: 1; }

.req-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.req-desc { font-size: 13px; color: var(--muted); line-height: 1.7; font-weight: 300; }

.req-tag {
  display: inline-block;
  margin-top: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  #page-hero {
    height: auto;
    min-height: calc(100vh - 56px);
    padding: 0 20px;
  }

  .page-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 0 64px;
  }

  .hero-flowchart {
    width: 100%;
    margin-top: 0;
  }

  .hero-scroll-hint { display: none; }

  .step-section {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 64px 20px;
  }

  .step-device-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .devicelist-img { width: 100%; }

  #requirements {
    padding: 64px 20px;
  }

  .req-grid { grid-template-columns: 1fr; }

  .output-compare { grid-template-columns: 1fr; }

  .term-card { border-radius: 8px; }
}
