/* ─────────────────────────────────────────────────────────────
 * "Made by devs. For devs." — terminal typewriter section
 * Matches agencyg.de's teal/mint brand palette (--highlight-start
 * #2dd4bf / --highlight-end #34d399), not the shop's gold. Prompt
 * stays green-ish, commands white, paths blue — standard dev-tool
 * semantics recoloured to fit the site.
 * ──────────────────────────────────────────────────────────── */

.dev-terminal-section {
  position: relative;
  padding: 72px 0 92px;
  overflow: hidden;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(45, 212, 191, 0.025) 45%,
    transparent 100%);
}

/* Ambient grid behind the terminal — teal tinted */
.dev-terminal-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
  pointer-events: none;
  opacity: 0.7;
}

.dev-terminal-wrap {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.dev-terminal-heading {
  text-align: center;
  margin-bottom: 36px;
}
.dev-terminal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.22);
  color: #2dd4bf;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.dev-terminal-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.8);
  animation: dtBlink 2.2s ease-in-out infinite;
}
@keyframes dtBlink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.dev-terminal-title {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.dev-terminal-title .accent {
  /* Matches .gradient-text used elsewhere on agencyg.de */
  background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 45%, #34d399 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dev-terminal-sub {
  font-size: 15px;
  color: var(--text-secondary, #94a3b8);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Terminal chrome */
.dev-terminal {
  position: relative;
  border-radius: 16px;
  /* Deeper blue-black to sit inside agencyg.de's --bg-c1 (#050a18) */
  background: linear-gradient(180deg, #080d1c 0%, #05091a 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 28px 70px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(45, 212, 191, 0.18),
    0 0 60px -20px rgba(45, 212, 191, 0.3);
  overflow: hidden;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}
.dev-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(45, 212, 191, 0.45),
    transparent 35%,
    transparent 65%,
    rgba(52, 211, 153, 0.3));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.dev-terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(45, 212, 191, 0.12);
}
.dev-terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
/* Traffic-light dots stay real traffic-light colors — doesn't fight
   the teal theme and keeps the macOS-terminal feel. */
.dev-terminal-dot.red { background: #ff5f56; box-shadow: 0 0 6px rgba(255, 95, 86, 0.5); }
.dev-terminal-dot.yellow { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, 0.5); }
.dev-terminal-dot.green { background: #27c93f; box-shadow: 0 0 6px rgba(39, 201, 63, 0.5); }
.dev-terminal-path {
  margin-left: 10px;
  color: #64748b;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.dev-terminal-body {
  padding: 20px 22px 24px;
  font-size: 14px;
  line-height: 1.65;
  color: #e2f3ee;
  min-height: 280px;
  position: relative;
}

.dev-terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 1;
}
/* Standard shell semantics but recoloured:
   - prompt (user@host)  → mint (brand primary)
   - path                → steel blue (readable, non-branded)
   - arrow ($ / ~ / >)   → teal brand
   - cmd (typed input)   → near-white
   - out (process stdout) → muted text-secondary
   - ok ✓                → green (functional)
   - brand (script names)→ emerald (gradient partner) */
.dev-terminal-line .prompt { color: #34d399; font-weight: 700; margin-right: 8px; }
.dev-terminal-line .path   { color: #7dd3fc; }
.dev-terminal-line .arrow  { color: #2dd4bf; margin: 0 6px; }
.dev-terminal-line .cmd    { color: #f1f5f9; }
.dev-terminal-line .out    { color: #94a3b8; }
.dev-terminal-line .ok     { color: #34d399; font-weight: 700; }
.dev-terminal-line .warn   { color: #ffbd2e; font-weight: 700; }
.dev-terminal-line .brand  { color: #5eead4; font-weight: 700; }
.dev-terminal-line .comment { color: #64748b; font-style: italic; }

/* Caret */
.dev-terminal-caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  vertical-align: -2px;
  background: #2dd4bf;
  margin-left: 4px;
  animation: dtCaret 0.9s step-end infinite;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.7);
}
@keyframes dtCaret { 50% { opacity: 0; } }

.dev-terminal-body.is-done .dev-terminal-caret {
  animation: dtCaret 0.9s step-end infinite, dtPulse 2.5s ease-in-out infinite;
}
@keyframes dtPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(45, 212, 191, 0.7); }
  50%      { box-shadow: 0 0 20px rgba(45, 212, 191, 1), 0 0 30px rgba(52, 211, 153, 0.5); }
}

/* Reveal animation when section scrolls into view */
.dev-terminal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.2, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.dev-terminal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stats strip under terminal */
.dev-terminal-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 36px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
}
.dev-terminal-stat {
  text-align: center;
  color: var(--text-tertiary, #64748b);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dev-terminal-stat strong {
  display: block;
  color: #2dd4bf;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0;
  text-transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dev-terminal, .dev-terminal-caret, .dev-terminal-kicker::before {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .dev-terminal-body { font-size: 12.5px; padding: 16px; min-height: 220px; }
  .dev-terminal-stats { gap: 20px; margin-top: 28px; }
  .dev-terminal-stat strong { font-size: 18px; }
}

/* Light-mode (agencyg.de supports theme toggle) */
html.light-mode .dev-terminal {
  background: linear-gradient(180deg, #0f172a 0%, #0a1122 100%);
}
html.light-mode .dev-terminal-dot {
  box-shadow: none;
}
