/* Vinci demos hub — studio brand shell around the bento gallery */
:root {
  --hub-bg: #f7f1e8;
  --hub-ink: #2c2622;
  --hub-muted: #6a6158;
  --hub-terracotta: #c45a32;
  --hub-bronze: #b8925a;
  --hub-surface: #fffdf9;
  --hub-surface-2: #efe6da;
  --hub-line: rgba(36, 31, 28, 0.09);
  --hub-header-h: 68px;
  --font-display: "Frank Ruhl Libre", Georgia, serif;
  --font-body: "Heebo", system-ui, sans-serif;
  --font-en-display: "Fraunces", Georgia, serif;
  --font-en-body: "Figtree", system-ui, sans-serif;
}

body.hub {
  background:
    radial-gradient(ellipse 70% 48% at 100% 0%, rgba(232, 176, 140, 0.38), transparent 55%),
    radial-gradient(ellipse 55% 42% at 0% 35%, rgba(255, 246, 232, 0.85), transparent 52%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(184, 146, 90, 0.08), transparent 55%),
    var(--hub-bg);
  color: var(--hub-ink);
  font-family: var(--font-body);
  min-height: 100vh;
  padding-top: calc(var(--demo-h) + var(--hub-header-h));
}

.hub-header {
  position: fixed;
  top: var(--demo-h);
  inset-inline: 0;
  z-index: 1200;
  height: var(--hub-header-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 2.25rem);
  background: color-mix(in srgb, var(--hub-surface) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hub-line);
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hub-ink);
  text-decoration: none;
}

.hub-brand:hover {
  opacity: 1;
  color: var(--hub-ink);
}

.hub-brand__mark {
  width: 30px;
  height: 30px;
  display: block;
  flex: none;
}

.hub-brand__copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.1;
}

.hub-brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.375rem);
  color: #2c2622;
  letter-spacing: 0.01em;
}

.hub-brand__tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hub-terracotta);
}

.hub-main {
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2rem, 4vw, 3rem);
}

.hub-intro {
  width: min(1360px, calc(100% - 1.75rem));
  margin: 0 auto 1.85rem;
}

.hub-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hub-bronze);
}

.hub-intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  color: var(--hub-ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hub-lead {
  margin: 0.7rem 0 0;
  color: var(--hub-muted);
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  line-height: 1.4;
  white-space: nowrap;
}

.hub-bento {
  width: min(1360px, calc(100% - 1.75rem));
  margin: 0 auto;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: row;
  align-content: start;
}

@media (min-width: 560px) {
  .hub-bento {
    width: min(1360px, calc(100% - 2.25rem));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(160px, 22vw, 210px);
    gap: 16px;
  }

  .hub-card,
  .hub-card--md,
  .hub-card--wide,
  .hub-card--tall,
  .hub-card--feature {
    grid-column: span 1;
    grid-row: span 1;
  }

  .hub-card--tall,
  .hub-card--feature {
    grid-row: span 2;
  }
}

@media (min-width: 900px) {
  .hub-bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(150px, 11vw, 188px);
    gap: 18px;
  }

  .hub-card--md {
    grid-column: span 4;
    grid-row: span 1;
  }

  .hub-card--tall {
    grid-column: span 4;
    grid-row: span 2;
  }

  .hub-card--wide {
    grid-column: span 8;
    grid-row: span 1;
  }

  .hub-card--feature {
    grid-column: span 8;
    grid-row: span 2;
  }
}

@media (min-width: 1200px) {
  .hub-bento {
    grid-auto-rows: clamp(168px, 10.5vw, 200px);
    gap: 20px;
  }
}

.hub-card {
  position: relative;
  overflow: hidden;
  display: block;
  color: #fff;
  min-width: 0;
  min-height: 0;
  height: 100%;
  isolation: isolate;
  border-radius: 8px;
  border: 1px solid var(--hub-line);
  outline: 1px solid transparent;
  background: var(--hub-surface);
  box-shadow: 0 10px 28px rgba(44, 38, 34, 0.06);
  transition: outline-color 0.35s ease, box-shadow 0.35s ease;
}

.hub-card:focus-visible {
  outline: 2px solid var(--hub-terracotta);
  outline-offset: 3px;
}

.hub-card__media {
  position: absolute;
  inset: 0;
  background: var(--hub-surface-2);
}

.hub-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
  filter: saturate(0.94) contrast(1.03);
}

.hub-card:hover .hub-card__media img,
.hub-card:focus-visible .hub-card__media img {
  transform: scale(1.045);
  filter: saturate(1.05) contrast(1.05);
}

.hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 32%, rgba(28, 22, 18, 0.82) 100%),
    linear-gradient(90deg, rgba(28, 22, 18, 0.12), transparent 45%);
  pointer-events: none;
}

.hub-card__meta {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  pointer-events: none;
}

.hub-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
}

.hub-card__kind {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.hub-card--feature .hub-card__meta {
  padding: 1.35rem 1.45rem 1.35rem;
}

.hub-card--feature .hub-card__title {
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
}

.hub-card--feature .hub-card__kind {
  font-size: 0.78rem;
}

.hub-card--wide .hub-card__meta {
  padding: 1.15rem 1.3rem 1.2rem;
}

.hub-card--wide .hub-card__title {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.hub-card--tall .hub-card__title {
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
}

.hub-card__title--latin {
  font-family: var(--font-en-display);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hub-card:hover {
  outline-color: color-mix(in srgb, var(--accent, var(--hub-bronze)) 55%, transparent);
  box-shadow: 0 16px 36px rgba(44, 38, 34, 0.11);
  z-index: 1;
}

.hub-foot {
  display: flex;
  justify-content: center;
  padding: 1.15rem 1rem 1.75rem;
  border-top: 1px solid var(--hub-line);
  color: var(--hub-muted);
  font-size: 0.88rem;
}

.hub-foot p {
  margin: 0;
}

.hub-foot a {
  color: var(--hub-terracotta);
  font-weight: 600;
  text-underline-offset: 3px;
}

.hub-foot a:hover {
  text-decoration: underline;
}

/* 404 — studio-aligned empty state */
.hub--404 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hub-404 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5rem) 0 clamp(3rem, 8vh, 5rem);
  text-align: start;
}

.hub-404 .hub-eyebrow {
  margin-bottom: 0.75rem;
  color: var(--hub-terracotta);
}

.hub-404__code {
  margin: 0;
  font-family: var(--font-en-display);
  font-weight: 500;
  font-size: clamp(4.5rem, 14vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--hub-bronze) 55%, var(--hub-surface-2));
}

.hub-404 h1 {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--hub-ink);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hub-404__lead {
  margin: 1rem 0 0;
  max-width: 36ch;
  color: var(--hub-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hub-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hub-404__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hub-404__btn--primary {
  background: var(--hub-terracotta);
  color: #fffdf9;
  border: 1px solid var(--hub-terracotta);
}

.hub-404__btn--primary:hover {
  background: #a84b2a;
  border-color: #a84b2a;
  color: #fffdf9;
  opacity: 1;
}

.hub-404__btn--ghost {
  background: transparent;
  color: var(--hub-ink);
  border: 1px solid var(--hub-line);
}

.hub-404__btn--ghost:hover {
  border-color: color-mix(in srgb, var(--hub-bronze) 55%, var(--hub-line));
  background: var(--hub-surface);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hub-card__media img {
    transition: none;
  }

  .hub-card:hover .hub-card__media img,
  .hub-card:focus-visible .hub-card__media img {
    transform: none;
  }
}
