/* =========================================================
   دستگاه جوجه‌کشی — راهنمای کاربری
   Design system: "Panel & Bezel"
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  /* ---- palette ---- */
  --panel:      #171c22;   /* dark enclosure steel */
  --panel-2:    #212831;   /* lighter steel panel */
  --panel-3:    #2b333e;
  --line-dark:  #3a4451;

  --copper:     #c17f3a;
  --copper-lt:  #e3ab6d;

  --hazard:     #f2b705;
  --hazard-ink: #171c22;

  --teal:       #45a89d;
  --teal-dim:   #2c6a63;

  --paper:      #eef1ee;
  --paper-2:    #ffffff;
  --ink:        #171c22;
  --ink-soft:   #566270;
  --line:       #d8dcd8;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --font-display: 'Vazirmatn', Tahoma, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-lift: 0 18px 40px -12px rgba(23,28,34,0.35);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  font-family: var(--font-display);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

img{ max-width:100%; display:block; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--copper);
  text-transform: uppercase;
  direction: ltr;
  display: inline-block;
}

/* =========================================================
   HERO / HEADER
   ========================================================= */

.hero{
  background: linear-gradient(160deg, var(--panel) 0%, #10141a 100%);
  color: #f2f4f2;
  position: relative;
  overflow: hidden;
  padding: 64px 24px 48px;
}

.hero::before{
  /* faint circuit grid texture */
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(0deg, transparent 24px, rgba(255,255,255,0.035) 25px),
    linear-gradient(90deg, transparent 24px, rgba(255,255,255,0.035) 25px);
  background-size: 25px 25px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner{
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(197,141,72,0.12);
  border: 1px solid rgba(197,141,72,0.4);
  color: var(--copper-lt);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.hero-badge .dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.hero h1{
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 18px;
  color: #f5f6f4;
}

.hero p.lead{
  font-size: 1.08rem;
  color: #b7c0c6;
  max-width: 46ch;
  margin-bottom: 28px;
}

.hero-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8a97a1;
}

.hero-meta strong{
  color: #e7ebe9;
  display: block;
  font-size: 15px;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 2px;
}

.hero-visual{
  position: relative;
}

.hero-visual .plate{
  margin: 0;
}

/* =========================================================
   PANEL PLATE — signature frame for enclosure/schematic photos
   ========================================================= */

.plate{
  position: relative;
  background: linear-gradient(155deg, var(--panel-2), var(--panel));
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.plate .bolt{
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9aa4ac, #3a4451 70%);
  box-shadow: inset 0 0 2px rgba(0,0,0,0.6), 0 1px 1px rgba(255,255,255,0.15);
}
.plate .bolt::after{
  content:"";
  position:absolute; inset: 3px;
  border-top: 1px solid rgba(0,0,0,0.55);
}
.plate .bolt.tl{ top:10px; left:10px; }
.plate .bolt.tr{ top:10px; right:10px; }
.plate .bolt.bl{ bottom:10px; left:10px; }
.plate .bolt.br{ bottom:10px; right:10px; }

.plate .plate-frame{
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #05070a;
  cursor: zoom-in;
}

.plate .plate-frame img{
  width: 100%;
  display: block;
  transition: transform .5s var(--ease);
}
.plate .plate-frame:hover img{ transform: scale(1.015); }

.plate-cap{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8a97a1;
  direction: ltr;
  text-align: left;
}
.plate-cap b{ color: #e7ebe9; font-weight: 500; }

/* =========================================================
   NAV — switch panel
   ========================================================= */

.switch-nav-wrap{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--line-dark);
}

.switch-nav{
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.switch-nav::-webkit-scrollbar{ display:none; }

.switch-tab{
  flex: 1 0 auto;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #8a97a1;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  padding: 16px 18px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.switch-tab .led{
  width: 7px; height: 7px; border-radius: 50%;
  background: #3a4451;
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}

.switch-tab:hover{ color: #dfe4e2; }

.switch-tab.active{
  color: #f5f6f4;
  border-bottom-color: var(--copper);
}
.switch-tab.active .led{
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */

.content{
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}

section.pane{ display:none; }
section.pane.active{
  display:block;
  animation: rise .45s var(--ease);
}
@keyframes rise{
  from{ opacity:0; transform: translateY(14px); }
  to{ opacity:1; transform: translateY(0); }
}

.pane-head{ margin-bottom: 36px; max-width: 62ch; }
.pane-head h2{
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  margin: 8px 0 12px;
}
.pane-head p{ color: var(--ink-soft); font-size: 1.02rem; }

.pane-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: start;
}

@media (max-width: 900px){
  .pane-grid{ grid-template-columns: 1fr; }
  .hero-inner{ grid-template-columns: 1fr; }
}

/* legend rows */
.legend{ margin-top: 8px; }
.legend-group + .legend-group{ margin-top: 26px; }
.legend-group h4{
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-group h4 .sw{ width:9px; height:9px; border-radius:3px; display:inline-block; }

.legend-row{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.legend-row:last-child{ border-bottom: none; }

.badge{
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--panel);
  color: #f2f4f2;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  direction: ltr;
}
.badge.yellow{ background: var(--hazard); color: var(--hazard-ink); }
.badge.blue{ background: #33627a; }
.badge.green{ background: var(--teal-dim); }
.badge.copper{ background: var(--copper); color: var(--hazard-ink); }

.legend-row span{ font-size: .98rem; }

/* info / warning callouts */
.callout{
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-top: 26px;
  display: flex;
  gap: 14px;
}
.callout .icon{ font-size: 1.3rem; flex: none; line-height:1.4; }
.callout h4{ font-size: .98rem; margin-bottom: 6px; font-weight: 700; }
.callout p, .callout li{ font-size: .93rem; color: inherit; }

.callout.info{
  background: rgba(69,168,157,0.09);
  border: 1px solid rgba(69,168,157,0.3);
  color: #1d4a45;
}
.callout.info h4{ color: var(--teal-dim); }

.callout.warn{
  background: repeating-linear-gradient(135deg, rgba(242,183,5,0.13) 0 14px, rgba(242,183,5,0.06) 14px 28px);
  border: 1px solid rgba(242,183,5,0.55);
  color: #6b5205;
}
.callout.warn h4{ color: #8a6a06; }
.callout.warn ul{ margin-top: 6px; padding-right: 18px; display:grid; gap:6px; }

.spec-list{ margin-top: 26px; display:grid; gap: 10px; }
.spec-list li{
  list-style: none;
  display:flex; gap:10px; align-items:baseline;
  font-size: .95rem; color: var(--ink-soft);
}
.spec-list li::before{
  content:"▹";
  color: var(--copper);
  font-size: .8rem;
}

/* =========================================================
   OVERVIEW component list
   ========================================================= */

.component-list{ display:grid; gap:14px; margin-top: 8px; }
.component-card{
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.component-card .num{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--copper);
  border: 1px solid var(--copper);
  border-radius: 50%;
  width: 28px; height: 28px;
  display:flex; align-items:center; justify-content:center;
  flex: none;
}
.component-card h4{ font-size: 1rem; margin-bottom: 4px; }
.component-card p{ font-size: .9rem; color: var(--ink-soft); }

/* =========================================================
   DEVICE BEZEL — screen gallery signature
   ========================================================= */

.screen-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
  margin-top: 10px;
}

.bezel{
  background: linear-gradient(165deg, #232a32, #12161b);
  border-radius: 18px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-lift);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.bezel:hover{ transform: translateY(-4px); }

.bezel-top{
  display:flex; align-items:center; gap:7px;
  padding: 0 4px 10px;
}
.bezel-top .power-led{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
}
.bezel-top span{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: #7d8a92;
  direction: ltr;
}

.bezel-screen{
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background:#000;
}
.bezel-screen img{ width:100%; display:block; transition: transform .4s var(--ease); }
.bezel-screen:hover img{ transform: scale(1.03); }
.bezel-screen::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), transparent 45%);
  pointer-events:none;
}

.bezel-vent{
  display:flex; gap:4px; justify-content:center;
  padding-top: 12px;
}
.bezel-vent span{
  width: 14px; height: 2px; border-radius:2px;
  background: rgba(255,255,255,0.08);
}

.bezel-cap{
  text-align:center;
  padding-top: 12px;
  font-size: .92rem;
  font-weight: 600;
  color: #eef1ee;
}
.bezel-desc{
  text-align:center;
  font-size: .8rem;
  color: #8a97a1;
  padding-top: 4px;
  line-height: 1.6;
}

/* =========================================================
   SAFETY / CHECKLIST
   ========================================================= */

.hazard-band{
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 22px, var(--hazard-ink) 22px 44px);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 30px;
}
.hazard-band-inner{
  background: var(--panel);
  color: #f5f6f4;
  border-radius: calc(var(--radius-md) - 3px);
  padding: 22px 24px;
}
.hazard-band-inner h4{
  font-family: var(--font-mono);
  color: var(--hazard);
  font-size: 13px;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.hazard-band-inner ul{ display:grid; gap:10px; padding-right: 20px; }
.hazard-band-inner li{ font-size: .95rem; color: #d7dcd8; }
.hazard-band-inner li strong{ color: #fff; }

.checklist{ display:grid; gap:10px; margin-top: 16px; }
.checklist li{
  list-style:none;
  display:flex; align-items:center; gap:12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .95rem;
}
.checklist li .box{
  flex:none; width:19px; height:19px;
  border-radius: 5px;
  border: 2px solid var(--teal);
  position: relative;
}
.checklist li .box::after{
  content:"";
  position:absolute; inset:0;
  background: var(--teal);
  clip-path: polygon(20% 50%, 40% 70%, 80% 20%, 90% 30%, 40% 90%, 10% 60%);
  transform: scale(0.85);
}

.maint-grid{
  display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 16px; margin-top: 30px;
}
.maint-card{
  background: var(--paper-2);
  border:1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}
.maint-card .freq{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--copper);
  letter-spacing: .06em;
  margin-bottom: 8px;
  display:block;
  direction: ltr;
}
.maint-card p{ font-size: .92rem; color: var(--ink-soft); }

/* =========================================================
   MODAL / LIGHTBOX
   ========================================================= */

.modal{
  position: fixed; inset:0;
  background: rgba(9,11,14,0.92);
  display:none;
  align-items:center; justify-content:center;
  z-index: 1000;
  padding: 30px;
}
.modal.open{ display:flex; }
.modal img{
  max-width: 92vw; max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal .close{
  position: absolute; top: 22px; left: 26px;
  color: #eef1ee;
  font-family: var(--font-mono);
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
}
.modal .close:hover{ background: rgba(255,255,255,0.14); }

/* =========================================================
   FOOTER
   ========================================================= */

footer{
  background: var(--panel);
  color: #8a97a1;
  text-align:center;
  padding: 28px 20px;
  font-size: .85rem;
  font-family: var(--font-mono);
  direction: ltr;
}

/* focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
