/* ==========================================================================
   MIDHub Hub — design tokens
   Brand: Orange #F47820, Green #03A56A, Charcoal #545454
   Type:  Poppins (UI), JetBrains Mono (data / meta)
   ========================================================================== */

:root{
  --orange: #F47820;
  --orange-dim: #c95f14;
  --green: #03A56A;
  --green-dim: #028a58;

  --charcoal-950: #18191b;
  --charcoal-900: #1f2123;
  --charcoal-800: #2b2d30;
  --charcoal-600: #545454;
  --charcoal-300: #9a9ba0;
  --charcoal-100: #d8d9dd;

  --orange-tint: rgba(244,120,32,.1);
  --green-tint: rgba(3,165,106,.1);

  --paper: #f4f6fb;
  --paper-raised: #ffffff;
  --ink: #232426;
  --ink-soft: #63656b;

  --radius: 10px;
  --radius-lg: 16px;
  --font-ui: 'Poppins', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
kbd{
  font-family: var(--font-mono);
  font-size: .72rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px;
  padding: .1rem .4rem;
  color: inherit;
}

/* faint grain so the dark hero doesn't feel like a flat gradient */
.noise-overlay{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .025; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar{
  position: sticky; top: 0; z-index: 20;
  background: var(--charcoal-950);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar__inner{
  max-width: 1180px; margin: 0 auto;
  padding: .85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.brand{ display: flex; align-items: center; }
.brand__logo{ height: 30px; width: auto; display: block; }

.topbar__meta{ display: flex; align-items: center; gap: .7rem; color: var(--charcoal-300); }
.clock{ font-family: var(--font-mono); font-size: .82rem; color: #fff; letter-spacing: .02em; }
.date{ font-family: var(--font-mono); font-size: .78rem; }
.topbar__divider{ width: 1px; height: 12px; background: rgba(255,255,255,.15); }

@media (max-width: 560px){
  .date{ display: none; }
  .topbar__divider{ display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero{
  position: relative;
  background: linear-gradient(160deg, var(--charcoal-950) 0%, var(--charcoal-900) 55%, var(--charcoal-800) 100%);
  overflow: hidden;
  padding: 4.5rem 1.5rem 5rem;
}

.hero__net{
  position: absolute; inset: 0; width: 100%; height: 100%;
}

.hero__scrim{
  position: absolute; inset: 0;
  background: linear-gradient(115deg, var(--charcoal-950) 0%, var(--charcoal-950) 32%, transparent 62%);
  pointer-events: none;
}
.net-path{
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.4s var(--ease) forwards;
}
.net-path:nth-child(2){ animation-delay: .12s; }
.net-path:nth-child(3){ animation-delay: .24s; }
.net-path:nth-child(4){ animation-delay: .36s; }
@keyframes draw{ to{ stroke-dashoffset: 0; } }

.net-node{ opacity: 0; animation: nodeIn .5s ease forwards, pulse 2.6s ease-in-out infinite; }
.net-node--o{ fill: var(--orange); animation-delay: 1.8s, 2.3s; }
.net-node--g{ fill: var(--green); animation-delay: 2s, 2.5s; }
@keyframes nodeIn{ to{ opacity: .9; } }
@keyframes pulse{
  0%, 100%{ r: 4px; opacity: .85; }
  50%{ r: 6.5px; opacity: .4; }
}

.hero__content{
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
}

.hero__logo{
  height: 40px; width: auto; display: block;
  margin: 0 0 1.6rem;
}

.hero__eyebrow{
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .78rem; color: var(--green);
  margin: 0 0 1.1rem;
}
.hero__eyebrow::before{
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px rgba(3,165,106,.18);
}

.hero__title{
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
  color: #fff; margin: 0 0 .6rem;
}
.hero__title #userName{ color: var(--orange); }

.hero__subtitle{
  font-size: 1.05rem; color: var(--charcoal-300); margin: 0 0 2.4rem;
  max-width: 32ch;
}

.jump{
  display: flex; align-items: center; gap: .7rem;
  max-width: 520px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.jump:focus-within{
  border-color: var(--orange);
  background: rgba(255,255,255,.09);
}
.jump__icon{ color: var(--charcoal-300); flex-shrink: 0; }
.jump__input{
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--font-ui); font-size: .95rem; color: #fff;
}
.jump__input::placeholder{ color: var(--charcoal-300); }
.jump__kbd{ flex-shrink: 0; }

@media (prefers-reduced-motion: reduce){
  .net-path, .net-node{ animation: none !important; stroke-dashoffset: 0; opacity: .8; }
}

/* ==========================================================================
   Board / sections / cards
   ========================================================================== */

.board{
  max-width: 1180px; margin: -2.6rem auto 0; padding: 0 1.5rem 2rem;
  position: relative; z-index: 2;
}

.section{ margin-bottom: 2.6rem; }
.section:last-child{ margin-bottom: 0; }

.section__head{
  display: flex; align-items: baseline; gap: .6rem;
  margin: 0 0 1rem .1rem;
}
.section__title{
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
  letter-spacing: .02em; margin: 0;
}
.section__count{
  font-family: var(--font-mono); font-size: .74rem; color: var(--charcoal-300);
}

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .9rem;
}

.card{
  position: relative;
  display: flex; flex-direction: column; gap: .9rem;
  background: var(--paper-raised);
  border: 1px solid #e7eaf2;
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.card:hover, .card:focus-within{
  transform: translateY(-2px);
  border-color: #d9deea;
  box-shadow: 0 10px 24px -14px rgba(24,25,27,.22);
}
.card:focus-within{ outline: 2px solid var(--orange); outline-offset: 2px; }

.card--placeholder{
  border-style: dashed;
  background: #fbfcfe;
}
.card--placeholder .card__title{ color: var(--ink-soft); }

.card__top{ display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }

.card__logo{
  height: 30px; width: auto; max-width: 155px;
  object-fit: contain; object-position: left center;
  flex-shrink: 1;
}

.card__status{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin-top: .35rem; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(3,165,106,.15);
}
.card__status--off{ background: var(--charcoal-300); box-shadow: none; }

.card__body{ flex: 1; }
.card__desc{
  font-size: .84rem; color: var(--ink-soft); margin: 0;
  line-height: 1.5;
}

.card__meta{
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--charcoal-300);
  padding-top: .7rem; border-top: 1px solid #eef0f6;
  display: flex; align-items: center; justify-content: space-between;
}

.card__link{
  position: absolute; inset: 0; border-radius: inherit;
}

.card--placeholder .card__meta{ color: var(--orange-dim); }

/* empty state */
.empty-state{
  max-width: 1180px; margin: 0 auto; padding: 0 1.5rem 4rem;
  color: var(--ink-soft); font-size: .92rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer{ border-top: 1px solid #e7eaf2; }
.footer__inner{
  max-width: 1180px; margin: 0 auto; padding: 1.3rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .4rem;
  font-size: .78rem; color: var(--charcoal-300);
}
.footer__edit code{
  font-family: var(--font-mono); background: #eef0f6; padding: .1rem .35rem; border-radius: 4px;
  color: var(--ink-soft);
}

@media (max-width: 560px){
  .hero{ padding: 3.2rem 1.25rem 4rem; }
  .board{ margin-top: -2rem; padding: 0 1.25rem 2rem; }
  .footer__inner{ flex-direction: column; align-items: flex-start; }
}
