/* دنتال‌ایجنت — صفحهٔ معرفی. طراحی مستقل با الهام از زبان بصری تلمتری/HUD،
   راست‌به‌چپ، دو مسیر عمودی که هنگام اسکرول در جهت مخالف حرکت می‌کنند. */

:root {
  --void: #030508;
  --panel: #070b12;
  --silver: #e2e8f0;
  --dim: rgba(226, 232, 240, 0.5);
  --faint: rgba(226, 232, 240, 0.22);
  --line: rgba(226, 232, 240, 0.1);
  --accent: #00f0ff;
  --accent-soft: rgba(0, 240, 255, 0.1);
  --accent-2: #ff3b6b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --disp: "Vazirmatn", sans-serif;
  --body: "Vazirmatn", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--void); color: var(--silver);
  font-family: var(--body); font-weight: 300;
  -webkit-font-smoothing: antialiased; direction: rtl;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(to right, rgba(226,232,240,.025) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(to bottom, rgba(226,232,240,.02) 0 1px, transparent 1px 120px);
}
::selection { background: var(--accent); color: var(--void); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
b { font-weight: 700; }

/* boot flash so first paint isn't a blank void */
.boot {
  position: fixed; inset: 0; z-index: 99; background: var(--void);
  display: grid; place-items: center; transition: opacity .4s var(--ease);
}
.boot span {
  width: 44px; height: 44px; border: 1px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
.boot.gone { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- STAGE + TWIN TRACKS ---------------- */
.stage { position: relative; z-index: 1; }
.panel {
  position: fixed; top: 0; height: 100vh; width: 50%;
  display: flex; align-items: center; will-change: transform;
}
.t-left { left: 0; }
.t-right { left: 50%; }
.panel-inner { width: 100%; padding: 108px clamp(30px, 4.5vw, 76px); }

.seam {
  position: fixed; top: 0; left: 50%; width: 1px; height: 100vh;
  background: var(--line); z-index: 4; pointer-events: none;
}
.seam::after {
  content: ""; position: absolute; left: -2px; top: 0; width: 5px; height: 54px;
  background: var(--accent); opacity: .9;
}

/* ---------------- HUD ---------------- */
.hud { position: fixed; inset: 0; z-index: 8; pointer-events: none; font-family: var(--disp); }
.hud a, .hud button { pointer-events: auto; }
.hud-frame {
  position: absolute; inset: 16px; border: 1px solid var(--line); pointer-events: none;
}
.hud-frame .ck, .hud-frame::before, .hud-frame::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid var(--accent);
}
.hud-frame::before { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hud-frame::after { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hud-frame .ck { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }

.hud-item { position: absolute; font-size: 11px; letter-spacing: .12em; }
.hud-brand { top: 30px; right: 34px; font-size: 15px; font-weight: 800; letter-spacing: .18em; }
.hud-brand .slash { color: var(--accent); margin-inline-start: 3px; }
.hud-index { top: 34px; left: 34px; color: var(--dim); }
.hud-index b { color: var(--silver); }
.hud-credit { bottom: 30px; right: 34px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.hud-credit .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.hud-credit-link { position: absolute; bottom: 12px; left: 16px; font-size: 9px; color: var(--faint); letter-spacing: .1em; }

.hud-cta {
  top: 62px; right: 34px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--accent); color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  background: var(--accent-soft); transition: background .2s var(--ease), color .2s var(--ease);
}
.hud-cta:hover { background: var(--accent); color: var(--void); }
.hud-cta .arw { width: 14px; height: 1px; background: currentColor; position: relative; }
.hud-cta .arw::after { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }

.hud-hint { left: 50%; bottom: 30px; transform: translateX(-50%); color: var(--dim); animation: pulse 2.4s ease-in-out infinite; transition: opacity .5s; }
.hud-hint.hide { opacity: 0; }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: .9; } }

.hud-arrows { left: 34px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.arrow-btn { width: 34px; height: 34px; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .2s; }
.arrow-btn:not(:disabled):hover { border-color: var(--accent); }
.arrow-btn:disabled { opacity: .3; cursor: default; }
.arrow-btn .chev { width: 8px; height: 8px; border-left: 1px solid var(--silver); border-top: 1px solid var(--silver); }
.arrow-btn.up .chev { transform: rotate(45deg); margin-top: 3px; }
.arrow-btn.down .chev { transform: rotate(225deg); margin-bottom: 3px; }

.hud-progress { left: 34px; bottom: 30px; color: var(--dim); display: flex; align-items: center; gap: 10px; }
.hud-progress .bar { width: 120px; height: 2px; background: var(--line); display: block; overflow: hidden; }
.hud-progress .bar i { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .1s linear; }

/* ---------------- SHARED TYPE ---------------- */
.eyebrow { font-family: var(--disp); font-size: 11px; letter-spacing: .2em; color: var(--accent); margin-bottom: 22px; }
.hero-title { font-family: var(--disp); font-weight: 800; font-size: clamp(40px, 6vw, 82px); line-height: .98; letter-spacing: .02em; }
.hero-title .slash { color: var(--accent); }
.hero-title .thin { font-weight: 300; }
.section-title { font-family: var(--disp); font-weight: 700; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.05; margin-bottom: 20px; }
.lede { max-width: 46ch; color: var(--dim); font-size: 15px; line-height: 1.9; margin: 20px 0 26px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.on { opacity: 1; transform: none; }

/* ---------------- HERO EXTRAS ---------------- */
.clock-shell { display: inline-flex; align-items: baseline; gap: 12px; border: 1px solid var(--line); padding: 10px 16px; font-family: var(--disp); margin-bottom: 24px; }
.clock-label { font-size: 10px; letter-spacing: .2em; color: var(--dim); }
#live-clock { font-size: 18px; letter-spacing: .08em; }
#live-clock .ms { color: var(--accent); font-size: .7em; }

.spec-row { display: flex; gap: 34px; flex-wrap: wrap; margin-bottom: 28px; }
.spec-cell { display: flex; flex-direction: column; gap: 4px; }
.spec-cell .k { font-family: var(--disp); font-size: 10px; letter-spacing: .18em; color: var(--dim); }
.spec-cell .v { font-family: var(--disp); font-size: 24px; font-weight: 700; }
.spec-cell .v small { font-size: .5em; color: var(--dim); margin-inline-start: 4px; }

.btn-cta {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--disp);
  font-size: 13px; font-weight: 700; letter-spacing: .12em; padding: 14px 26px;
  background: var(--accent); color: var(--void); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-cta::after { content: "←"; }
.btn-cta:hover { transform: translateX(-4px); box-shadow: -6px 6px 0 var(--accent-soft); }
.btn-cta.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-cta.ghost:hover { background: var(--accent-soft); }
.cta-note { font-family: var(--disp); font-size: 10px; letter-spacing: .12em; color: var(--faint); margin-top: 10px; }

/* ---------------- MEDIA / SCHEMATIC PANELS ---------------- */
.panel-media { padding: 0; align-items: stretch; }
.media-frame, .bp-stage, .kinetic-panel { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--panel); }
.media-frame.has-img, .bp-stage.has-img { background-size: cover; background-position: center; }
.media-frame.has-img::after, .bp-stage.has-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(0,240,255,.12), rgba(3,5,8,.65) 68%);
}
.grid-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 62% 40%, var(--accent-soft), transparent 55%),
    repeating-linear-gradient(to right, rgba(226,232,240,.05) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(to bottom, rgba(226,232,240,.04) 0 1px, transparent 1px 46px);
}
.has-img .grid-bg { opacity: .35; }
.scanline { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55; animation: scan 5.5s linear infinite; }
@keyframes scan { 0% { top: -2%; } 100% { top: 102%; } }
.glow-ring { position: absolute; left: 55%; top: 42%; width: 180px; height: 180px; border: 1px solid var(--accent); border-radius: 50%; box-shadow: 0 0 60px -10px var(--accent); }
.glow-ring::after { content: ""; position: absolute; inset: 22px; border: 1px dashed var(--faint); border-radius: 50%; }

.media-tag { position: absolute; inset-inline-start: 26px; bottom: 24px; font-family: var(--disp); font-size: 10px; letter-spacing: .18em; color: var(--silver); background: rgba(3,5,8,.6); padding: 6px 10px; border-inline-start: 2px solid var(--accent); }

/* ---------------- ACCORDION + REACTIVE SCHEMATIC ---------------- */
.accordion { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head { display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px 4px; text-align: right; font-family: var(--disp); }
.acc-index { font-size: 11px; letter-spacing: .16em; color: var(--accent); min-width: 42px; }
.acc-title { font-size: 17px; font-weight: 500; flex: 1; }
.acc-icon { width: 12px; height: 12px; position: relative; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; background: var(--silver); transition: transform .3s var(--ease); }
.acc-icon::before { left: 0; top: 5.5px; width: 12px; height: 1px; }
.acc-icon::after { left: 5.5px; top: 0; width: 1px; height: 12px; }
.acc-item.open .acc-icon::after { transform: scaleY(0); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.acc-body p { padding: 0 4px 14px; color: var(--dim); font-size: 14px; line-height: 1.9; }
.data-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px 22px; }
.data-strip span { font-family: var(--disp); font-size: 10px; letter-spacing: .1em; color: var(--accent); border: 1px solid var(--line); padding: 4px 8px; }

.bp-chip { position: absolute; top: 26px; inset-inline-start: 26px; font-family: var(--disp); font-size: 10px; letter-spacing: .16em; background: rgba(3,5,8,.6); padding: 6px 10px; border-inline-start: 2px solid var(--accent); }
.bp-marker { position: absolute; left: 22%; top: 26%; transition: left .5s var(--ease), top .5s var(--ease); }
.bp-ring { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border: 1px solid var(--accent); border-radius: 50%; }
.bp-hairline { position: absolute; left: -60px; top: 0; width: 42px; height: 1px; background: var(--accent); }
.bp-data { position: absolute; left: -60px; top: 8px; font-family: var(--disp); font-size: 9px; letter-spacing: .1em; color: var(--accent); white-space: nowrap; }
.bp-marker.blip .bp-ring { animation: blip .3s var(--ease); }
@keyframes blip { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* ---------------- 3D CAROUSEL ---------------- */
.carousel-panel { display: flex; flex-direction: column; gap: 22px; text-align: center; }
.c3d-stage { position: relative; height: 300px; perspective: 1100px; touch-action: pan-y; }
.c3d-stage.dragging { cursor: grabbing; }
.c3d { position: absolute; inset: 0; margin: auto; width: 210px; height: 250px; transform-style: preserve-3d; }
.c3d-card { position: absolute; inset: 0; }
.card-face { position: absolute; inset: 0; background: var(--panel); border: 1px solid var(--line); padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; text-align: right; }
.c-id { font-family: var(--disp); font-size: 9px; letter-spacing: .14em; color: var(--accent); }
.c-name { font-family: var(--disp); font-size: 19px; font-weight: 700; }
.c-desc { font-size: 12px; color: var(--dim); line-height: 1.8; flex: 1; }
.c-fig { font-family: var(--disp); font-size: 30px; font-weight: 800; }
.c-fig small { font-size: .38em; color: var(--dim); margin-inline-start: 4px; }

.c3d-status { font-family: var(--disp); font-size: 12px; letter-spacing: .14em; color: var(--dim); }
.c3d-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.c3d-ctl { width: 32px; height: 32px; border: 1px solid var(--line); display: grid; place-items: center; }
.c3d-ctl:hover { border-color: var(--accent); }
.c3d-ctl .chev-l, .c3d-ctl .chev-r { width: 7px; height: 7px; border-left: 1px solid var(--silver); border-bottom: 1px solid var(--silver); }
.c3d-ctl .chev-l { transform: rotate(45deg); }
.c3d-ctl .chev-r { transform: rotate(-135deg); }
.ico-play { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 8px solid var(--silver); }
.c3d-ctl.playing .ico-play { width: 8px; height: 10px; border: 0; border-inline-start: 2px solid var(--accent); border-inline-end: 2px solid var(--accent); }
.mod-btn { width: 30px; height: 30px; border: 1px solid var(--line); font-family: var(--disp); font-size: 11px; }
.mod-btn.active { border-color: var(--accent); color: var(--accent); }
.c3d-hint { font-family: var(--disp); font-size: 9px; letter-spacing: .1em; color: var(--faint); }

/* ---------------- TABS + KINETIC ---------------- */
.tab-rail { display: flex; gap: 4px; border: 1px solid var(--line); padding: 4px; margin-bottom: 22px; width: fit-content; }
.tab-btn { font-family: var(--disp); font-size: 12px; letter-spacing: .1em; padding: 9px 16px; color: var(--dim); }
.tab-btn.active { background: var(--accent-2); color: #fff; }
.tab-copy p { max-width: 46ch; color: var(--dim); font-size: 14px; line-height: 1.9; margin-bottom: 16px; }
.tab-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tab-chip { font-family: var(--disp); font-size: 10px; letter-spacing: .1em; border: 1px solid var(--line); padding: 5px 10px; }

.kinetic-panel { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0 clamp(30px, 5vw, 80px); }
.kinetic-label { font-family: var(--disp); font-size: 11px; letter-spacing: .2em; color: var(--accent); }
.kinetic-value { font-family: var(--disp); font-weight: 800; font-size: clamp(34px, 5vw, 66px); line-height: 1; transition: opacity .18s, transform .18s; }
.kinetic-value.swap { opacity: 0; transform: translateY(10px); }
.kinetic-sub { font-family: var(--disp); font-size: 12px; letter-spacing: .1em; color: var(--dim); }
.kinetic-sub b { color: var(--silver); }

/* ---------------- MOBILE ---------------- */
@media (max-width: 900px) {
  html, body { overflow: auto; }
  .seam, .hud-arrows, .hud-hint, .hud-progress, .hud-index { display: none; }
  .stage { display: flex; flex-direction: column; }
  .panel { position: relative; height: auto; width: 100%; left: 0 !important; transform: none !important; min-height: 78vh; }
  .panel-media { min-height: 60vh; }
  .panel-inner { padding: 90px 24px 60px; }
  .hud-frame { inset: 8px; }
  .hud-brand { top: 20px; right: 20px; }
  .hud-cta { top: 18px; left: 20px; right: auto; }
  .hud-credit { bottom: 18px; right: 20px; font-size: 10px; }
  .c3d-stage { height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .scanline, .boot span, .hud-hint { animation: none; }
}
