/* ===================================================================
   TECH BRAINS — Design tokens
   Theme: "system blueprint" — ERP implementation is the work of
   wiring separate business functions (HR, Sales, Finance, etc.)
   into one connected core. The visual language borrows from
   technical schematics: ink backgrounds, traced connector lines,
   monospace annotations.
   =================================================================== */

:root {
  /* Color */
  --ink: #0b1220;
  --surface: #121b2e;
  --surface-2: #18233a;
  --line: #28344c;
  --line-bright: #3a4a68;
  --text: #e8ecf1;
  --text-dim: #8b96a8;
  --cyan: #5eead4;
  --blue: #38bdf8;
  --amber: #f5a524;
  --amber-soft: rgba(245, 165, 36, 0.14);
  --focus-ring: #5eead4;

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --max-width: 1180px;
  --radius: 10px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 0;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.topbar-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}

.topbar-cta:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 60px 0 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.headline .accent {
  position: relative;
  white-space: nowrap;
}

.headline .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.1em;
  background: var(--amber);
  opacity: 0.45;
  border-radius: 2px;
  z-index: -1;
}

.subcopy {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 0 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber);
  color: #1a1304;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.module-strip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.module-strip span {
  color: var(--text);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 14px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5fe08c;
  box-shadow: 0 0 0 3px rgba(95, 224, 140, 0.18);
}

/* ---------- blueprint diagram ---------- */

.diagram-wrap {
  position: relative;
  width: 100%;
}

.diagram-wrap svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.bp-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.5;
}

.bp-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw 0.9s ease forwards;
  opacity: 0.85;
}

.bp-node circle {
  fill: var(--surface-2);
  stroke: var(--line-bright);
  stroke-width: 1.4;
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

.bp-node text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  fill: var(--text-dim);
  text-anchor: middle;
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

.bp-hub circle {
  fill: var(--ink);
  stroke: var(--amber);
  stroke-width: 1.8;
}

.bp-hub text {
  fill: var(--text);
  font-weight: 600;
}

.bp-hub .hub-sub {
  fill: var(--text-dim);
  font-weight: 400;
  font-size: 10px;
}

/* stagger lines + nodes */
.bp-line.n1 { animation-delay: 0.1s; }
.bp-line.n2 { animation-delay: 0.22s; }
.bp-line.n3 { animation-delay: 0.34s; }
.bp-line.n4 { animation-delay: 0.46s; }
.bp-line.n5 { animation-delay: 0.58s; }
.bp-line.n6 { animation-delay: 0.7s; }

.bp-node.n1 circle, .bp-node.n1 text { animation-delay: 0.5s; }
.bp-node.n2 circle, .bp-node.n2 text { animation-delay: 0.62s; }
.bp-node.n3 circle, .bp-node.n3 text { animation-delay: 0.74s; }
.bp-node.n4 circle, .bp-node.n4 text { animation-delay: 0.86s; }
.bp-node.n5 circle, .bp-node.n5 text { animation-delay: 0.98s; }
.bp-node.n6 circle, .bp-node.n6 text { animation-delay: 1.1s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .bp-line, .bp-node circle, .bp-node text {
    animation: none !important;
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
}

.footer-row a:hover {
  color: var(--cyan);
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .diagram-wrap {
    max-width: 420px;
    margin: 0 auto;
  }
  .hero {
    padding-top: 30px;
    min-height: auto;
  }
  .subcopy {
    max-width: 100%;
  }
}

/* ===================================================================
   Media-link manager (media-upload.php) — shares the same tokens
   =================================================================== */

.page-header {
  padding: 50px 0 10px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 6px 0 8px;
}

.page-sub {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 8px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 28px 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input[type="text"],
.field input[type="url"] {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
}

.field input:focus {
  border-color: var(--cyan);
}

.type-toggle {
  display: flex;
  gap: 10px;
}

.type-toggle label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.type-toggle input {
  accent-color: var(--amber);
}

.type-toggle input:checked + span {
  color: var(--text);
}

.type-toggle label:has(input:checked) {
  border-color: var(--amber);
  color: var(--text);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.alert {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.alert-success {
  background: rgba(95, 224, 140, 0.1);
  border: 1px solid rgba(95, 224, 140, 0.35);
  color: #8fefb4;
}

.alert-error {
  background: rgba(245, 90, 90, 0.1);
  border: 1px solid rgba(245, 90, 90, 0.35);
  color: #f5a5a5;
}

.gallery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 44px 0 16px;
}

.gallery-heading h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}

.gallery-count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media {
  background: var(--ink);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-media img,
.card-media video,
.card-media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.card-body {
  padding: 14px 16px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  word-break: break-word;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.tag-image { color: var(--cyan); border-color: rgba(94, 234, 212, 0.4); }
.tag-video { color: var(--amber); border-color: rgba(245, 165, 36, 0.4); }

.delete-btn {
  background: none;
  border: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.delete-btn:hover {
  color: #f5a5a5;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13.5px;
}
