/* ============================================================
   hero-print-animation.css  — TriAkar hero section
   Self-contained. Safe to delete (site still works).
   Colors: #111111 · #9a9a9a · #e46a2e · neutral background
   ============================================================ */

/* ── ROOT WRAPPER ────────────────────────────────────────── */
#triakar-print-animation {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image:
    radial-gradient(circle, rgba(100,96,90,.18) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
}

/* ── OUTER WRAP (cabinet + info stacked vertically) ─────── */
.tpa-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ══════════════════════════════════════════════════════════
   PRINTER CABINET
   A clean rectangular frame that houses the print scene.
   Styled like a minimal FDM printer enclosure:
   — thin border with corner radius
   — subtle inner shadow for depth
   — same neutral palette as the site background
   ══════════════════════════════════════════════════════════ */
.tpa-cabinet {
  position: relative;
  width: 270px;
  padding: 20px 14px 14px;   /* top padding makes room for the LIVE label */
  background: rgba(220,216,208,0.45);
  border: 1.5px solid rgba(0,0,0,0.13);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(0,0,0,0.06),
    0 2px 8px rgba(0,0,0,0.07);
}

/* Corner accent marks — evoke real printer frame brackets */
.tpa-cabinet::before,
.tpa-cabinet::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: #9a9a9a;
  border-style: solid;
  opacity: 0.5;
}
.tpa-cabinet::before {
  top: 5px;
  left: 5px;
  border-width: 1.5px 0 0 1.5px;
  border-radius: 2px 0 0 0;
}
.tpa-cabinet::after {
  top: 5px;
  right: 5px;
  border-width: 1.5px 1.5px 0 0;
  border-radius: 0 2px 0 0;
}

/* ── LIVE PRINT LABEL — top-left of cabinet ─────────────── */
.tpa-label {
  position: absolute;
  top: 7px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9a9a9a;
  user-select: none;
  z-index: 30;
}

.tpa-label-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e46a2e;
  animation: tpa-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes tpa-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ── SCENE (inside cabinet) ──────────────────────────────── */
.tpa-scene {
  position: relative;
  width: 100%;            /* fills the cabinet inner width */
  height: 280px;
}

/* ══════════════════════════════════════════════════════════
   GANTRY — the moving assembly (rail + head as one unit)
   ══════════════════════════════════════════════════════════ */
.tpa-gantry {
  position: absolute;
  left: 0;
  right: 0;
  height: 37px;          /* carriage 14 + hotend 18 + nozzle 5 */
  z-index: 20;
  will-change: top;
}

/* Rail spans full gantry width */
.tpa-rail-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #9a9a9a 5%,
    #c0bcb8 50%,
    #9a9a9a 95%,
    transparent
  );
  border-radius: 2px;
}

.tpa-rail-track::before,
.tpa-rail-track::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 9px;
  background: #888;
  border-radius: 1px;
}
.tpa-rail-track::before { left: 0; }
.tpa-rail-track::after  { right: 0; }

/* ── PRINT HEAD ──────────────────────────────────────────── */
.tpa-head {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: left;
}

.tpa-carriage {
  width: 28px;
  height: 14px;
  background: linear-gradient(180deg, #444 0%, #222 100%);
  border-radius: 3px 3px 0 0;
  border: 1px solid #555;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  position: relative;
}
.tpa-carriage::before,
.tpa-carriage::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #666;
  border: 1px solid #444;
}
.tpa-carriage::before { left: 3px; }
.tpa-carriage::after  { right: 3px; }

.tpa-hotend {
  width: 12px;
  height: 18px;
  background: linear-gradient(180deg, #333 0%, #1a1a1a 60%, #111 100%);
  clip-path: polygon(15% 0, 85% 0, 100% 40%, 80% 100%, 20% 100%, 0% 40%);
}

.tpa-nozzle {
  width: 4px;
  height: 5px;
  background: #111;
  border-radius: 0 0 3px 3px;
}

/* ── DRIP ────────────────────────────────────────────────── */
.tpa-drip {
  width: 2.5px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(180deg, #e46a2e 0%, rgba(228,106,46,0) 100%);
  height: 0;
  opacity: 0;
}
.tpa-drip.active {
  animation: tpa-drip-fall 0.38s ease-out forwards;
}
@keyframes tpa-drip-fall {
  0%   { height: 0;    opacity: 1; }
  60%  { height: 10px; opacity: 1; }
  100% { height: 10px; opacity: 0; }
}

/* ── GLOW ────────────────────────────────────────────────── */
.tpa-glow {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #e46a2e 30%, rgba(228,106,46,0) 100%);
  margin-top: -4px;
  opacity: 0;
  transition: opacity 0.12s;
}
.tpa-glow.on {
  opacity: 1;
  animation: tpa-glow-pulse 0.5s ease-in-out infinite alternate;
}
@keyframes tpa-glow-pulse {
  0%   { transform: scale(1);    opacity: 0.8; }
  100% { transform: scale(1.4);  opacity: 1;   }
}

/* ── OBJECT LAYER STACK ──────────────────────────────────── */
.tpa-object-wrap {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 180px;
  overflow: hidden;
  max-height: 200px;
  z-index: 10;
}

.tpa-layer {
  display: block;
  height: 5px;
  border-radius: 0.5px;
  flex-shrink: 0;
  opacity: 0;
  transform-origin: center bottom;
  transform: scaleX(0.05);
}
.tpa-layer.in {
  animation: tpa-layer-appear 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes tpa-layer-appear {
  0%   { opacity: 0; transform: scaleX(0.05); }
  55%  { opacity: 1; transform: scaleX(1.04); }
  100% { opacity: 1; transform: scaleX(1);    }
}

/* ── PRINT BED ───────────────────────────────────────────── */
.tpa-bed {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  border-radius: 2px;
  border-top: 2px solid #b0aca4;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 18px,
      rgba(0,0,0,.05) 18px,
      rgba(0,0,0,.05) 19px
    ),
    linear-gradient(180deg, #d4d0c8 0%, #c0bcb4 100%);
  z-index: 5;
}

/* ══════════════════════════════════════════════════════════
   INFO PANEL  — BELOW the cabinet, never inside it
   Centered under the cabinet via .tpa-wrap flexbox.
   ══════════════════════════════════════════════════════════ */
.tpa-info {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  user-select: none;
}

.tpa-info-layers,
.tpa-info-material {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.tpa-info-value {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #3a3632;
  line-height: 1;
  letter-spacing: 0.01em;
  min-width: 20px;
  text-align: right;
}

.tpa-info-key {
  font-family: 'Manrope', sans-serif;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.tpa-info-sep {
  display: block;
  width: 1px;
  height: 18px;
  background: rgba(0,0,0,0.12);
}

/* ── RESET FADE ──────────────────────────────────────────── */
.tpa-object-wrap.resetting {
  animation: tpa-fade-out 0.5s ease-out forwards;
}
@keyframes tpa-fade-out {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tpa-cabinet { width: 230px; }
  .tpa-scene   { height: 250px; }
}
@media (max-width: 600px) {
  #triakar-print-animation { display: none; }
}
