/* ==========================================================================
   NED Internal Hub — brand stylesheet
   Source of truth: ned-brand skill (Ink Black, Electric Lime, Pure White,
   Cool Grey; Cormorant Garamond headings, Outfit body). Dark-first.
   ========================================================================== */

:root {
  /* Brand palette */
  --ink: #000000;
  --white: #ffffff;
  --lime: #eaf790;
  --grey: #a6a6a6;

  /* Derived surfaces and lines (tints of the palette, nothing off-brand) */
  --surface: #0c0c0c;
  --surface-2: #141414;
  --line: #262626;
  --line-strong: #333333;
  --grey-dim: #6f6f6f;
  --lime-tint: rgba(234, 247, 144, 0.08);
  --lime-glow: rgba(234, 247, 144, 0.18);

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Rhythm */
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
kbd {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--grey);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 6px;
  line-height: 1.4;
  vertical-align: 1px;
}

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

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--gutter);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--white);
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(420px, 100%);
  height: 42px;
  padding: 0 12px 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--grey);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.search:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-tint);
  color: var(--white);
}

.search-icon { width: 18px; height: 18px; flex-shrink: 0; }

.search input {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--white);
  font: inherit;
  font-weight: 400;
  font-size: 14px;
}

.search input::placeholder { color: var(--grey-dim); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-key { margin-left: 8px; }
.search:focus-within .search-key { opacity: 0; }

/* --------------------------------------------------------------------------
   Page + hero
   -------------------------------------------------------------------------- */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) 64px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}

.display {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--white);
}

.display em,
.section-title em {
  font-style: italic;
  font-weight: inherit;
  color: var(--lime);
}

.lede {
  margin: 22px 0 0;
  max-width: 52ch;
  font-size: 17px;
  color: var(--grey);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { margin-top: clamp(48px, 7vw, 80px); }
.section[hidden] { display: none; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-head .kicker { margin-bottom: 8px; }

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.1;
}

.section-blurb {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--grey);
}

.section-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-dim);
  padding-bottom: 4px;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 190px;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease);
}

.card:hover,
.card:focus-visible {
  background: var(--surface-2);
  border-color: var(--lime);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -18px var(--lime-glow), 0 0 0 1px var(--lime-tint);
  outline: none;
}

.card[hidden] { display: none; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  color: var(--white);
  transition: border-color .22s var(--ease), color .22s var(--ease), background .22s var(--ease);
}

.card:hover .card-mark {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.card-arrow {
  width: 20px;
  height: 20px;
  color: var(--grey-dim);
  transition: color .22s var(--ease), transform .22s var(--ease);
}

.card:hover .card-arrow {
  color: var(--lime);
  transform: translate(2px, -2px);
}

.card-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.1;
  color: var(--white);
}

.card-tagline {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--grey);
}

.card-foot {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.5;
}

.card:hover .tag { color: var(--lime); border-color: rgba(234, 247, 144, 0.45); }

.card-host {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--grey-dim);
  overflow-wrap: anywhere;
}

.empty {
  margin: 56px 0 0;
  padding: 28px;
  text-align: center;
  color: var(--grey);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey-dim);
}

.footer .dot { margin: 0 6px; }

.footer-right em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0;
  color: var(--lime);
}

/* --------------------------------------------------------------------------
   Responsive + restraint
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .search { width: 100%; order: 3; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
