:root {
  --hub-bg: #050505;
  --hub-surface: #0d0d0d;
  --hub-amber: #ffdca1;
  --hub-amber-hot: #ffb800;
  --hub-teal: #7df4ff;
  --hub-muted: #d5c4ab;
  --hub-line: #1a1a1a;
  --hub-outline: #514532;
  --hub-pad: 16px;
  --hub-nav: 64px;
  --hub-foot: 64px;
}

* {
  box-sizing: border-box;
}

html,
body.hub-page {
  background: var(--hub-bg);
  color: #ede1d0;
  min-height: 100%;
  min-height: 100dvh;
}

body.hub-page {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}

body.hub-inner {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--hub-bg);
  color: #ede1d0;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}

body.hub-inner main {
  flex: 1;
}

.hub-main,
.hub-foot,
.hub-nav {
  padding-left: max(var(--hub-pad), env(safe-area-inset-left));
  padding-right: max(var(--hub-pad), env(safe-area-inset-right));
}

/* Header — self-contained so Tailwind CDN / forms plugin cannot flatten it */
.hub-top {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hub-outline);
}

.hub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: var(--hub-nav);
  min-height: var(--hub-nav);
  margin: 0;
  box-sizing: border-box;
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: clamp(10px, 2.6vw, 12px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--hub-amber);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-links {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: clamp(16px, 2.4vw, 32px);
  min-width: 0;
}

.hub-links a,
.hub-drawer a {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--hub-muted);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
}

.hub-links a:hover,
.hub-drawer a:hover {
  color: var(--hub-amber);
}

.hub-links a.is-active,
.hub-drawer a.is-active {
  color: var(--hub-amber);
  font-weight: 700;
  border-bottom-color: var(--hub-amber);
}

.hub-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.hub-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 220, 161, 0.4);
  background: transparent;
  color: var(--hub-amber);
  cursor: pointer;
}

.hub-lang-label {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.hub-lang select,
.hub-top .hub-lang select,
nav.hub-nav .hub-lang select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: inline-block !important;
  width: auto !important;
  min-width: 2.4rem !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--hub-amber) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  line-height: 1 !important;
  cursor: pointer;
}

.hub-lang select:focus {
  outline: 1px solid var(--hub-amber);
  outline-offset: 2px;
}

.hub-lang option {
  background: #0d0d0d;
  color: #ede1d0;
}

.hub-menu {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 220, 161, 0.45);
  border-radius: 0;
  background: transparent;
  color: var(--hub-amber);
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.hub-menu:hover {
  background: rgba(255, 220, 161, 0.08);
}

.hub-menu .hub-menu-close {
  display: none;
}

.hub-top.is-open .hub-menu .hub-menu-open {
  display: none;
}

.hub-top.is-open .hub-menu .hub-menu-close {
  display: inline-grid;
}

.hub-ico {
  display: block;
  width: 20px;
  height: 20px;
}

.hub-drawer {
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 8px max(var(--hub-pad), env(safe-area-inset-left)) 20px
    max(var(--hub-pad), env(safe-area-inset-right));
  background: #050505;
  border-top: 1px solid var(--hub-line);
}

.hub-drawer.is-open {
  display: flex;
}

.hub-drawer a {
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.14em;
}

body.hub-nav-open {
  overflow: hidden;
}

.hub-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  padding-bottom: 16px;
}

.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  flex: 1;
}

.hub-node {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--hub-surface);
  border: 1px solid var(--hub-line);
  color: inherit;
  text-decoration: none;
}

.hub-node:focus-visible {
  outline: 1px solid var(--hub-amber-hot);
  outline-offset: 2px;
}

.hub-node-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0a0a;
}

.hub-node-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.92) contrast(1.05);
}

.hub-node.is-pending .hub-node-media {
  aspect-ratio: 16 / 6;
  background: repeating-linear-gradient(
    45deg,
    #050505,
    #050505 10px,
    #161616 10px,
    #161616 20px
  );
}

.hub-node-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.15) 20%, rgba(5, 5, 5, 0.55) 100%);
  pointer-events: none;
}

.hub-node-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.hub-node-id {
  align-self: flex-start;
  border: 1px solid var(--hub-line);
  background: var(--hub-bg);
  padding: 4px 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hub-node h2 {
  margin: 0;
  font-family: Sora, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 7vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--hub-amber);
  text-transform: uppercase;
}

.hub-node-host {
  margin: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--hub-teal);
  text-transform: uppercase;
}

.hub-node-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hub-muted);
}

.hub-node-cta {
  margin-top: 8px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hub-teal);
  color: var(--hub-teal);
  padding: 10px 14px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hub-node.is-pending {
  cursor: default;
}

.hub-node.is-pending h2 {
  color: rgba(213, 196, 171, 0.55);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.hub-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(213, 196, 171, 0.55);
}

.hub-status i {
  width: 8px;
  height: 8px;
  background: #ffb4ab;
}

.hub-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--hub-outline);
  background: #130d05;
}

.hub-foot p,
.hub-foot a {
  margin: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--hub-muted);
}

.hub-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hub-foot a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hub-foot a:hover {
  color: var(--hub-teal);
}

@media (min-width: 720px) {
  :root {
    --hub-pad: 32px;
    --hub-nav: 72px;
  }

  .hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .hub-node.is-pending {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
  }

  .hub-node.is-pending .hub-node-media {
    width: 36%;
    aspect-ratio: auto;
    min-height: 120px;
  }

  .hub-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 960px) {
  .hub-links {
    display: flex;
  }

  .hub-menu {
    display: none !important;
  }

  .hub-drawer,
  .hub-drawer.is-open {
    display: none !important;
  }

  body.hub-nav-open {
    overflow: auto;
  }
}

@media (min-width: 1100px) {
  :root {
    --hub-pad: 48px;
  }

  body.hub-page {
    height: 100dvh;
    overflow: hidden;
  }

  .hub-main {
    min-height: 0;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .hub-grid {
    display: flex;
    gap: 0;
    border: 1px solid var(--hub-line);
    min-height: 0;
  }

  .hub-node {
    flex: 1 1 0;
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--hub-line);
    transition: flex 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hub-node:last-child {
    border-right: 0;
  }

  .hub-node-media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .hub-node-media img {
    object-position: center;
    transform: scale(1.06);
    transition: transform 8s ease, filter 0.4s ease;
  }

  .hub-node-media::after {
    background: linear-gradient(
      180deg,
      rgba(5, 5, 5, 0.2) 0%,
      rgba(5, 5, 5, 0.35) 45%,
      rgba(5, 5, 5, 0.88) 100%
    );
  }

  .hub-node-body {
    position: relative;
    z-index: 2;
    height: 100%;
    justify-content: space-between;
    padding: 24px;
  }

  .hub-node h2 {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    align-self: center;
    font-size: clamp(28px, 3.4vw, 56px);
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  }

  .hub-node-host {
    opacity: 0.85;
  }

  .hub-node-desc,
  .hub-node-cta {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }

  .hub-node.is-pending {
    flex-direction: column;
    max-width: 18%;
  }

  .hub-node.is-pending .hub-node-media {
    width: 100%;
    min-height: 0;
    position: absolute;
    inset: 0;
  }

  .hub-node.is-pending h2 {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 16px;
  }
}

@media (min-width: 1100px) and (hover: hover) {
  .hub-node:hover,
  .hub-node:focus-visible {
    flex: 2.15 1 0;
  }

  .hub-node:hover .hub-node-media img,
  .hub-node:focus-visible .hub-node-media img {
    transform: scale(1);
    filter: saturate(1.05) contrast(1.08);
  }

  .hub-node:hover h2,
  .hub-node:focus-visible h2 {
    writing-mode: horizontal-tb;
    transform: none;
    text-align: left;
    align-self: flex-start;
  }

  .hub-node:hover .hub-node-desc,
  .hub-node:hover .hub-node-cta,
  .hub-node:focus-visible .hub-node-desc,
  .hub-node:focus-visible .hub-node-cta {
    max-height: 160px;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
  }

  .hub-node:hover .hub-node-cta,
  .hub-node:focus-visible .hub-node-cta {
    padding: 10px 14px;
    margin-top: 8px;
  }

  .hub-node.is-pending:hover,
  .hub-node.is-pending:focus-visible {
    flex: 1 1 0;
  }
}

#ds-consent-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 16px;
  backdrop-filter: blur(8px);
}

#ds-consent-root > div {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  border: 1px solid var(--hub-outline);
  background: var(--hub-surface);
  padding: 32px;
  color: #ede1d0;
}

#ds-consent-root h2 {
  font-family: "Sora", system-ui, sans-serif;
  color: var(--hub-amber);
  margin: 0 0 16px;
}

#ds-consent-root p,
#ds-consent-root a {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--hub-muted);
}

#ds-consent-root a {
  color: var(--hub-amber);
}

#ds-consent-accept {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--hub-amber);
  background: var(--hub-amber);
  color: #050505;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 24px;
  cursor: pointer;
}
